Issue #22170: REObjectRJ03 (Mac's Bar) - Cleanup issues
Before going into the details, I would like to add a general note on that quest here, since people frequently complain that this quest is not repeating properly:
This quest was never intended to repeat more than a couple of times, and it will dry up completely in relatively early stages of the game. This is because it is an object type encounter (the quest name indicates this): the REObject triggers that start those encounters are not rearmed. There is a script note on the stop stage of all REObject quest that makes it very clear that this behavior was intended, and we didn't change this when we fixed the RE quests in UFO4P 2.0.0.
Simply speaking, the game is not using the object encounter locations more than once. Though, which quests will be triggered at those locations is entirely random (it can be any of the REObject quests). Thus, if you're lucky, Mac will show up in your game on several occasions, but in the worst case, he may not show up in your game at all.
What's wrong with that quest is the cleanup: Mac will be removed by the engine as soon as the quest shuts down and the aliases are cleared (he's created at runtime, and like all actors that were created at runtime, he will be cleaned up by the engine rather quickly). Not so his bar stand though, since in game created objects will not be removed until the cell resets (and this may take a long time to happen).
To fix this, I added some lines to the end fragment to delete the bar and the furniture marker when the quest shuts down.
NOTE: This is not retroactive, because there is no way to track the offending references for quests that have already stopped running.