- moved the global spot state into FLevelLocals.

This way it doesn't even have to be a thinker.
This commit is contained in:
Christoph Oelckers 2019-01-05 10:04:27 +01:00
commit dab68184f5
14 changed files with 39 additions and 44 deletions

View file

@ -2981,6 +2981,8 @@ enum T_Flags
TF_SENSITIVEZ = 0x00000800, // Fail if the actor wouldn't fit in the position (for Z).
};
DSpotState *GetSpotState(FLevelLocals *self, int create);
DEFINE_ACTION_FUNCTION(AActor, A_Teleport)
{
PARAM_ACTION_PROLOGUE(AActor);
@ -3037,7 +3039,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Teleport)
}
}
DSpotState *state = DSpotState::GetSpotState();
DSpotState *state = GetSpotState(&level, false);
if (state == NULL)
{
return numret;