mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-23 12:21:07 +00:00
Reset Metal fume interp state on appear
This commit is contained in:
parent
c3923adc3f
commit
0503c853cc
1 changed files with 4 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
||||||
#include "d_net.h"
|
#include "d_net.h"
|
||||||
#include "g_game.h"
|
#include "g_game.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
|
#include "r_fps.h"
|
||||||
#include "r_main.h"
|
#include "r_main.h"
|
||||||
#include "s_sound.h"
|
#include "s_sound.h"
|
||||||
#include "r_skins.h"
|
#include "r_skins.h"
|
||||||
|
@ -11344,6 +11345,7 @@ static void P_DoMetalJetFume(player_t *player, mobj_t *fume)
|
||||||
tic_t dashmode = min(player->dashmode, DASHMODE_MAX);
|
tic_t dashmode = min(player->dashmode, DASHMODE_MAX);
|
||||||
boolean underwater = mo->eflags & MFE_UNDERWATER;
|
boolean underwater = mo->eflags & MFE_UNDERWATER;
|
||||||
statenum_t stat = fume->state-states;
|
statenum_t stat = fume->state-states;
|
||||||
|
boolean resetinterp = false;
|
||||||
|
|
||||||
if (panim != PA_WALK && panim != PA_RUN && panim != PA_DASH) // turn invisible when not in a coherent movement state
|
if (panim != PA_WALK && panim != PA_RUN && panim != PA_DASH) // turn invisible when not in a coherent movement state
|
||||||
{
|
{
|
||||||
|
@ -11395,6 +11397,7 @@ static void P_DoMetalJetFume(player_t *player, mobj_t *fume)
|
||||||
{
|
{
|
||||||
P_SetMobjState(fume, (stat = fume->info->seestate));
|
P_SetMobjState(fume, (stat = fume->info->seestate));
|
||||||
P_SetScale(fume, mo->scale);
|
P_SetScale(fume, mo->scale);
|
||||||
|
resetinterp = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dashmode > DASHMODE_THRESHOLD && stat != fume->info->seestate) // If in dashmode, grow really big and flash
|
if (dashmode > DASHMODE_THRESHOLD && stat != fume->info->seestate) // If in dashmode, grow really big and flash
|
||||||
|
@ -11438,6 +11441,7 @@ static void P_DoMetalJetFume(player_t *player, mobj_t *fume)
|
||||||
fume->y = mo->y + P_ReturnThrustY(fume, angle, dist);
|
fume->y = mo->y + P_ReturnThrustY(fume, angle, dist);
|
||||||
fume->z = mo->z + heightoffset - (fume->height >> 1);
|
fume->z = mo->z + heightoffset - (fume->height >> 1);
|
||||||
P_SetThingPosition(fume);
|
P_SetThingPosition(fume);
|
||||||
|
if (resetinterp) R_ResetMobjInterpolationState(fume);
|
||||||
|
|
||||||
// If dashmode is high enough, spawn a trail
|
// If dashmode is high enough, spawn a trail
|
||||||
if (player->normalspeed >= skins[player->skin].normalspeed*2)
|
if (player->normalspeed >= skins[player->skin].normalspeed*2)
|
||||||
|
|
Loading…
Reference in a new issue