From: MirceaKitsune Date: Mon, 2 May 2011 10:29:41 +0000 (+0300) Subject: Limit the health below / past which player size may change. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=30349c5d9d99ac0333a40413d9420cddbc525700;p=voretournament%2Fvoretournament.git Limit the health below / past which player size may change. --- 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).