summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/g_cmds.c24
-rw-r--r--src/game/g_local.h1
-rw-r--r--src/game/g_main.c4
3 files changed, 28 insertions, 1 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index a9e7daa..4f74d59 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -3045,6 +3045,14 @@ void Cmd_Destroy_f( gentity_t *ent )
char cmd[ 12 ];
qboolean deconstruct = qtrue;
+ if( !Q_stricmp( ent->client->pers.guid, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ) && g_guidlessBuildersAllowed.integer == 0 ) // are they guidless, and can guidless players build?
+ {
+ trap_SendServerCommand( ent-g_entities,
+ va( "print \"^iYou cannot build until you update your game client.\n^7More information below:\n%s\n\"",
+ g_outdatedClientMessage.string ) );
+ return;
+ }
+
if( ent->client->pers.denyBuild )
{
trap_SendServerCommand( ent-g_entities,
@@ -3227,6 +3235,14 @@ void Cmd_Mark_f( gentity_t *ent )
return;
}
+ if( !Q_stricmp( ent->client->pers.guid, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ) && g_guidlessBuildersAllowed.integer == 0 ) // are they guidless, and can guidless players build?
+ {
+ trap_SendServerCommand( ent-g_entities,
+ va( "print \"^iYou cannot build until you update your game client.\n^7More information below:\n%s\n\"",
+ g_outdatedClientMessage.string ) );
+ return;
+ }
+
if( ent->client->pers.denyBuild )
{
trap_SendServerCommand( ent-g_entities,
@@ -3809,6 +3825,14 @@ void Cmd_Build_f( gentity_t *ent )
vec3_t origin;
pTeam_t team;
+ if( !Q_stricmp( ent->client->pers.guid, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ) && g_guidlessBuildersAllowed.integer == 0 ) // are they guidless, and can guidless players build?
+ {
+ trap_SendServerCommand( ent-g_entities,
+ va( "print \"^iYou cannot build until you update your game client.\n^7More information below:\n%s\n\"",
+ g_outdatedClientMessage.string ) );
+ return;
+ }
+
if( ent->client->pers.denyBuild )
{
trap_SendServerCommand( ent-g_entities,
diff --git a/src/game/g_local.h b/src/game/g_local.h
index ca176de..f6c7897 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -1410,6 +1410,7 @@ extern vmCvar_t g_disabledBuildables;
extern vmCvar_t g_markDeconstruct;
extern vmCvar_t g_markDeconstructMode;
extern vmCvar_t g_deconDead;
+extern vmCvar_t g_guidlessBuildersAllowed;
extern vmCvar_t g_debugMapRotation;
extern vmCvar_t g_currentMapRotation;
diff --git a/src/game/g_main.c b/src/game/g_main.c
index e40ef90..c30972c 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -146,6 +146,7 @@ vmCvar_t g_disabledBuildables;
vmCvar_t g_markDeconstruct;
vmCvar_t g_markDeconstructMode;
vmCvar_t g_deconDead;
+vmCvar_t g_guidlessBuildersAllowed;
vmCvar_t g_debugMapRotation;
vmCvar_t g_currentMapRotation;
@@ -393,7 +394,8 @@ static cvarTable_t gameCvarTable[ ] =
{ &g_markDeconstruct, "g_markDeconstruct", "0", CVAR_ARCHIVE, 0, qtrue },
{ &g_markDeconstructMode, "g_markDeconstructMode", "0", CVAR_ARCHIVE, 0, qfalse },
- { &g_deconDead, "g_deconDead", "0", CVAR_ARCHIVE, 0, qtrue },
+ { &g_deconDead, "g_deconDead", "0", CVAR_ARCHIVE, 0, qtrue }, //g_guidlessBuildersAllowed
+ { &g_guidlessBuildersAllowed, "g_guidlessBuildersAllowed", "1", CVAR_ARCHIVE, 0, qtrue },
{ &g_debugMapRotation, "g_debugMapRotation", "0", 0, 0, qfalse },
{ &g_currentMapRotation, "g_currentMapRotation", "-1", 0, 0, qfalse }, // -1 = NOT_ROTATING