summaryrefslogtreecommitdiff
path: root/src/game/g_buildable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r--src/game/g_buildable.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 3ae84654..53f42ea2 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -799,10 +799,37 @@ void AHovel_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
trap_LinkEntity( self );
}
+
+
+
//==================================================================================
+
+/*
+================
+ABank_Activate
+
+Called when an alien activates an organ bank
+================
+*/
+void ABank_Activate( gentity_t *self, gentity_t *other, gentity_t *activator )
+{
+ //only aliens can activate this
+ if( activator->client->ps.stats[ STAT_PTEAM ] != PTE_ALIENS ) return;
+
+ G_AddPredictableEvent( activator, EV_MENU, MN_A_OBANK );
+}
+
+
+
+
+//==================================================================================
+
+
+
+
/*
================
ABooster_Touch
@@ -2046,6 +2073,12 @@ gentity_t *G_buildItem( gentity_t *builder, buildable_t buildable, vec3_t origin
built->pain = ASpawn_Pain;
break;
+ case BA_A_OBANK:
+ built->think = ABarricade_Think;
+ built->die = ASpawn_Die;
+ built->use = ABank_Activate;
+ break;
+
case BA_H_SPAWN:
built->die = HSpawn_Die;
built->think = HSpawn_Think;
@@ -2205,6 +2238,10 @@ void G_ValidateBuild( gentity_t *ent, buildable_t buildable )
G_AddPredictableEvent( ent, EV_MENU, MN_H_NOPOWER );
break;
+ case IBE_NODCC:
+ G_AddPredictableEvent( ent, EV_MENU, MN_H_NODCC );
+ break;
+
case IBE_SPWNWARN:
G_AddPredictableEvent( ent, EV_MENU, MN_A_SPWNWARN );
G_buildItem( ent, buildable, origin, ent->s.apos.trBase );