momentum-mod / game

Momentum Mod - Standalone Source Movement Speedrunning (READ README)
https://momentum-mod.org
Other
514 stars 206 forks source link

Defrag: target_teleporter entity #2080

Open Mac-tf2 opened 1 year ago

Mac-tf2 commented 1 year ago

target_teleporter allows users to teleport by using any inputs (e.g. buttons and doors), rather than just touching a trigger_teleport. It sets the speed to 400 like regular teleporters unless the keep_speed flag is ticked, in which case it redirects the total speed across all axes to the direction that the target_teleport is pointing.

Source engine has a point_teleport entity that does most of what is needed, but it needs the teleport modes that momentum has added to trigger_teleport (reset speed, set speed etc.) and to account properly for the player origin offsets of each gamemode. Teleporting to a point_teleport entity that is flush with the ground can get the player stuck since the origin is centred in defrag and conc. It also does not apply teleslick currently.