]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Limit the health below / past which player size may change.
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 2 May 2011 10:29:41 +0000 (13:29 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 2 May 2011 10:29:41 +0000 (13:29 +0300)
data/defaultVT.cfg
data/qcsrc/server/cl_client.qc

index ddc86dd2292cf972312310021df5f0da0a460376..407073c804b12b91f1aba632b5757a8d4ab8390d 100644 (file)
@@ -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"\r
 \r
 set g_healthsize 100 "Players who are low on health shrink and become smaller, value specifies health at which the player has default size"\r
 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"\r
 \r
 set g_healthsize 100 "Players who are low on health shrink and become smaller, value specifies health at which the player has default size"\r
+set g_healthsize_min 25 "Player size may not drop below this amount of health"\r
+set g_healthsize_max 200 "Player size may not grow past this amount of health"\r
 \r
 // part of an ugly hack for the menu audio sliders to work with the cutsound feature\r
 seta menu_volume 0.5\r
 \r
 // part of an ugly hack for the menu audio sliders to work with the cutsound feature\r
 seta menu_volume 0.5\r
index 9ca8a4e7627b0f1991be5c944a4cc4ce611a0b59..5161d3f6987ce66e7b378dfba6e26b21a33fd631 100644 (file)
@@ -2258,7 +2258,7 @@ void ApplyHealthSize()
        }\r
        else\r
        {\r
        }\r
        else\r
        {\r
-               self.scale = cvar("g_healthsize") / self.health;\r
+               self.scale = cvar("g_healthsize") / bound(cvar("g_healthsize_min"), self.health, cvar("g_healthsize_max"));\r
 \r
                // The following code sets the bounding box to match the player's size.\r
                // It is currently disabled because of issues with engine movement prediction (cl_movement).\r
 \r
                // The following code sets the bounding box to match the player's size.\r
                // It is currently disabled because of issues with engine movement prediction (cl_movement).\r