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
{
git-svn-id: svn://svn.icculus.org/nexuiz/trunk@2762
f962a42d-fe04-0410-a3ab-
8c8b0445ebaa