meetric1 / GMod-Seamless-Portals

My seamless portals addon for garrys mod
MIT License
89 stars 22 forks source link

When loading a save with any linked portals they unlink #53

Open wolfestridershooter opened 1 year ago

wolfestridershooter commented 1 year ago

It doesn't matter if they are manually linked or if they are spawned through the spawnlist entity category Before loading: image After loading: image

meetric1 commented 1 year ago

im unsure how to fix this properly since I cant store entities in the dupe table because the entity ID changes every time you spawn one in

dvdvideo1234 commented 1 year ago

@Mee12345

Hi, I am using the following for the laser so it can paste dupes correctly: https://github.com/dvdvideo1234/LaserSTool/blob/main/lua/entities/gmod_laser/init.lua#L19 https://github.com/dvdvideo1234/LaserSTool/blob/main/lua/laseremitter/wire_wrapper.lua#L7 https://github.com/dvdvideo1234/LaserSTool/blob/main/lua/laseremitter/wire_wrapper.lua#L177

Shadowysn commented 3 months ago

im unsure how to fix this properly since I cant store entities in the dupe table because the entity ID changes every time you spawn one in

I'm sure there's functions/hooks for the GMod Sandbox save system that lets custom entities store specific info... right? Right?

If not, what about saving the exact origin and angles of the linked portal? Unless it would require frequent updates due to the lack of a GMod Sandbox save hook detector.

dvdvideo1234 commented 3 months ago

@meetric1

I will test this after work, but I am sure it will work 90%. You are free to test it too if you like.