summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_public.h1
-rw-r--r--src/game/g_buildable.c6
-rw-r--r--src/game/g_cmds.c9
-rw-r--r--src/game/g_local.h3
4 files changed, 15 insertions, 4 deletions
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 5ddcf076..8405336f 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -601,6 +601,7 @@ typedef enum
MN_B_NOROOM,
MN_B_NORMAL,
MN_B_CANNOT,
+ MN_B_LASTSPAWN,
MN_B_SUDDENDEATH,
MN_B_REVOKED,
MN_B_SURRENDER,
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index f37c64fe..dfefb0be 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -2916,7 +2916,7 @@ static itemBuildError_t G_SufficientBPAvailable( buildable_t buildable,
// Make sure we're not removing the last spawn
if( !g_cheats.integer && remainingSpawns > 0 && ( remainingSpawns - spawnCount ) < 1 )
- return bpError;
+ return IBE_LASTSPAWN;
// Not enough points yielded
if( pointsYielded < buildPoints )
@@ -3424,6 +3424,10 @@ qboolean G_BuildIfValid( gentity_t *ent, buildable_t buildable )
G_TriggerMenu( ent->client->ps.clientNum, MN_H_RPTPOWERHERE );
return qfalse;
+ case IBE_LASTSPAWN:
+ G_TriggerMenu( ent->client->ps.clientNum, MN_B_LASTSPAWN );
+ return qfalse;
+
default:
break;
}
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 5b802f4d..2c5a9764 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1715,8 +1715,7 @@ void Cmd_Destroy_f( gentity_t *ent )
if( ent->client->pers.denyBuild )
{
- trap_SendServerCommand( ent-g_entities,
- "print \"Your building rights have been revoked\n\"" );
+ G_TriggerMenu( ent->client->ps.clientNum, MN_B_REVOKED );
return;
}
@@ -1762,13 +1761,19 @@ void Cmd_Destroy_f( gentity_t *ent )
traceEnt->s.modelindex == BA_A_SPAWN )
{
if( level.numAlienSpawns <= 1 )
+ {
+ G_TriggerMenu( ent->client->ps.clientNum, MN_B_LASTSPAWN );
return;
+ }
}
else if( ent->client->pers.teamSelection == PTE_HUMANS &&
traceEnt->s.modelindex == BA_H_SPAWN )
{
if( level.numHumanSpawns <= 1 )
+ {
+ G_TriggerMenu( ent->client->ps.clientNum, MN_B_LASTSPAWN );
return;
+ }
}
}
diff --git a/src/game/g_local.h b/src/game/g_local.h
index 2a70b514..4e4fb523 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -725,7 +725,7 @@ typedef enum
IBE_ONEREACTOR,
IBE_NOPOWERHERE,
- IBE_TNODEWARN, // not currently sued
+ IBE_TNODEWARN, // not currently used
IBE_RPTNOREAC,
IBE_RPTPOWERHERE,
IBE_NOHUMANBP,
@@ -734,6 +734,7 @@ typedef enum
IBE_NORMAL, // too steep
IBE_NOROOM,
IBE_PERMISSION,
+ IBE_LASTSPAWN,
IBE_MAXERRORS
} itemBuildError_t;