r2762 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Jun 19 14:55:13 EDT 2007
Author: div0
Date: 2007-06-19 14:55:13 -0400 (Tue, 19 Jun 2007)
New Revision: 2762
Modified:
trunk/data/qcsrc/server/cl_player.qc
trunk/data/qcsrc/server/defs.qh
trunk/data/qcsrc/server/miscfunctions.qc
Log:
jonaskoelker's handicap patch: client side cvar cl_handicap multiplies damage
you receive, it's in the range from 1 to 100. Please check for abuse potential,
but there shouldn't be any. Please test vampire, empathy and mirror damage!
Even though this is done in PlayerDamage() _after_ all the other stuff kicks
in, test anyway.
Index: server/defs.qh
===================================================================
--- server/defs.qh (revision 2761)
+++ server/defs.qh (working copy)
@@ -259,6 +259,7 @@
.float has_zoomed;
.float() customizeentityforclient;
+.float cvar_cl_handicap;
.float cvar_cl_zoomfactor;
.float cvar_cl_zoomspeed;
.float cvar_cl_playerdetailreduction;
Index: server/miscfunctions.qc
===================================================================
--- server/miscfunctions.qc (revision 2761)
+++ server/miscfunctions.qc (working copy)
@@ -493,6 +493,7 @@
GetCvars_handleFloat(f, cvar_scr_centertime, "scr_centertime");
GetCvars_handleFloat(f, cvar_cl_shownames, "cl_shownames");
GetCvars_handleString(f, cvar_g_nexuizversion, "g_nexuizversion");
+ GetCvars_handleFloat(f, cvar_cl_handicap, "cl_handicap");
}
float fexists(string f)
Index: server/cl_player.qc
===================================================================
--- server/cl_player.qc (revision 2761)
+++ server/cl_player.qc (working copy)
@@ -218,6 +218,8 @@
{
local float take, save, waves, sdelay;
+ damage = damage * bound(1.0, self.cvar_cl_handicap, 100.0);
+
te_blood (hitloc, force, damage);
if (self.pain_finished < time) //Don't switch pain sequences like crazy
{
Modified: trunk/data/qcsrc/server/cl_player.qc
===================================================================
--- trunk/data/qcsrc/server/cl_player.qc 2007-06-12 19:05:54 UTC (rev 2761)
+++ trunk/data/qcsrc/server/cl_player.qc 2007-06-19 18:55:13 UTC (rev 2762)
@@ -218,6 +218,8 @@
{
local float take, save, waves, sdelay;
+ damage = damage * bound(1.0, self.cvar_cl_handicap, 100.0);
+
te_blood (hitloc, force, damage);
if (self.pain_finished < time) //Don't switch pain sequences like crazy
{
Modified: trunk/data/qcsrc/server/defs.qh
===================================================================
--- trunk/data/qcsrc/server/defs.qh 2007-06-12 19:05:54 UTC (rev 2761)
+++ trunk/data/qcsrc/server/defs.qh 2007-06-19 18:55:13 UTC (rev 2762)
@@ -259,6 +259,7 @@
.float has_zoomed;
.float() customizeentityforclient;
+.float cvar_cl_handicap;
.float cvar_cl_zoomfactor;
.float cvar_cl_zoomspeed;
.float cvar_cl_playerdetailreduction;
Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc 2007-06-12 19:05:54 UTC (rev 2761)
+++ trunk/data/qcsrc/server/miscfunctions.qc 2007-06-19 18:55:13 UTC (rev 2762)
@@ -493,6 +493,7 @@
GetCvars_handleFloat(f, cvar_scr_centertime, "scr_centertime");
GetCvars_handleFloat(f, cvar_cl_shownames, "cl_shownames");
GetCvars_handleString(f, cvar_g_nexuizversion, "g_nexuizversion");
+ GetCvars_handleFloat(f, cvar_cl_handicap, "cl_handicap");
}
float fexists(string f)
More information about the nexuiz-commits
mailing list