From: Martin Taibr Date: Fri, 30 Dec 2016 02:06:00 +0000 (+0100) Subject: simplify cl_handicap, update description X-Git-Tag: xonotic-v0.8.2~342^2~4 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=936ebc01eabd13eec1ed8040aaa4b984f3dda898;ds=sidebyside simplify cl_handicap, update description --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index bf35a4189e..b2683e2d0b 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1072,7 +1072,7 @@ alias gl_flashblend_update "_gl_flashblend_update_$r_shadow_realtime_dlight$r_sh set sv_clones 0 "number of clones a player may make (reset by the \"kill\" command)" -set cl_handicap 1 "the higher, the more damage you will receive (client setting) NOTE: reconnect or use sendcvar command to update the choice." +set cl_handicap 1 "multiplies damage received and divides damage dealt NOTE: reconnect or use 'sendcvar cl_handicap' to update the choice." seta cl_clippedspectating 1 "movement collision for spectators so that you can't pass through walls and such. (client setting) NOTE: reconnect or use sendcvar command to update the choice." diff --git a/qcsrc/server/player.qc b/qcsrc/server/player.qc index 9cccbe887a..59f0c8029b 100644 --- a/qcsrc/server/player.qc +++ b/qcsrc/server/player.qc @@ -318,9 +318,9 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, if(!DEATH_ISSPECIAL(deathtype)) { - damage *= sqrt(bound(1.0, this.cvar_cl_handicap, 100.0)); + damage *= bound(1.0, this.cvar_cl_handicap, 10.0); if(this != attacker) - damage /= sqrt(bound(1.0, attacker.cvar_cl_handicap, 100.0)); + damage /= bound(1.0, attacker.cvar_cl_handicap, 10.0); } if (time < this.spawnshieldtime && autocvar_g_spawnshield_blockdamage < 1)