From 2ef46416b526af9619f9a41afb518aca664a8682 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Fri, 29 Aug 2003 03:45:03 +0000 Subject: * Dumped setting buildable animations using events (pretty fucking dumb in hindsight) and replaced with an entityState_t based approach --- src/game/bg_public.h | 1 - src/game/g_buildable.c | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/game') diff --git a/src/game/bg_public.h b/src/game/bg_public.h index b923f88d..ffeefc70 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -525,7 +525,6 @@ typedef enum EV_BUILD_CONSTRUCT, //TA EV_BUILD_DESTROY, //TA - EV_BUILD_ANIM, //TA EV_DEBUG_LINE, EV_STOPLOOPINGSOUND, diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index a0cc8c02..8163bbf9 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -27,7 +27,7 @@ void G_setBuildableAnim( gentity_t *ent, buildableAnimNumber_t anim, qboolean fo if( force ) localAnim |= ANIM_TOGGLEBIT; - G_AddEvent( ent, EV_BUILD_ANIM, localAnim ); + ent->s.legsAnim = localAnim; } /* @@ -2170,7 +2170,10 @@ gentity_t *G_buildItem( gentity_t *builder, buildable_t buildable, vec3_t origin VectorCopy( normal, built->s.origin2 ); - G_AddEvent( built, EV_BUILD_CONSTRUCT, BANIM_CONSTRUCT1 ); + G_AddEvent( built, EV_BUILD_CONSTRUCT, 0 ); + + if( built->builtBy >= 0 ) + G_setBuildableAnim( built, BANIM_CONSTRUCT1, qfalse ); trap_LinkEntity( built ); -- cgit