summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-08-29 03:45:03 +0000
committerTim Angus <tim@ngus.net>2003-08-29 03:45:03 +0000
commit2ef46416b526af9619f9a41afb518aca664a8682 (patch)
tree9d623771cc4dfee72b5143fa2be299c5491a0c12 /src/game
parent4d460f1d159538e474b45bf44395c7a30665db7a (diff)
* Dumped setting buildable animations using events (pretty fucking dumb in
hindsight) and replaced with an entityState_t based approach
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_public.h1
-rw-r--r--src/game/g_buildable.c7
2 files changed, 5 insertions, 3 deletions
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 );