Hi,
I had the idea to change the speed of the player in dependence of his health.
(Originally I also wanted to change the field of view in dependence oh health by blending from a clear oval in the center of the screen to zero tranparency and red-/black-color at the borders of the screen).
I changed source but it wasn’t playable.
EDIT:
If you run out of health the player isn’t moving araound at all.
May be someone has a better idea to use the changed code:
Source-file: bg_pmove.c
Function: PM_CmdScale
Starting with line 533:
if (gametype == GT_SINGLE_PLAYER || gametype == GT_COOP) {
// Adjust the movespeed
scale *= (((float) movespeed)/(float) 127);
} // if (gametype == GT_SINGLE_PLAYER)...
//+ ***** MYMOD *****
//LINEARITY ONLY FOR TESTING SHOULD BE E.G. SQR
//DIVIDING BY 100 FOR TESTING SHOULD BE MAXIMUM AVAILABLE HEALTH
scale = scale * pm->ps->stats[ STAT_HEALTH ] / 100;
//- ***** MYMOD *****
return scale;
}
