From e63f81ab616d9455345b6bdc3a0be3da5077a629 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Tue, 2 Aug 2011 17:26:54 +0300 Subject: [PATCH] Make small dead bodies more likely to gib, and large ones less likely --- data/defaultVT.cfg | 2 +- data/qcsrc/server/w_common.qc | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index 40633f0b..38346f64 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -299,7 +299,7 @@ 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 75 "Minus health a dead body must have in order to get gibbed" +set sv_gibhealth -75 "Amount of 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 0 "Enable ping display information, 0 = Never display; 1 = Always display (If the player is a bot, it will say bot instead of the ping.)" diff --git a/data/qcsrc/server/w_common.qc b/data/qcsrc/server/w_common.qc index 9a104946..7998dfb3 100644 --- a/data/qcsrc/server/w_common.qc +++ b/data/qcsrc/server/w_common.qc @@ -485,7 +485,14 @@ void PlayerGib(entity e, entity attacker) if(e.stat_eaten) return; // you can't gib outside of the stomach - if (e.health <= -cvar("sv_gibhealth") && e.modelindex != 0) + float gib_health; + gib_health = cvar("sv_gibhealth"); + if(gib_health > 0) // someone is being stupid + gib_health = 0; + if(cvar("g_healthsize")) // smaller bodies are more likely to gib, and vice versa + gib_health *= e.scale; + + if (e.health <= gib_health && e.modelindex != 0) { // don't use any animations as a gib e.frame = 0; -- 2.39.2