]> git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Don't allow prey that's still being digested to respawn
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 31 Jul 2011 18:38:21 +0000 (21:38 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 31 Jul 2011 18:38:21 +0000 (21:38 +0300)
data/balanceVT.cfg
data/qcsrc/server/cl_client.qc

index 95fd1446d976561e2894bc0e61cc4ca81b30d3f2..0270dafb6b9d1fb1bcabfb4b117c4249f19e3412 100644 (file)
@@ -213,6 +213,7 @@ set g_balance_vore_digestion_damage 4 "amount of damage applied to victims durin
 set g_balance_vore_digestion_damage_death 2 "amplify digestion damage by this amount when the prey is dead"\r
 set g_balance_vore_digestion_limit -100 "prey can be digested down to this amount of health"\r
 set g_balance_vore_digestion_limit_regurgitate 1 "the predator automatically regurgitates prey that has reached the digestion limit"\r
+set g_balance_vore_digestion_limit_blockrespawn 1 "dead prey cannot respawn if it's still being digested"\r
 set g_balance_vore_digestion_vampire 1 "amount of health you gain from digestion"\r
 set g_balance_vore_digestion_vampire_stable 150 "maximum amount of health you can gain from digestion (best kept equal or less than g_balance_health_rotstable)"\r
 set g_balance_vore_digestion_distribute 1 "if enabled, digestion is reduced by the amount of prey you have. eg: having 2 prey will reduce digestion strength by 2"\r
index d735eb09a5d62ee3f6b47db377de81b23262d424..8a5030532ddb94d732942840801aa113c42421fa 100644 (file)
@@ -1742,6 +1742,11 @@ void UpdateChatBubble()
 .float oldcolormap;\r
 void respawn(void)\r
 {\r
+       // don't allow respawing if the prey is still digesting\r
+       if(cvar("g_balance_vore_digestion_limit_blockrespawn"))\r
+       if(self.predator.digesting && self.health > cvar("g_balance_vore_digestion_limit"))\r
+               return;\r
+\r
        if(self.alpha >= 0 && self.modelindex != 0 && cvar("g_respawn_ghosts"))\r
        {\r
                self.solid = SOLID_NOT;\r