Skip to content

Commit 2021a38

Browse files
chovelyoukaiAlice Margatroid
and
Alice Margatroid
authored
refactor: Teleport entities (#225)
Co-authored-by: Alice Margatroid <alice@makai>
1 parent e078026 commit 2021a38

6 files changed

+60
-121
lines changed

fgd/bases/TeleTrigger.fgd

-55
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@SolidClass base(trigger_teleport)
2+
appliesto(MOMENTUM)
3+
line(255 255 255, targetname, filtername)
4+
line(255 255 0, targetname, target)
5+
line(0 255 0, target, landmark)
6+
= trigger_momentum_teleport: "A trigger volume that teleports entities that touch it. " +
7+
"Entities are teleported to the Remote Destination, and have their angles set to that of the Remote Destination's. " +
8+
"If a Local Destination Landmark is specified, teleported entities are offset from " +
9+
"the target by their initial offset from the landmark, and their angles are left alone."
10+
[
11+
ProgressTeleport(boolean) : "Teleport to Progress Checkpoint" : 0 : "If enabled, a player that activates this will be teleported to their progress checkpoint destination, set by trigger_momentum_progress."
12+
]

fgd/brush/trigger/trigger_momentum_teleport_progress.fgd

-5
This file was deleted.
+47-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@SolidClass base(TeleTrigger)
1+
@SolidClass base(Trigger)
22
line(255 255 255, targetname, filtername)
33
line(255 255 0, targetname, target)
44
line(0 255 0, target, landmark)
@@ -7,4 +7,50 @@
77
"If a Local Destination Landmark is specified, teleported entities are offset from " +
88
"the target by their initial offset from the landmark, and their angles are left alone."
99
[
10+
spawnflags(flags) =
11+
[
12+
32: "Preserve angles even when a local landmark is not specified" : 0
13+
8388608: "Teleport explosives" : 0 [MOMENTUM]
14+
15+
// Restore the other spawnflags.
16+
1: "Clients/Players" : 1
17+
8192: "Allow ghosts to fire this trigger" : 0 [MOMENTUM]
18+
2: "NPCs" : 0 [+USE_AI]
19+
4: "func_pushable" : 0
20+
8: "Physics Objects" : 0
21+
16: "Only player ally NPCs" : 0 [+USE_AI]
22+
64: "Everything (not including physics debris)" : 0
23+
512: "Only clients *not* in vehicles" : 0 [+USE_VEHICLES]
24+
1024: "Physics debris" : 0
25+
2048: "Only NPCs in vehicles (respects player ally flag)" : 0 [+USE_VEHICLES]
26+
4096: "Correctly account for object mass (trigger_push used to assume 100Kg) and multiple component physobjs (car, blob...)" : 1
27+
]
28+
29+
target(target_destination) : "Remote Destination" : : "The entity specifying the point to which the player should be teleported."
30+
31+
landmark(target_destination) : "Local Destination Landmark" : : "In landmark mode, teleported entities are offset from the target by " +
32+
"their initial offset from the landmark. Angles and velocity are also reoriented to the destination if enabled."
33+
34+
uselandmarkangles(boolean) : "Use Destination Angles" : 0 : "Forces the teleported object to snap to the angles of the destination."
35+
36+
checkdestifclearforplayer[-MOMENTUM](boolean) : "Only Spawn-Valid Destinations" : 0 : "Only teleport if there is a clear teleport destination."
37+
38+
TeleportOnEndTouch(choices) : "Teleport On" : 0 =
39+
[
40+
0 : "Start Touch"
41+
1 : "End Touch"
42+
]
43+
44+
VelocityMode(choices) : "Velocity Mode" : 0 =
45+
[
46+
0 : "Keep Velocity"
47+
1 : "Reset Velocity"
48+
2 : "Keep Negative Z Velocity Only"
49+
3 : "Set Velocity"
50+
]
51+
52+
SetSpeed(float) : "Set Velocity Speed" : 400 : "If Velocity Mode is set to Set Velocity, the entity's speed will be set to this amount when teleported."
53+
54+
// Inputs
55+
input SetRemoteDestination(string) : "Set a new remote teleport destination."
1056
]

fgd/point/env/env_surface_teleport.fgd

-58
This file was deleted.

fgd/visgroups.cfg

+1-2
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
* `trigger_tonemap`
228228
* `trigger_userinput`
229229
* `trigger_momentum_progress`
230-
* `trigger_momentum_teleport_progress`
230+
* `trigger_momentum_teleport`
231231
* `trigger_momentum_campaign_changelevel`
232232
* `trigger_momentum_promptinput`
233233
- Func Brush
@@ -483,7 +483,6 @@
483483
* `logic_playerproxy`
484484
* `point_momentum_serversettings`
485485
* `sunlight_shadow_control`
486-
* `env_surface_teleport`
487486
* `sky_camera`
488487
* `env_tonemap_controller`
489488
* `water_lod_control`

0 commit comments

Comments
 (0)