I'm using a ThinkFrame hook so that under a certain condition, PF_SPINNING is added to the player flags.
However, when I open devmode, I see the PF_SPINNING indicator alternating between true and false every tic, even when the condition is constantly true. Why is PF_SPINNING being removed?
EDIT: For some reason, checking for a missing player flag first before adding it fixed the issue. I'm still curious as to what the issue was, though. Does adding a player flag when it's already added remove the flag?
Code:
if player.cdspin
player.mo.state = S_PLAY_ATK1
player.pflags = $1 + PF_STARTDASH
player.pflags = $1 + PF_SPINNING
end
However, when I open devmode, I see the PF_SPINNING indicator alternating between true and false every tic, even when the condition is constantly true. Why is PF_SPINNING being removed?
EDIT: For some reason, checking for a missing player flag first before adding it fixed the issue. I'm still curious as to what the issue was, though. Does adding a player flag when it's already added remove the flag?
Last edited: