Jumping.

Locked
Rawing
Posts: 107
Joined: Tue Oct 23, 2007 1:40 pm

Jumping.

Post by Rawing »

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:

Code: Select all

pm->ps->velocity[2] = JUMP_VELOCITY;
into this:

Code: Select all

pm->ps->velocity[2] = floor(JUMP_VELOCITY*(pm->ps->speed/320));
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?
[color=#FF0000]/callvote kick all_enemies[/color]
Rawing
Posts: 107
Joined: Tue Oct 23, 2007 1:40 pm

Re: Jumping.

Post by Rawing »

xD it works like this:

Code: Select all

pm->ps->velocity[2] = JUMP_VELOCITY/(320/pm->ps->speed);
quite weird, but hey, it works :)
[color=#FF0000]/callvote kick all_enemies[/color]
Locked