From 1b5d7310a98141afa0c5090bb08bf890bdb24443 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Mon, 3 Sep 2007 17:57:16 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1288 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/entity.h | 1 + source/src/hudgun.cpp | 6 +++--- source/src/weapon.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/src/entity.h b/source/src/entity.h index eb332c55..afef9592 100644 --- a/source/src/entity.h +++ b/source/src/entity.h @@ -407,6 +407,7 @@ struct bounceent : physent // nades, gibs #define NADE_IN_HAND (player1->gunselect==GUN_GRENADE && player1->inhandnade) #define NADE_THROWING (player1->gunselect==GUN_GRENADE && player1->thrownademillis && !player1->inhandnade) +#define NADE_THROW_TIME (13*(1000/25)) #define has_akimbo(d) ((d)->gunselect==GUN_PISTOL && (d)->akimbo) diff --git a/source/src/hudgun.cpp b/source/src/hudgun.cpp index 9304eee9..e1c64e94 100644 --- a/source/src/hudgun.cpp +++ b/source/src/hudgun.cpp @@ -19,10 +19,10 @@ struct weaponmove void calcmove(vec base, int basetime) { - int timediff = NADE_THROWING ? (lastmillis-player1->thrownademillis) : lastmillis-basetime; - int animtime = min(player1->gunwait[player1->gunselect], attackdelay(player1->gunselect)); + int timediff = NADE_THROWING ? lastmillis-player1->thrownademillis : lastmillis-basetime; + int animtime = NADE_THROWING ? NADE_THROW_TIME : min(player1->gunwait[player1->gunselect], attackdelay(player1->gunselect)); int rtime = reloadtime(player1->gunselect); - + kick = k_rot = 0.0f; pos = player1->o; anim = ANIM_GUN_IDLE; diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 2c2e9472..b0d8f462 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -731,7 +731,7 @@ void shoot(playerent *d, vec &targ) { d->shots = 0; - if(d->thrownademillis && attacktime >= 13*(1000/25)) + if(d->thrownademillis && attacktime >= NADE_THROW_TIME) { d->weaponchanging = true; d->nextweapon = d->mag[GUN_GRENADE] ? GUN_GRENADE : d->primary;