]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Limit g_balance_vore_swallow_limit between 1 and 9. This fixes some small bugs, such...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 7 Jul 2011 12:44:42 +0000 (15:44 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 7 Jul 2011 12:44:42 +0000 (15:44 +0300)
data/balanceVT.cfg
data/qcsrc/server/cl_client.qc
data/qcsrc/server/cl_player.qc
data/qcsrc/server/defs.qh
data/qcsrc/server/miscfunctions.qc
data/qcsrc/server/vore.qc

index 2c559e0af3b4ca67259d10033d2157142be6cc46..083446b7652a1544cfee731ca720cbbb67b0de50 100644 (file)
@@ -186,7 +186,7 @@ set g_balance_grabber_reload_time 2
 \r
 // {{{ stomach\r
 set g_balance_vore_swallow_range 100 "distance below which you can swallow another player when facing them"\r
-set g_balance_vore_swallow_limit 3 "how many players can fit inside a stomach (should not be greater than 3 due to the number of stomach state models for players)"\r
+set g_balance_vore_swallow_limit 3 "how many players can fit in the stomach at a time, may range between 1 and 9"\r
 set g_balance_vore_swallow_stealprey 0.7 "probability of stealing someone's prey when eating them (when true their prey joins your stomach rather than popping out). 0 = never, 1 = always"\r
 set g_balance_vore_swallow_dropweapon 0.6 "probability of dropping your weapon when swallowed. 0 = never and 1 = always, does not apply to team mates"\r
 set g_balance_vore_swallow_punchangle 12 "your view gets tilted by this amount when swallowing someone"\r
index edb58867ff8b954a9a140302702e444521620509..3062930029604e786ba4ae094ad7f8a211c3b141 100644 (file)
@@ -436,9 +436,9 @@ string setmodel_state()
        newmodel_extension = substring(self.playermodel, strlen(self.playermodel) - 4, 4);\r
 \r
        float vore_state;\r
-       if(self.stomach_load > ceil(cvar("g_balance_vore_swallow_limit") * 0.666666666666))\r
+       if(self.stomach_load > ceil(g_balance_vore_swallow_limit * 0.666666666666))\r
                vore_state = 3;\r
-       else if(self.stomach_load > ceil(cvar("g_balance_vore_swallow_limit") * 0.333333333333))\r
+       else if(self.stomach_load > ceil(g_balance_vore_swallow_limit * 0.333333333333))\r
                vore_state = 2;\r
        else if(self.stomach_load)\r
                vore_state = 1;\r
@@ -1043,7 +1043,7 @@ float ClientInit_SendEntity(entity to, float sf)
        WriteByte(MSG_ENTITY, cvar("g_balance_weaponswitchdelay") * 255.0);\r
 \r
        WriteCoord(MSG_ENTITY, cvar("g_vore"));\r
-       WriteCoord(MSG_ENTITY, cvar("g_balance_vore_swallow_limit"));\r
+       WriteCoord(MSG_ENTITY, g_balance_vore_swallow_limit);\r
        return TRUE;\r
 }\r
 \r
index bae973c7701547f19518e21b114ea901caffc3c2..430d6655b9c7f692343153dfcae2031ea690c0a2 100644 (file)
@@ -1336,7 +1336,7 @@ void GlobalSound(string sample, float chan, float voicetype)
                        break;\r
                case VOICETYPE_GURGLE:\r
                        if(self.stomach_load)\r
-                               sound(self, chan, sample, VOL_BASE * self.stomach_load / cvar("g_balance_vore_swallow_limit"), ATTN_NORM);\r
+                               sound(self, chan, sample, VOL_BASE * self.stomach_load / g_balance_vore_swallow_limit, ATTN_NORM);\r
                        else\r
                                stopsound(self, chan);\r
                        break;\r
index ba97835bb809f20864bdfce8f4caecd143c3c6a9..af3fa770879e1dd6bac5269fcf1ca88f0cfd2c08 100644 (file)
@@ -21,6 +21,7 @@ float ctf_score_value(string parameter);
 \r
 float g_dm, g_domination, g_ctf, g_tdm, g_keyhunt, g_onslaught, g_assault, g_arena, g_ca, g_lms, g_race, g_cts, g_rpg;\r
 float g_cloaked, g_footsteps, g_jump_grunt, g_midair, g_norecoil, g_vampire, g_bloodloss;\r
+float g_balance_vore_swallow_limit;\r
 float g_warmup_limit;\r
 float g_warmup_allguns;\r
 float g_warmup_allow_timeout;\r
index 30755d2c62341d86ad206f8feb54b6f15a745085..3a053c192f4d86984426745807d76f0c837af5eb 100644 (file)
@@ -1016,6 +1016,7 @@ void readlevelcvars(void)
        g_norecoil = cvar("g_norecoil");\r
        g_vampire = cvar("g_vampire");\r
        g_bloodloss = cvar("g_bloodloss");\r
+       g_balance_vore_swallow_limit = bound(1, cvar("g_balance_vore_swallow_limit"), 9); // may only range between 1 and 9\r
        sv_maxidle = cvar("sv_maxidle");\r
        sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle");\r
        sv_pogostick = cvar("sv_pogostick");\r
index 388c799a9ad639205b0cc9fdf92330f5a4ded9c3..0b0e01cd115677bd1d5fa31959204123b95d9f1c 100644 (file)
@@ -43,8 +43,8 @@ float Swallow_condition_check(entity prey)
                        swallow_complain = "You cannot swallow your team mates\n";\r
                else if(!cvar("g_vore_spawnshield") && prey.spawnshieldtime > time)\r
                        swallow_complain = "You cannot swallow someone protected by the spawn shield\n";\r
-               else if(self.stomach_load >= cvar("g_balance_vore_swallow_limit"))\r
-                       swallow_complain = strcat("You cannot swallow more than ^2", cvar_string("g_balance_vore_swallow_limit"), "^7 players at a time\n");\r
+               else if(self.stomach_load >= g_balance_vore_swallow_limit)\r
+                       swallow_complain = strcat("You cannot swallow more than ^2", ftos(g_balance_vore_swallow_limit), "^7 players at a time\n");\r
                else if(cvar("g_vore_biggergut") && prey.stomach_load > self.stomach_load)\r
                        swallow_complain = "You cannot swallow someone with a bigger stomach than yours\n";\r
                else if(cvar("g_vore_biggersize") && prey.scale > self.scale)\r