StrataSource / Portal-2-Community-Edition

Task tracker for Portal 2: Community Edition
https://www.portal2communityedition.com
150 stars 3 forks source link

Bug: `prop_portal` set to be enabled by default will spawn at the origin of the map instead of where it's supposed to #965

Open ashifolfi opened 2 years ago

ashifolfi commented 2 years ago

Describe the bug

prop_portal entities since portal 2 have always spawned at the origin of the map if they are enabled by default.

This breaks portal 1 compatibility with some maps and mods that use pre enabled autoportals. As instead of spawning where they are supposed to they now spawn at the origin of the map.

This issue has been in place since portal 2 but absolutely needs to be fixed if full portal 1 compatibility is desired.

provided is a map with a prop_portal that is at a valid place but made to be enabled on spawn. pressing the button will fizzle and reactivate it showcasing that it can be reset to a valid position by doing that.

A video showcases this issue being present in Portal Pro's bend map

https://user-images.githubusercontent.com/29577987/180918454-3acc5b8a-6546-4a22-9339-b0672c486693.mp4

Issue Map

broken_autoportal.zip

To Reproduce

  1. Open the provided map
  2. notice the portal half stuck in the floor That portal is a prop_portal that is enabled on spawn.

The button will show that the prop_portal is indeed in a valid position A VMF is also provided.

Operating System

No response

AWildErin commented 2 years ago

Duplicate of #650, though idk which we should close since this has a bit more detail and also a test map attached.

vrad-exe commented 2 years ago

This is also what portals do when their location is invalid, seems like the valid location check is always failing when the portal starts active.