StrataSource / Portal-2-Community-Edition

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

Cvar for legacy portal cleanser behavior #1496

Open MyGamepedia opened 11 months ago

MyGamepedia commented 11 months ago

Which component should be improved?

Other

Describe your suggestion

I tryed to play modification Rexaura in P2CE, at second level (map rex_01_holder) I found that portals clearing whan box dropper drop new cube, portals also clearing if cube contact with energy pellet. Because of at this moment player have portalgun that cannot fire orange portal - we can't done this level without cheats in P2CE. Original mod.

https://github.com/StrataSource/Portal-2-Community-Edition/assets/103366204/841ab35d-1d89-4440-816a-f795e3a486d0

In P2CE.

https://github.com/StrataSource/Portal-2-Community-Edition/assets/103366204/0e45b90a-34f4-41a9-8fb5-4b90bf586d8f

I explored the reason that cause this, as it turned out - map designer decided to use very stupid hack. To fizzle cubes - maps logic use huge trigger_portal_cleanser that toggling whan pellet touch cube, also toggling cause box droppers.

bandicam 2023-08-11 18-50-15-325

In Portal if place portal in disabled trigger_portal_cleanser and after this enable trigger_portal_cleanser - it will not detect portal and nothing will happen. In same situation but in Portal 2 placed portal will cleaned, not a bug, but cause compatibility problems. Test in Portal.

https://github.com/StrataSource/Portal-2-Community-Edition/assets/103366204/ee5bd103-e317-468c-87cd-d3ee90f45c48

Test in P2CE.

https://github.com/StrataSource/Portal-2-Community-Edition/assets/103366204/678546db-a54e-40c0-8c07-5c2a0e4d0db4

To fix this I suggest cvar sv_legacy_portal_cleanser_behavior 0/1, 0 - disabled, 1 - enabled, 0 by default. This cvar will enable the legacy portal cleanser behavior. Test map here. testtest_r.zip