Jumping.
Posted: Fri Jan 16, 2009 3:01 pm
I've already done a slowdown when players get hit in the feet, so I wanted to make them jump not as high as usual if they have already been hit. So i changed this:
into this:
If you haven't been hit you jump as high as usual. If you have already been hit (in the legs) you can't jump any more. Does anyone know what the problem is?
Code: Select all
pm->ps->velocity[2] = JUMP_VELOCITY;
Code: Select all
pm->ps->velocity[2] = floor(JUMP_VELOCITY*(pm->ps->speed/320));