Remove unnecessary precipmobj thinker hack

This commit is contained in:
Eidolon 2022-04-11 18:49:50 -05:00
parent d34ec2ef06
commit 4ee6027180
4 changed files with 4 additions and 28 deletions

View file

@ -5595,16 +5595,6 @@ static void HWR_ProjectPrecipitationSprite(precipmobj_t *thing)
vis->gz = vis->gzt - FIXED_TO_FLOAT(spritecachedinfo[lumpoff].height);
vis->precip = true;
// okay... this is a hack, but weather isn't networked, so it should be ok
if (!(thing->precipflags & PCF_THUNK))
{
if (thing->precipflags & PCF_RAIN)
P_RainThinker(thing);
else
P_SnowThinker(thing);
thing->precipflags |= PCF_THUNK;
}
}
#endif

View file

@ -4021,8 +4021,7 @@ void P_RecalcPrecipInSector(sector_t *sector)
//
void P_NullPrecipThinker(precipmobj_t *mobj)
{
//(void)mobj;
mobj->precipflags &= ~PCF_THUNK;
(void)mobj;
}
void P_SnowThinker(precipmobj_t *mobj)
@ -10976,14 +10975,14 @@ static inline precipmobj_t *P_SpawnRainMobj(fixed_t x, fixed_t y, fixed_t z, mob
{
precipmobj_t *mo = P_SpawnPrecipMobj(x,y,z,type);
mo->precipflags |= PCF_RAIN;
//mo->thinker.function.acp1 = (actionf_p1)P_RainThinker;
mo->thinker.function.acp1 = (actionf_p1)P_RainThinker;
return mo;
}
static inline precipmobj_t *P_SpawnSnowMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
{
precipmobj_t *mo = P_SpawnPrecipMobj(x,y,z,type);
//mo->thinker.function.acp1 = (actionf_p1)P_SnowThinker;
mo->thinker.function.acp1 = (actionf_p1)P_SnowThinker;
return mo;
}

View file

@ -269,8 +269,6 @@ typedef enum {
PCF_MOVINGFOF = 8,
// Is rain.
PCF_RAIN = 16,
// Ran the thinker this tic.
PCF_THUNK = 32,
} precipflag_t;
// Map Object definition.

View file

@ -2292,7 +2292,7 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
if (thing->subsector->sector->cullheight)
{
if (R_DoCulling(thing->subsector->sector->cullheight, viewsector->cullheight, viewz, gz, gzt))
goto weatherthink;
return;
}
// store information in a vissprite
@ -2346,17 +2346,6 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
// Fullbright
vis->colormap = colormaps;
weatherthink:
// okay... this is a hack, but weather isn't networked, so it should be ok
if (!(thing->precipflags & PCF_THUNK))
{
if (thing->precipflags & PCF_RAIN)
P_RainThinker(thing);
else
P_SnowThinker(thing);
thing->precipflags |= PCF_THUNK;
}
}
// R_AddSprites