]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
simplify cl_handicap, update description
authorMartin Taibr <taibr.martin@gmail.com>
Fri, 30 Dec 2016 02:06:00 +0000 (03:06 +0100)
committerMartin Taibr <taibr.martin@gmail.com>
Fri, 30 Dec 2016 02:06:00 +0000 (03:06 +0100)
defaultXonotic.cfg
qcsrc/server/player.qc

index bf35a4189ef44d0fb966bdf8ae93a94c33db6122..b2683e2d0b49e9210a7d854c0d1afed8ef7f6f39 100644 (file)
@@ -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."
 
index 9cccbe887a87790aa49ce0b8ac1b9a32e8304483..59f0c8029b7ab89f9a01458687631a5951e07c64 100644 (file)
@@ -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)