From 1317ef4495f01db72be7e4b9055fbde57ca7abbf Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Thu, 9 Sep 2010 19:43:46 +0300 Subject: [PATCH] Two new RPg settings. The first one allows anyone to leave their predator in the RPG gametype (like leaving a team mate in team games). The seconds causes bots to not attack you in RPG, but still swallow you (without digesting you). --- data/defaultVoretournament.cfg | 2 ++ data/qcsrc/server/bot/havocbot/vore_ai.qc | 7 ++++++- data/qcsrc/server/vore.qc | 9 +++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/data/defaultVoretournament.cfg b/data/defaultVoretournament.cfg index 050f8d30..4d5a73fd 100644 --- a/data/defaultVoretournament.cfg +++ b/data/defaultVoretournament.cfg @@ -608,6 +608,8 @@ seta g_cts 0 "CTS: complete the stage" // rpg seta g_rpg 0 "RPG: RolePlay / Free Roam gametype" +set g_rpg_canleave 1 "when enabled, anyone can leave a predator's stomach in RPG (like leaving a team mate in team games)" +set g_rpg_botattack 0 "when disabled, bots won't attack anyone in RPG (but will still swallow them harmlessly)" // server game balance settings // powerup balance settings diff --git a/data/qcsrc/server/bot/havocbot/vore_ai.qc b/data/qcsrc/server/bot/havocbot/vore_ai.qc index 89800689..ea03a965 100644 --- a/data/qcsrc/server/bot/havocbot/vore_ai.qc +++ b/data/qcsrc/server/bot/havocbot/vore_ai.qc @@ -138,6 +138,7 @@ void Vore_AI() else if(!self.digesting) { // the higher the skill, the faster bots will start to digest you + if not(g_rpg && !cvar("g_rpg_botattack")) if(skill >= randomtry_pred) self.BUTTON_DIGEST = TRUE; // digest @@ -153,6 +154,7 @@ void Vore_AI() if(self.predator.classname == "player" && time > self.decide_prey) { + if not(g_rpg && !cvar("g_rpg_botattack")) if not(teams_matter && self.team == self.predator.team) { // the higher the skill, the more the bot will kick in your stomack @@ -167,7 +169,10 @@ void Vore_AI() if(self.predator.digesting) // our predator is digesting, so get out of him regardless of who he is self.BUTTON_JUMP = TRUE; // leave else if not(teams_matter && self.team == self.predator.team && cvar("g_balance_vore_teamheal") && self.health < cvar("g_balance_vore_teamheal_stable")) // we are being team healed, don't leave - self.BUTTON_JUMP = TRUE; // leave + { + if not(g_rpg && !cvar("g_rpg_botattack")) + self.BUTTON_JUMP = TRUE; // leave + } } self.decide_prey = time + decide_prey_time; // time before the bot decides what to do with their predator diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 826cd34c..63a7bb1c 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -62,8 +62,13 @@ float Swallow_condition_check(entity prey) float Vore_CanLeave() { - if(teams_matter && self.team == self.predator.team) - return TRUE; + if(self.predator.classname == "player") + { + if(teams_matter && self.team == self.predator.team) + return TRUE; + if(g_rpg && cvar("g_rpg_canleave")) + return TRUE; + } return FALSE; } -- 2.39.2