]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/vore.qc
Apply the bot offset to the swallow speed as well, not only damage. This hides the...
[voretournament/voretournament.git] / data / qcsrc / server / vore.qc
index f88b245bf010e05212504b90af9d187ebf23b64e..04433508b43ad5398659ee8651c08d44cea63f81 100644 (file)
@@ -361,6 +361,17 @@ void Vore_SwallowStep(entity e)
                if(cvar("g_balance_vore_swallow_speed_fill_stomachload") && e.stomach_load) // fill rate is influenced by the prey's stomach load\r
                        fill *= (1 - ((e.stomach_load / e.stomach_maxload) * bound(0, cvar("g_balance_vore_swallow_speed_fill_stomachload"), 1)));\r
 \r
+               // skill-based speed offset for bots\r
+               if(skill && cvar("skill_damage"))\r
+               {\r
+                       float ofs;\r
+                       ofs = pow(skill / cvar("skill_damage_center"), cvar("skill_damage"));\r
+                       if(clienttype(self) == CLIENTTYPE_BOT)\r
+                               fill *= ofs;\r
+                       if(clienttype(e) == CLIENTTYPE_BOT)\r
+                               fill /= ofs;\r
+               }\r
+\r
                e.swallow_progress_prey += fill;\r
        }\r
        else\r