From: Mircea Kitsune Date: Sun, 20 Mar 2011 22:53:44 +0000 (+0200) Subject: Cvar the amount of health dead bodies must take in order to get gibbed. I thought... X-Git-Tag: xonotic-v0.5.0~305^2~12^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=28a041f0b53576f06651711d883b30193217d5c3;p=xonotic%2Fxonotic-data.pk3dir.git Cvar the amount of health dead bodies must take in order to get gibbed. I thought this might have some uses, if the cost of one cvar can be accepted for this purpose. Currently defaulted to 100, as that feels best balanced to me. --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index a500cec9e..c31a27b00 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -354,6 +354,8 @@ set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the p set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate" set g_respawn_ghosts_maxtime 6 "maximum amount of time a respawn ghost can last, minimum time is half this value. 0 disables and ghosts fade when the body would" +set sv_gibhealth 100 "Minus health a dead body must have in order to get gibbed" + // fragmessage: This allows extra information to be displayed with the frag centerprints. set sv_fragmessage_information_ping 1 "Enable ping display information, 0 = Never display; 1 = Always display (If the player is a bot, it will say bot instead of the ping.)" set sv_fragmessage_information_handicap 1 "Enable handicap display information, 0 = Never display; 1 = Only when the player has handicap on; 2 = Always display (Displays Off if off)" diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index c78460c17..ddef2e8e8 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -1209,6 +1209,7 @@ float autocvar_sv_warsowbunny_backtosideratio; float autocvar_sv_warsowbunny_topspeed; float autocvar_sv_warsowbunny_turnaccel; string autocvar_sv_weaponstats_file; +float autocvar_sv_gibhealth; float autocvar_sys_ticrate; float autocvar_teamplay_lockonrestart; float autocvar_teamplay_mode; diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index f1d290a9b..035114b25 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -358,7 +358,7 @@ void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float self.dmg_take = self.dmg_take + take;//max(take - 10, 0); self.dmg_inflictor = inflictor; - if (self.health <= -150 && self.modelindex != 0) + if (self.health <= -autocvar_sv_gibhealth && self.modelindex != 0) { // don't use any animations as a gib self.frame = 0;