this only needs to be checked when thing->player

aaaa
This commit is contained in:
Alug committed 2024-10-24 02:56:10 +02:00
1 parent f47eed9413
commit 88c4517b72
1 file changed
+3 -1
+3 -1
View File
@@ -2374,10 +2374,12 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
{
//All things are affected by their scale.
fixed_t maxstep = FixedMul(MAXSTEPMOVE, mapobjectscale);
INT32 special = GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1);
INT32 special = 0;
if (thing->player)
{
special = GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1);
// If using type Section1:13, double the maxstep.
if (P_PlayerTouchingSectorSpecial(thing->player, 1, 13)
|| special == 13)