[openjk] 02/09: SP: Fix incorrect null pointer comparison in g_svcmds
Simon McVittie
smcv at debian.org
Tue Mar 14 11:31:23 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian/master
in repository openjk.
commit 701b05ec2ff317b4a541097ecd328837c6714c02
Author: Ensiform <ensiform at gmail.com>
Date: Sun Mar 12 13:13:15 2017 -0500
SP: Fix incorrect null pointer comparison in g_svcmds
---
code/game/g_svcmds.cpp | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/code/game/g_svcmds.cpp b/code/game/g_svcmds.cpp
index 6c2174a..f7d4faa 100644
--- a/code/game/g_svcmds.cpp
+++ b/code/game/g_svcmds.cpp
@@ -222,7 +222,7 @@ static void Svcmd_SaberBlade_f()
gi.Printf( "USAGE: saberblade <sabernum> <bladenum> [0 = off, 1 = on, no arg = toggle]\n" );
return;
}
- if ( &g_entities[0] == NULL || &g_entities[0].client == NULL )
+ if ( &g_entities[0] == NULL || g_entities[0].client == NULL )
{
return;
}
@@ -330,11 +330,6 @@ static void Svcmd_ForceSetLevel_f( int forcePower )
{
return;
}
- if ( !g_cheats->integer )
- {
- gi.SendServerCommand( 0, "print \"Cheats are not enabled on this server.\n\"");
- return;
- }
const char *newVal = gi.argv(1);
if ( !VALIDSTRING( newVal ) )
{
@@ -941,6 +936,7 @@ static svcmd_t svcmds[] = {
{ "control", Svcmd_Control_f, CMD_CHEAT },
{ "grab", Svcmd_Grab_f, CMD_CHEAT },
{ "knockdown", Svcmd_Knockdown_f, CMD_CHEAT },
+
{ "playerModel", Svcmd_PlayerModel_f, CMD_NONE },
{ "playerTint", Svcmd_PlayerTint_f, CMD_NONE },
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/openjk.git
More information about the Pkg-games-commits
mailing list