Good catch. When a
new.room command is encountered, any sound that is playing is stopped, which will reset the flag associated with the sound. When a sound is stopped for ANY reason, its flag is reset. If no sound is playing, no flag would get reset.
The complete list of affected flags and variables when a
new.room command is executed are:
- reserved variable v0 is set to ROOMNUM argument of the new.room command
- reserved variable v1 is set to previous room number (what was in v0)
- reserved variable v2 (ego edge code) is set to zero
- reserved variables v4 (object touching edge) and v5 (object edge code) are set to zero
- reserved variable v9 (unknown word number) is set to zero
- reserved variable v16 (ego view number) is set to current ego view number
- reserved flag f2 (input received) is reset to FALSE (but reserved flag f4 (said found match) is not modified; this appears to be a minor bug, but it usually not an issue)
- reserved flag f5 (new room) is set to TRUE
- if a sound is playing, it is stopped and the 'done' flag is set to TRUE
Any other changes that you see are because there's a specific line of code somewhere in your logics that's doing the change.
In the template games, the reset logic is usually logic #92 (lgc.RoomInit).