fix precip not propely accounting for moving fofs (again)
idk if i want this outside of lugstuff since this may make precip run worse again
This commit is contained in:
1 parent
1ad92f021a
commit
172d99312a
1 file changed
+3
-7
+3
-7
@@ -3593,7 +3593,7 @@ animonly:
|
||||
}
|
||||
}
|
||||
|
||||
static void P_CalculatePrecipFloor(precipmobj_t *mobj, boolean spawn)
|
||||
static void P_CalculatePrecipFloor(precipmobj_t *mobj)
|
||||
{
|
||||
// recalculate floorz each time
|
||||
const sector_t *sec;
|
||||
@@ -3603,10 +3603,6 @@ static void P_CalculatePrecipFloor(precipmobj_t *mobj, boolean spawn)
|
||||
else
|
||||
return;
|
||||
|
||||
// no need to recalc anything if not moved
|
||||
if (!spawn && !sec->moved)
|
||||
return;
|
||||
|
||||
mobj->floorz = P_GetSectorFloorZAt(sec, mobj->x, mobj->y);
|
||||
|
||||
if (sec->ffloors)
|
||||
@@ -3699,7 +3695,7 @@ boolean P_PrecipThinker(precipmobj_t *mobj)
|
||||
|
||||
// only recalc this twice a second (doubt anyone will notice this lulul)
|
||||
if ((leveltime % 17) == 0)
|
||||
P_CalculatePrecipFloor(mobj, false);
|
||||
P_CalculatePrecipFloor(mobj);
|
||||
|
||||
// adjust height
|
||||
if ((mobj->z += mobj->momz) <= mobj->floorz)
|
||||
@@ -10126,7 +10122,7 @@ static precipmobj_t *P_SpawnPrecipMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype
|
||||
mobj->thinker.function = (actionf_p1)P_NullPrecipThinker;
|
||||
P_AddPrecipThinker(&mobj->thinker);
|
||||
|
||||
P_CalculatePrecipFloor(mobj, true);
|
||||
P_CalculatePrecipFloor(mobj);
|
||||
|
||||
if (mobj->floorz != starting_floorz)
|
||||
mobj->precipflags |= PCF_FOF;
|
||||
|
||||
Reference in new issue
Block a user