]> git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Clear both prey & pred progress when eating, being eaten, or regurgitating. This...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 11 Jun 2013 17:26:57 +0000 (20:26 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 11 Jun 2013 17:26:57 +0000 (20:26 +0300)
Also fix a bug with the camera of the new prey orientation system.

data/qcsrc/server/vore.qc

index 67b5ebf90eba4486bff076d6a775b05e68b33b4b..91b1fabc57573d1511b855fce218411b7acb6373 100644 (file)
@@ -303,6 +303,7 @@ void Vore_Swallow(entity e)
        e.movetype = MOVETYPE_FOLLOW;\r
        e.solid = SOLID_NOT;\r
        e.aiment = e.predator; // follow the predator, automatically unset when regurgitated\r
+       e.swallow_progress_prey = e.swallow_progress_pred = 0;\r
 \r
        float scalediff;\r
        scalediff = cvar("g_healthsize") ? e.scale / e.predator.scale : 1; // the tighter the gut, the greater the effect\r
@@ -331,6 +332,7 @@ void Vore_Swallow(entity e)
        e.predator.regurgitate_prepare = 0;\r
        e.predator.spawnshieldtime = 0; // lose spawn shield when we vore\r
        e.predator.hitsound += 1; // play this for team mates too, as we could be swallowing them to heal them\r
+       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\r
        Vore_SetPreyPositions(e.predator);\r
 \r
        // block firing for a small amount of time, or we'll be firing the next frame after we swallow\r
@@ -356,7 +358,7 @@ void Vore_SwallowStep(entity e)
        if(cvar("g_balance_vore_swallow_prey_orient"))\r
        {\r
                e.punchangle = self.angles - e.angles;\r
-               e.punchangle_speed = cvar("g_balance_vore_swallow_prey_orient_speed") * (1 - e.swallow_progress_prey);\r
+               e.punchangle_speed = cvar("g_balance_vore_swallow_prey_orient_speed");\r
        }\r
 \r
        Vore_GulletModel_Update(e, self);\r
@@ -403,6 +405,7 @@ void Vore_Regurgitate(entity e)
                e.solid = e.vore_oldsolid;\r
        e.view_ofs_z = PL_VIEW_OFS_z;\r
        e.punchvector_z = -cvar("g_balance_vore_regurgitate_prey_punchvector");\r
+       //e.swallow_progress_prey = e.swallow_progress_pred = 0; // not really needed here\r
 \r
        // if the prey has been fully digested, silently detach them\r
        if(cvar("g_balance_vore_regurgitate_death_silent"))\r
@@ -459,6 +462,7 @@ void Vore_Regurgitate(entity e)
        e.predator.punchangle_z = crandom() * cvar("g_balance_vore_regurgitate_predator_punchangle") * scalediff;\r
        e.predator.regurgitate_prepare = 0;\r
        e.predator.action_delay = time + cvar("g_balance_vore_action_delay");\r
+       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\r
        Vore_SetPreyPositions(e.predator);\r
 \r
        // block firing for a small amount of time, or we'll be firing the next frame\r