]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Add a damage limit down to which dead prey can be digested (so you can't consume...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 31 Jul 2011 18:03:27 +0000 (21:03 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 31 Jul 2011 18:03:27 +0000 (21:03 +0300)
data/balanceVT.cfg
data/qcsrc/client/Main.qc
data/qcsrc/server/vore.qc

index ded761637f7351eb1c45fbe04042ab258cb5c42f..4589e01ab66523a847dd5e6a04f6a12e8fbcb2a3 100644 (file)
@@ -210,6 +210,8 @@ set g_balance_vore_regurgitate_predatorforce 450 "players are pushed back by thi
 set g_balance_vore_regurgitate_delay 0.5 "regurgitation delay"\r
 set g_balance_vore_regurgitate_punchangle 12 "your view gets tilted by this amount when regurgitating someone"\r
 set g_balance_vore_digestion_damage 4 "amount of damage applied to victims during digestion"\r
+set g_balance_vore_digestion_limit -25 "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_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 1fe179af70338ab9c2f557a5433437d50cc0ac4f..411b80d110241e4d0a6ed12fb0ba35310bc35441 100644 (file)
@@ -1250,7 +1250,7 @@ void Net_ReadOtherPLReport()
 {\r
        float e, ph, pn;\r
        e = ReadByte();\r
-       ph = ReadShort(); // not WriteByte because we show minus health too\r
+       ph = ReadShort(); // not ReadByte because we show minus health too\r
        pn = ReadByte();\r
        if not(playerslots[e])\r
                return;\r
index b53642b1461c761396c642e33e8416ae93e1a5d5..e2919fc9077ddb5cf401e352fca2763778b61c05 100644 (file)
@@ -425,6 +425,9 @@ void Vore_Digest()
 {\r
        // apply digestion to prey\r
 \r
+       if(self.health <= cvar("g_balance_vore_digestion_limit"))\r
+               return;\r
+\r
        if(time > self.digestion_step)\r
        {\r
                // if distributed digestion is enabled, reduce digestion strength by the amount of prey in our stomach\r
@@ -797,11 +800,13 @@ void Vore()
        if(!self.stat_eaten)\r
                return;\r
 \r
-       /*if(self.deadflag != DEAD_NO) // we're dead, do what we must\r
+       // automatically regurgitate prey that has reached their digestion limit\r
+       if(cvar("g_balance_vore_digestion_limit_regurgitate"))\r
+       if(self.health <= cvar("g_balance_vore_digestion_limit"))\r
        {\r
                Vore_Regurgitate(self);\r
                return;\r
-       }*/\r
+       }\r
 \r
        if(self.predator.deadflag != DEAD_NO) // do we want to be in a dead furry x_x\r
        {\r