]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Adapt the speedcap to the new system
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 18 Jul 2011 13:06:44 +0000 (16:06 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 18 Jul 2011 13:06:44 +0000 (16:06 +0300)
data/balanceVT.cfg
data/qcsrc/server/vore.qc

index bafb2691ebcb687debdd06f5a1f5122266bafcd1..a444577f217fcbc2d256cd8dd1511c68682c6b6d 100644 (file)
@@ -188,7 +188,7 @@ set g_balance_grabber_reload_time 2
 set g_balance_vore_load_pred_capacity 100 "capacity percent a player's stomach has, influenced by player size"\r
 set g_balance_vore_load_pred_weight 1 "you get this heavier the more you eat, at 1 each meal makes you two times heavier"\r
 set g_balance_vore_load_pred_speed 0.0015 "you get this slower the more you eat, at 0.5 each meal makes you two times slower"\r
-set g_balance_vore_load_pred_speedcap 34 "when a predator is going faster than this, their prey is squeezed out of them, multiplied by stomach load"\r
+set g_balance_vore_load_pred_speedcap 400 "when a predator is going faster than this (at full stomach capacity), their prey is squeezed out of them"\r
 set g_balance_vore_load_prey_mass 30 "prey mass, influenced by player size"\r
 set g_balance_vore_swallow_range 140 "distance below which you can swallow another player when facing them"\r
 set g_balance_vore_swallow_speed_fill 2.5 "how long it takes to swallow a player, 0 is instant"\r
index 968f3711b7e62643966332260c3fc5d68f6d93ae..771203bd47b67b6470d03ebdcb663266043dcd74 100644 (file)
@@ -40,7 +40,7 @@ float Swallow_condition_check(entity prey)
        if(prey.classname == "player" && !prey.stat_eaten && prey.deadflag == DEAD_NO) // we can't swallow someone who's already in someone else's stomach\r
        if(self.classname == "player" && !self.stat_eaten && self.deadflag == DEAD_NO) // we can't swallow players while inside someone's stomach ourselves\r
        if(!self.BUTTON_REGURGITATE && time > self.action_delay)\r
-       if not(cvar("g_balance_vore_load_pred_speedcap") && vlen(self.velocity) > cvar("g_balance_vore_load_pred_speedcap") / (self.stomach_maxload / self.stomach_load))\r
+       if not(cvar("g_balance_vore_load_pred_speedcap") && vlen(self.velocity) >= (self.stomach_load / self.stomach_maxload) / cvar("g_balance_vore_load_pred_speedcap"))\r
        {\r
                string swallow_complain;\r
                if(teams_matter && prey.team == self.team && !cvar("g_vore_teamvore"))\r
@@ -183,6 +183,12 @@ void Vore_StomachLoad_Apply()
        entity e;\r
        float vore_mass;\r
 \r
+       // apply the stomach capacity of the predator\r
+       self.stomach_maxload = cvar("g_balance_vore_load_pred_capacity");\r
+       if(cvar("g_healthsize"))\r
+               self.stomach_maxload *= self.scale;\r
+       self.stomach_maxload = floor(self.stomach_maxload);\r
+\r
        self.stomach_load = 0; // start from zero\r
        FOR_EACH_PLAYER(e)\r
        {\r
@@ -195,12 +201,6 @@ void Vore_StomachLoad_Apply()
                }\r
        }\r
 \r
-       // apply the stomach capacity of the predator\r
-       self.stomach_maxload = cvar("g_balance_vore_load_pred_capacity");\r
-       if(cvar("g_healthsize"))\r
-               self.stomach_maxload *= self.scale;\r
-       self.stomach_maxload = floor(self.stomach_maxload);\r
-\r
        // apply weight\r
        self.gravity = 1 + (self.stomach_load / self.stomach_maxload) * cvar("g_balance_vore_load_pred_weight");\r
        if(!self.gravity && self.stomach_load)\r
@@ -884,7 +884,7 @@ void Vore()
 \r
        if(self.predator.deadflag != DEAD_NO)\r
                Vore_Regurgitate(self);\r
-       else if(cvar("g_balance_vore_load_pred_speedcap") && vlen(self.predator.velocity) > cvar("g_balance_vore_load_pred_speedcap") / (self.stomach_maxload / self.stomach_load))\r
+       else if(cvar("g_balance_vore_load_pred_speedcap") && vlen(self.velocity) >= (self.stomach_load / self.stomach_maxload) / cvar("g_balance_vore_load_pred_speedcap"))\r
                Vore_Regurgitate(self);\r
 \r
        // apply delayed regurgitating if it was scheduled\r