From: MirceaKitsune Date: Tue, 11 Jun 2013 17:26:57 +0000 (+0300) Subject: Clear both prey & pred progress when eating, being eaten, or regurgitating. This... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c65234f37f33aba67abd7ab4d6f04a56f706d63f;p=voretournament%2Fvoretournament.git Clear both prey & pred progress when eating, being eaten, or regurgitating. This fixes your predator's swallow model showing if you eat your pred first instead. It also resets the progress other preds had on you, but it's better this way. Also fix a bug with the camera of the new prey orientation system. --- diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 67b5ebf9..91b1fabc 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -303,6 +303,7 @@ void Vore_Swallow(entity e) e.movetype = MOVETYPE_FOLLOW; e.solid = SOLID_NOT; e.aiment = e.predator; // follow the predator, automatically unset when regurgitated + e.swallow_progress_prey = e.swallow_progress_pred = 0; float scalediff; scalediff = cvar("g_healthsize") ? e.scale / e.predator.scale : 1; // the tighter the gut, the greater the effect @@ -331,6 +332,7 @@ void Vore_Swallow(entity e) e.predator.regurgitate_prepare = 0; e.predator.spawnshieldtime = 0; // lose spawn shield when we vore e.predator.hitsound += 1; // play this for team mates too, as we could be swallowing them to heal them + e.predator.swallow_progress_prey = e.predator.swallow_progress_pred = 0; // this also resets the progress of any predator eating you if you eat him or someone else, it's better this way Vore_SetPreyPositions(e.predator); // block firing for a small amount of time, or we'll be firing the next frame after we swallow @@ -356,7 +358,7 @@ void Vore_SwallowStep(entity e) if(cvar("g_balance_vore_swallow_prey_orient")) { e.punchangle = self.angles - e.angles; - e.punchangle_speed = cvar("g_balance_vore_swallow_prey_orient_speed") * (1 - e.swallow_progress_prey); + e.punchangle_speed = cvar("g_balance_vore_swallow_prey_orient_speed"); } Vore_GulletModel_Update(e, self); @@ -403,6 +405,7 @@ void Vore_Regurgitate(entity e) e.solid = e.vore_oldsolid; e.view_ofs_z = PL_VIEW_OFS_z; e.punchvector_z = -cvar("g_balance_vore_regurgitate_prey_punchvector"); + //e.swallow_progress_prey = e.swallow_progress_pred = 0; // not really needed here // if the prey has been fully digested, silently detach them if(cvar("g_balance_vore_regurgitate_death_silent")) @@ -459,6 +462,7 @@ void Vore_Regurgitate(entity e) e.predator.punchangle_z = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle") * scalediff; e.predator.regurgitate_prepare = 0; e.predator.action_delay = time + cvar("g_balance_vore_action_delay"); + e.predator.swallow_progress_prey = e.predator.swallow_progress_pred = 0; // this also resets the progress of any predator eating you if you regurgitate, it's better this way Vore_SetPreyPositions(e.predator); // block firing for a small amount of time, or we'll be firing the next frame