diff options
author | Tim Angus <tim@ngus.net> | 2001-09-07 00:04:49 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2001-09-07 00:04:49 +0000 |
commit | 05e7ae0a64cb37d8a660de3234f65339ef01d4ba (patch) | |
tree | b3dfc2d7e7ada9f33eb53cc7a860722fb25365b3 /src/game/g_buildable.c | |
parent | 792ccd397d609bd766aac4bd6cdcc07e49b4588b (diff) |
Random pain anim for barricade
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r-- | src/game/g_buildable.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 586d4765..f7769613 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -325,6 +325,21 @@ void DSpawn_Pain( gentity_t *self, gentity_t *attacker, int damage ) /* ================ +DBarricade_Pain + +pain function for Droid Spawn +================ +*/ +void DBarricade_Pain( gentity_t *self, gentity_t *attacker, int damage ) +{ + if( random() > 0.5f ) + G_setBuildableAnim( self, BANIM_PAIN1 ); + else + G_setBuildableAnim( self, BANIM_PAIN2 ); +} + +/* +================ DBarricade_Die Called when an droid spawn dies @@ -1420,7 +1435,7 @@ gentity_t *G_buildItem( gentity_t *ent, buildable_t buildable, int distance, flo case BA_D_BARRICADE: built->die = DBarricade_Die; built->think = DBarricade_Think; - built->pain = DSpawn_Pain; + built->pain = DBarricade_Pain; break; case BA_D_ACIDTUBE: |