From d464b470c310c487fd947ba3a7bcecb6454972a9 Mon Sep 17 00:00:00 2001 From: kadaverjack Date: Mon, 3 Apr 2006 23:45:30 +0000 Subject: [PATCH] menu switch for deluxemapping and some console messages for clientcommands git-svn-id: svn://svn.icculus.org/nexuiz/trunk@1220 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/menu/data/effects.menu | 12 ++++++++++++ data/menu/options/effects.menu | 5 +++++ data/qcsrc/server/gamec/clientcommands.c | 5 +++++ data/qcsrc/server/gamec/runematch.c | 7 ++++--- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/data/menu/data/effects.menu b/data/menu/data/effects.menu index 17bcda1a0..de1ac413b 100644 --- a/data/menu/data/effects.menu +++ b/data/menu/data/effects.menu @@ -44,6 +44,18 @@ Item DataContainer Effects [DataLink_OnOffSwitch] } + Item Data_Cvar DeluxeMapping + { + cvarName "r_glsl_deluxemapping" + defValue "1" + + Item DataLink_TextSwitch Switch + { + valueList "'0' '1' '2'" + descList "'Off' 'On' 'Forced'" + link "##up" + } + } Item Data_Cvar RealtimeLights { cvarName "r_shadow_realtime_world" diff --git a/data/menu/options/effects.menu b/data/menu/options/effects.menu index 33d120c25..664b3f718 100644 --- a/data/menu/options/effects.menu +++ b/data/menu/options/effects.menu @@ -46,6 +46,11 @@ Item Window Effects Derive Nex_Line SeperatorRTLights {} + Derive Nex_Option_Switch DeluxeMapping + { + text "Deluxemapping" + target "::Data::Effects::DeluxeMapping::Switch" + } Derive Nex_Option_Switch RealtimeLights { text "Realtime World Lights" diff --git a/data/qcsrc/server/gamec/clientcommands.c b/data/qcsrc/server/gamec/clientcommands.c index 56729962c..5a9faad56 100644 --- a/data/qcsrc/server/gamec/clientcommands.c +++ b/data/qcsrc/server/gamec/clientcommands.c @@ -13,12 +13,16 @@ void SV_ParseClientCommand(string s) { } else if(argv(1) == cvar_string("sv_clientcommands_password")) { self.adminstatus = 1; sprint(self, "You now have remote admin status.\n"); + ServerConsoleEcho(strcat("ClientCommands: ", self.netname, " received admin status"), TRUE); } else { sprint(self, "Wrong password.\n"); // use of -- produces compiler warning in the if() line??? self.adminstatus = self.adminstatus - 1; if(self.adminstatus == 0) + { sprint(self, "You lost remote admin status.\n"); + ServerConsoleEcho(strcat("ClientCommands: ", self.netname, " lost admin status"), TRUE); + } } } else { sprint(self, "Clientside commands NOT allowed.\n"); @@ -33,6 +37,7 @@ void SV_ParseClientCommand(string s) { command = strcat(command, " ", argv(index)); index++; } + ServerConsoleEcho(strcat("ClientCommands: ", self.netname, " issued command '", command, "'"), TRUE); localcmd(command); } else sprint(self, "You don't have remote admin status.\n"); diff --git a/data/qcsrc/server/gamec/runematch.c b/data/qcsrc/server/gamec/runematch.c index 1b4e17969..ccda2dd37 100644 --- a/data/qcsrc/server/gamec/runematch.c +++ b/data/qcsrc/server/gamec/runematch.c @@ -635,14 +635,15 @@ float runematch_point_time; void RuneMatchGivePoints() { entity rune; - + + if(!cvar("g_runematch") || !cvar("g_runematch_pointamt")) + return; + if(gameover) return; if(runematch_point_time > time) return; - if(!cvar("g_runematch") || !cvar("g_runematch_pointamt")) - return; runematch_point_time = time + cvar("g_runematch_pointrate"); -- 2.39.2