From a83ea3c0f6121e9ac8ccb59d17cbbbb6ded03cd9 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sun, 31 Jul 2011 21:03:27 +0300 Subject: [PATCH] Add a damage limit down to which dead prey can be digested (so you can't consume a dead body infinitely) --- data/balanceVT.cfg | 2 ++ data/qcsrc/client/Main.qc | 2 +- data/qcsrc/server/vore.qc | 9 +++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/data/balanceVT.cfg b/data/balanceVT.cfg index ded76163..4589e01a 100644 --- a/data/balanceVT.cfg +++ b/data/balanceVT.cfg @@ -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" set g_balance_vore_regurgitate_punchangle 12 "your view gets tilted by this amount when regurgitating someone" set g_balance_vore_digestion_damage 4 "amount of damage applied to victims during digestion" +set g_balance_vore_digestion_limit -25 "prey can be digested down to this amount of health" +set g_balance_vore_digestion_limit_regurgitate 1 "the predator automatically regurgitates prey that has reached the digestion limit" set g_balance_vore_digestion_vampire 1 "amount of health you gain from digestion" 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)" 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" diff --git a/data/qcsrc/client/Main.qc b/data/qcsrc/client/Main.qc index 1fe179af..411b80d1 100644 --- a/data/qcsrc/client/Main.qc +++ b/data/qcsrc/client/Main.qc @@ -1250,7 +1250,7 @@ void Net_ReadOtherPLReport() { float e, ph, pn; e = ReadByte(); - ph = ReadShort(); // not WriteByte because we show minus health too + ph = ReadShort(); // not ReadByte because we show minus health too pn = ReadByte(); if not(playerslots[e]) return; diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index b53642b1..e2919fc9 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -425,6 +425,9 @@ void Vore_Digest() { // apply digestion to prey + if(self.health <= cvar("g_balance_vore_digestion_limit")) + return; + if(time > self.digestion_step) { // if distributed digestion is enabled, reduce digestion strength by the amount of prey in our stomach @@ -797,11 +800,13 @@ void Vore() if(!self.stat_eaten) return; - /*if(self.deadflag != DEAD_NO) // we're dead, do what we must + // automatically regurgitate prey that has reached their digestion limit + if(cvar("g_balance_vore_digestion_limit_regurgitate")) + if(self.health <= cvar("g_balance_vore_digestion_limit")) { Vore_Regurgitate(self); return; - }*/ + } if(self.predator.deadflag != DEAD_NO) // do we want to be in a dead furry x_x { -- 2.39.2