I've discovered this bug while making an interactive portal in Golden Souls 2
This portal isn't active at first, you have to press a switch that starts a cutscene, with the portal opening.
The lineportal gets activated by assigning the lineids during the cutscene, and it all goes well... until you go back to the hub
If you exit this map once you've activated the portal, enter the hub and then enter this map again
The lineportal breaks. It only happens with lineportals which have their lineid assigned through acs, regular lineportals work fine.
The temporary solution i have is reassigning the portals each time you re-enter the map, but i believe this is an unintended behavior which should be addressed.
I've replicated it in an example wad i'm providing with this post
Line_SetPortalTarget + Hub = LinePortal breaks
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Line_SetPortalTarget + Hub = LinePortal breaks
- Attachments
-
- setlineportalbug.pk3
- (6.9 KiB) Downloaded 30 times
Re: Line_SetPortalTarget + Hub = LinePortal breaks
The bug is not related to hubs. The same effect can be achieved by saving and loading game on MAP01 from the given sample after activating a portal.
It seems a call to P_CollectLinkedPortals() is not enough at this line. At least, replacing it with P_FinalizePortals() fixes the problem.
However, I'm not 100% sure that everything P_FinalizePortals() that does needs to be done during loading of saved game.
It seems a call to P_CollectLinkedPortals() is not enough at this line. At least, replacing it with P_FinalizePortals() fixes the problem.
However, I'm not 100% sure that everything P_FinalizePortals() that does needs to be done during loading of saved game.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Line_SetPortalTarget + Hub = LinePortal breaks
I don't think that anything in there is harmful and at worst just a bit time consuming because it performs redundant computations, but if it can be cut down to what really is needed here it might be better.
Re: Line_SetPortalTarget + Hub = LinePortal breaks
There is nothing can be skipped in P_FinalizePortals() function to make portals functional after loading of saved game.
To avoid useless portals and blockmap update I propose the following change.
Now it works correctly with portals activated initially or by scripting, for just loaded and savegame-restored level.
To avoid useless portals and blockmap update I propose the following change.
Now it works correctly with portals activated initially or by scripting, for just loaded and savegame-restored level.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Line_SetPortalTarget + Hub = LinePortal breaks
Looks ok to me. Thinking about it, finalizing portals before having restored their state from a savegame really makes no sense.