NULL terrain for spectators

This commit is contained in:
Sally Coolatta 2022-01-04 12:45:20 -05:00
parent ef5a4f01d4
commit 211fc17974

View file

@ -344,6 +344,13 @@ void K_UpdateMobjTerrain(mobj_t *mo, INT32 flatID)
return;
}
if (mo->player != NULL && mo->player->spectator == true)
{
// We don't want a terrain pointer for spectators.
mo->terrain = NULL;
return;
}
// Update the object's terrain pointer.
mo->terrain = K_GetTerrainForFlatNum(flatID);
}