ReGameDLL_CS icon indicating copy to clipboard operation
ReGameDLL_CS copied to clipboard

[Feature request] Landmark for trigger_teleport

Open khanghugo opened this issue 2 years ago • 2 comments

Something already in Source SDK.

It will create a "portal" teleportation effect.

For trigger_teleport, there could be a new key value field of "landmark" where it points to another existing info_landmark. The placement of info_landmark is close to trigger_teleport. When trigger is touched, calculate the offset of player from the landmark, then add it back after the teleportation.

In Source SDK, that is the only thing needed to make it work. It is a fairly simple feature and implementation but it could make transportation a lot more seamless when considering there is trigger_teleport velocity/angles restoration.

khanghugo avatar Feb 23 '24 02:02 khanghugo

I have working implementation. Something like this.

https://github.com/khanghugo/ReGameDLL_CS/commit/e95e71a68f7fe2ad1a9d3c8c84589c3ada2ed392

(I jus realize I have a cvar for no reasons)

Here is a map to test.

arte_confused_short.bsp.zip

khanghugo avatar Feb 23 '24 18:02 khanghugo

You can check these .map files to see how it is built in case it isn't clear.

https://github.com/YaLTeR/BunnymodXT/files/14409237/arte_confused.zip

arte_ra.zip

This is like how CSS mappers do their stuffs as well.

One neat thing about this is as long as you build the landmark teleportation correctly, there would be 0 lag regardless of ping. 0 lag here means player will not know they are teleported and interpolation "feel" (from the player only) won't even be there. "correctly" here means mapper must have trigger_teleport restore viewangle (flag 256) and velocity (flag 512) and then origin Z difference between info_teleport_destination and info_landmark should be 0 or negative (destination should be less elevated than the starting point). Any perceivable "lag" would just be environmental changes such as different lighting or scenery but it is more of an instant switch because most likely there won't be any correction from the server to the player movement.

khanghugo avatar Mar 03 '24 05:03 khanghugo