diff options
author | Ben Millwood <thebenmachine@gmail.com> | 2009-10-03 12:12:12 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:45 +0000 |
commit | 32631d7354556ff88ecfe3ff9a9d80075422fbef (patch) | |
tree | 083df63c1aada8cc7d0f6849c19b3dcee056c3fe /src/game/g_buildable.c | |
parent | ec254e3bebdc3957a630b23b3b77d5460f2c7674 (diff) |
* Add BG_EventName and use it to simplify a series of debugging messages
* Correct crouch check in ClientTimerActions
* Ensure animation togglebit on buildables is only used once per frame
(bug 3377)
* Make G_FloodLimited more robust and with a pointlessly informative
return value
* Add a brief comment to the G_SayArg* functions to explain their purpose,
which wasn't at all clear to me until I experimented with them
* Remove more redundant va()s
* Remove an unused variable and associated functions that were causing a
compiler warning
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r-- | src/game/g_buildable.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 8a987a2d..2a089ba5 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -32,12 +32,17 @@ Triggers an animation client side */ void G_SetBuildableAnim( gentity_t *ent, buildableAnimNumber_t anim, qboolean force ) { - int localAnim = anim; + int localAnim = anim | ( ent->s.legsAnim & ANIM_TOGGLEBIT ); if( force ) localAnim |= ANIM_FORCEBIT; - localAnim |= ( ( ent->s.legsAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ); + // don't flip the togglebit more than once per frame + if( ent->animTime != level.time ) + { + ent->animTime = level.time; + localAnim ^= ANIM_TOGGLEBIT; + } ent->s.legsAnim = localAnim; } |