From 30349c5d9d99ac0333a40413d9420cddbc525700 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Mon, 2 May 2011 13:29:41 +0300 Subject: [PATCH] Limit the health below / past which player size may change. --- data/defaultVT.cfg | 2 ++ data/qcsrc/server/cl_client.qc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index ddc86dd2..407073c8 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -1548,6 +1548,8 @@ set g_vore_regurgitatecolor_digest "0.15 0.25 0" "the color players will have wh set g_vore_keepdeadprey 1 "If enabled, prey remains in the stomach after dying, else the predator throws up their dead body. 0 = disabled, 1 = enabled, anything between = probability" set g_healthsize 100 "Players who are low on health shrink and become smaller, value specifies health at which the player has default size" +set g_healthsize_min 25 "Player size may not drop below this amount of health" +set g_healthsize_max 200 "Player size may not grow past this amount of health" // part of an ugly hack for the menu audio sliders to work with the cutsound feature seta menu_volume 0.5 diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 9ca8a4e7..5161d3f6 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -2258,7 +2258,7 @@ void ApplyHealthSize() } else { - self.scale = cvar("g_healthsize") / self.health; + self.scale = cvar("g_healthsize") / bound(cvar("g_healthsize_min"), self.health, cvar("g_healthsize_max")); // The following code sets the bounding box to match the player's size. // It is currently disabled because of issues with engine movement prediction (cl_movement). -- 2.39.2