diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_public.h | 27 | ||||
-rw-r--r-- | src/game/g_active.c | 4 | ||||
-rw-r--r-- | src/game/g_buildable.c | 13 | ||||
-rw-r--r-- | src/game/g_client.c | 6 | ||||
-rw-r--r-- | src/game/g_cmds.c | 24 | ||||
-rw-r--r-- | src/game/g_local.h | 3 | ||||
-rw-r--r-- | src/game/g_weapon.c | 4 |
7 files changed, 53 insertions, 28 deletions
diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 70652f23..ea60c52f 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -516,18 +516,21 @@ typedef enum { typedef enum { MN_TEAM, - MN_DROID, - MN_HUMAN, - MN_ABUILD, - MN_HBUILD, - MN_MCU, - MN_INFEST, - MN_DNOROOM, - MN_HNOROOM, - MN_HNOPOWER, - MN_NOCREEP, - MN_REACTOR, - MN_MCUPOWER + MN_D_CLASS, + MN_D_BUILD, + MN_D_INFEST, + MN_D_NOROOM, + MN_D_NOCREEP, + MN_H_SPAWN, + MN_H_BUILD, + MN_H_MCU, + MN_H_NOROOM, + MN_H_NOPOWER, + MN_H_REACTOR, + MN_H_REPEATER, + MN_H_RPLWARN, + MN_H_RPTWARN, + MN_H_MCUPOWER } dynMenu_t; // animations diff --git a/src/game/g_active.c b/src/game/g_active.c index 514224c9..18da18d7 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -365,11 +365,11 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) { } else if( client->pers.pteam == PTE_DROIDS ) { - G_AddPredictableEvent( ent, EV_MENU, MN_DROID ); + G_AddPredictableEvent( ent, EV_MENU, MN_D_CLASS ); } else if( client->pers.pteam == PTE_HUMANS ) { - G_AddPredictableEvent( ent, EV_MENU, MN_HUMAN ); + G_AddPredictableEvent( ent, EV_MENU, MN_H_SPAWN ); } } diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 5c3cab37..4ca06519 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -311,9 +311,9 @@ void HMCU_Activate( gentity_t *self, gentity_t *other, gentity_t *activator ) if( activator->client->ps.stats[ STAT_PTEAM ] != PTE_HUMANS ) return; if( self->powered ) - G_AddPredictableEvent( activator, EV_MENU, MN_MCU ); + G_AddPredictableEvent( activator, EV_MENU, MN_H_MCU ); else - G_AddPredictableEvent( activator, EV_MENU, MN_MCUPOWER ); + G_AddPredictableEvent( activator, EV_MENU, MN_H_MCUPOWER ); } /* @@ -650,8 +650,13 @@ itemBuildError_t itemFits( gentity_t *ent, buildable_t buildable, int distance ) ) ) { - if( buildable != BA_H_SPAWN && buildable != BA_H_REACTOR && buildable != BA_H_REPEATER ) - reason = IBE_NOPOWER; + if( buildable != BA_H_REACTOR ) + reason = IBE_REPEATER; + + if( buildable == BA_H_SPAWN ) + reason = IBE_RPLWARN; + else if( buildable == BA_H_REPEATER ) + reason = IBE_RPTWARN; } if( BG_FindReactorTestForBuildable( buildable ) ) diff --git a/src/game/g_client.c b/src/game/g_client.c index cb41b37a..15a42ba5 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -542,7 +542,7 @@ void InfestBody( gentity_t *self, gentity_t *other, gentity_t *activator ) { if( activator->client->ps.stats[ STAT_PTEAM ] != PTE_DROIDS ) return; - G_AddPredictableEvent( activator, EV_MENU, MN_INFEST ); + G_AddPredictableEvent( activator, EV_MENU, MN_D_INFEST ); } /* @@ -1275,9 +1275,9 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn ) { if( client->sess.sessionTeam == TEAM_SPECTATOR ) { if( teamLocal == PTE_DROIDS ) - G_AddPredictableEvent( ent, EV_MENU, MN_DROID ); + G_AddPredictableEvent( ent, EV_MENU, MN_D_CLASS ); else if( teamLocal == PTE_HUMANS ) - G_AddPredictableEvent( ent, EV_MENU, MN_HUMAN ); + G_AddPredictableEvent( ent, EV_MENU, MN_H_SPAWN ); } // increment the spawncount so the client will detect the respawn diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 228a0af1..cf7af411 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1925,11 +1925,11 @@ void Cmd_Build_f( gentity_t *ent ) break; case IBE_NOCREEP: - G_AddPredictableEvent( ent, EV_MENU, MN_NOCREEP ); + G_AddPredictableEvent( ent, EV_MENU, MN_D_NOCREEP ); break; case IBE_NOROOM: - G_AddPredictableEvent( ent, EV_MENU, MN_DNOROOM ); + G_AddPredictableEvent( ent, EV_MENU, MN_D_NOROOM ); break; } } @@ -1951,15 +1951,29 @@ void Cmd_Build_f( gentity_t *ent ) break; case IBE_REACTOR: - G_AddPredictableEvent( ent, EV_MENU, MN_REACTOR ); + G_AddPredictableEvent( ent, EV_MENU, MN_H_REACTOR ); + break; + + case IBE_REPEATER: + G_AddPredictableEvent( ent, EV_MENU, MN_H_REPEATER ); break; case IBE_NOROOM: - G_AddPredictableEvent( ent, EV_MENU, MN_HNOROOM ); + G_AddPredictableEvent( ent, EV_MENU, MN_H_NOROOM ); break; case IBE_NOPOWER: - G_AddPredictableEvent( ent, EV_MENU, MN_HNOPOWER ); + G_AddPredictableEvent( ent, EV_MENU, MN_H_NOPOWER ); + break; + + case IBE_RPLWARN: + G_AddPredictableEvent( ent, EV_MENU, MN_H_RPLWARN ); + Build_Item( ent, buildable, 80 ); + break; + + case IBE_RPTWARN: + G_AddPredictableEvent( ent, EV_MENU, MN_H_RPTWARN ); + Build_Item( ent, buildable, 80 ); break; } } diff --git a/src/game/g_local.h b/src/game/g_local.h index 2236e0d8..b6c0aeb1 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -483,6 +483,9 @@ typedef enum IBE_NOROOM, IBE_NOCREEP, IBE_REACTOR, + IBE_REPEATER, + IBE_RPLWARN, + IBE_RPTWARN, IBE_NOPOWER, IBE_MAXERRORS diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index f378212a..fb2a85ee 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -593,7 +593,7 @@ Weapon_Abuild_Fire */ void Weapon_Abuild_Fire( gentity_t *ent ) { - G_AddPredictableEvent( ent, EV_MENU, MN_ABUILD ); + G_AddPredictableEvent( ent, EV_MENU, MN_D_BUILD ); } /* @@ -603,7 +603,7 @@ Weapon_Hbuild_Fire */ void Weapon_Hbuild_Fire( gentity_t *ent ) { - G_AddPredictableEvent( ent, EV_MENU, MN_HBUILD ); + G_AddPredictableEvent( ent, EV_MENU, MN_H_BUILD ); } ///////build weapons |