version 1.95 | | version 1.96 |
---|
| | |
/* | | /* |
* static char *rcsid_main_c = | | * static char *rcsid_main_c = |
* "$Id: main.c,v 1.95 2005/08/12 13:46:34 ryo_saeba Exp $"; | | * "$Id: main.c,v 1.96 2005/08/29 03:56:32 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
if (pl->ob->map!=map) continue; | | if (pl->ob->map!=map) continue; |
} | | } |
| | |
| | /* The code that did weapon_sp handling here was out of place - |
| | * this isn't called until after the player has finished there |
| | * actions, and is thus out of place. All we do here is bounds |
| | * checking. |
| | */ |
if(pl->has_hit) { | | if(pl->has_hit) { |
float hit_speed = pl->ob->speed/pl->weapon_sp - pl->ob->speed; | | if (pl->ob->speed_left > pl->weapon_sp) pl->ob->speed_left = pl->weapon_sp; |
| | |
if (hit_speed<pl->ob->speed) hit_speed = pl->ob->speed; | | /* This needs to be here - if the player is running, we need to |
| | * clear this each tick, but new commands are not being received |
| | * so execute_newserver_command() is never called |
| | */ |
| | pl->has_hit=0; |
| | |
pl->ob->speed_left+=hit_speed; | | } else if (pl->ob->speed_left>pl->ob->speed) |
/* This could happen if the player still has left over speed */ | | |
if (pl->ob->speed_left>hit_speed) pl->ob->speed_left=hit_speed; | | |
} | | |
else if (pl->ob->speed_left>pl->ob->speed) | | |
pl->ob->speed_left = pl->ob->speed; | | pl->ob->speed_left = pl->ob->speed; |
} | | } |
} | | } |