mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 21:51:09 +00:00
Fix levelshot so that it cannot be executed by remote clients (#4339)
This commit is contained in:
parent
be4e459148
commit
d2612c8a36
1 changed files with 8 additions and 1 deletions
|
@ -392,11 +392,18 @@ void Cmd_LevelShot_f( gentity_t *ent ) {
|
||||||
|
|
||||||
// doesn't work in single player
|
// doesn't work in single player
|
||||||
if ( g_gametype.integer != 0 ) {
|
if ( g_gametype.integer != 0 ) {
|
||||||
trap_SendServerCommand( ent-g_entities,
|
trap_SendServerCommand( ent-g_entities,
|
||||||
"print \"Must be in g_gametype 0 for levelshot\n\"" );
|
"print \"Must be in g_gametype 0 for levelshot\n\"" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!ent->client->pers.localClient)
|
||||||
|
{
|
||||||
|
trap_SendServerCommand(ent-g_entities,
|
||||||
|
"print \"The levelshot command must be executed by a local client\n\"");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
BeginIntermission();
|
BeginIntermission();
|
||||||
trap_SendServerCommand( ent-g_entities, "clientLevelShot" );
|
trap_SendServerCommand( ent-g_entities, "clientLevelShot" );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue