From 7ea49985fbbe006a401b3a7e66fe767b09b937ff Mon Sep 17 00:00:00 2001 From: Panzer Date: Mon, 9 Feb 2026 20:50:58 -0700 Subject: [PATCH] feat: Add trigger_momentum_bhop --- db/factories/momentum.txt | 1 + fgd/brush/func/func_bhop.fgd | 24 +----------------- fgd/brush/trigger/trigger_momentum_bhop.fgd | 27 +++++++++++++++++++++ fgd/visgroups.cfg | 1 + 4 files changed, 30 insertions(+), 23 deletions(-) create mode 100644 fgd/brush/trigger/trigger_momentum_bhop.fgd diff --git a/db/factories/momentum.txt b/db/factories/momentum.txt index 7a7530041..cfc069f32 100644 --- a/db/factories/momentum.txt +++ b/db/factories/momentum.txt @@ -338,6 +338,7 @@ trigger_hierarchy trigger_impact trigger_jumppad trigger_look +trigger_momentum_bhop trigger_momentum_limitmovement trigger_momentum_progress trigger_momentum_promptinput diff --git a/fgd/brush/func/func_bhop.fgd b/fgd/brush/func/func_bhop.fgd index aa06a8f06..5871a2422 100644 --- a/fgd/brush/func/func_bhop.fgd +++ b/fgd/brush/func/func_bhop.fgd @@ -1,28 +1,6 @@ -@SolidClass base(func_brush) +@SolidClass base(trigger_momentum_bhop) appliesto(MOMENTUM) line(255 255 0, targetname, target) = func_bhop: "A brush entity that teleports the player if they stand on it for too long or land too many times." [ - linedivider_bhop(string) readonly : "----------------------------------------------------------------------------------------------------------" - - ProgressTeleport(boolean) : "Teleport to Progress Trigger" : 1 : "When activated, the player will be teleported to their last touched trigger_momentum_progress." - target(target_destination) : "Remote Destination" : : "The entity specifying the point to which the player should be teleported (overrides progress teleport setting)." - UseDestinationAngles(boolean) : "Use Destination Angles" : 1 : "Snap the player's angles and velocity direction to the angles of the destination entity." - ResetVelocityOnTeleport(boolean) : "Reset Velocity on Teleport" : 0 : "Reset the player's velocity when teleported." - LandingLimit(integer) : "Landing Limit" : 0 : "The maximum amount of times the player is allowed to land on this. A limit of 0 allows unlimited landings/bhops. A limit of -1 uses gamemode-specific behavior emulating func_door blocks from the appropriate game. Only full groundings count toward this, not just touching from above." - - spawnflags(flags) = - [ - 1: "Reset landing counter when this is activated" : 1 - 2: "Reset landing counter when the player lands on something that isn't a func_bhop" : 1 - 4: "Reset landing counter when the player lands on anything else" : 0 - ] - - // Inputs - input ResetLandingCount(void) : "Reset the landing counter" - - // Outputs - output OnLandingLimitReached(void) : "Fired when the player leaves the ground after the landing limit is reached. The player will be teleported when they next land." - output OnActivate(void) : "Fired when the player would be teleported. Can be used for custom behavior instead of teleporting the player." ] - diff --git a/fgd/brush/trigger/trigger_momentum_bhop.fgd b/fgd/brush/trigger/trigger_momentum_bhop.fgd new file mode 100644 index 000000000..736668755 --- /dev/null +++ b/fgd/brush/trigger/trigger_momentum_bhop.fgd @@ -0,0 +1,27 @@ +@SolidClass base(Trigger) + appliesto(MOMENTUM) += trigger_momentum_bhop : "Trigger that teleports the player if they stand inside of it for too long or land inside of it too many times." + [ + linedivider_bhop(string) readonly : "----------------------------------------------------------------------------------------------------------" + + ProgressTeleport(boolean) : "Teleport to Progress Trigger" : 1 : "When activated, the player will be teleported to their last touched trigger_momentum_progress." + target(target_destination) : "Remote Destination" : : "The entity specifying the point to which the player should be teleported (overrides progress teleport setting)." + UseDestinationAngles(boolean) : "Use Destination Angles" : 1 : "Snap the player's angles and velocity direction to the angles of the destination entity." + ResetVelocityOnTeleport(boolean) : "Reset Velocity on Teleport" : 0 : "Reset the player's velocity when teleported." + LandingLimit(integer) : "Landing Limit" : 0 : "The maximum amount of times the player is allowed to land on this. A limit of 0 allows unlimited landings/bhops. A limit of -1 uses gamemode-specific behavior emulating func_door blocks from the appropriate game. Only full groundings count toward this, not just touching from above." + TimeLimit(float) : "Time Limit" : 0.1 : "How long the player can stay on the bhop platform before they get teleported. If this is 0, then use sv_bhop_time_limit." + + spawnflags(flags) = + [ + 1: "Reset landing counter when this is activated" : 1 + 2: "Reset landing counter when the player lands on something that isn't a func_bhop" : 1 + 4: "Reset landing counter when the player lands on anything else" : 0 + ] + + // Inputs + input ResetLandingCount(void) : "Reset the landing counter" + + // Outputs + output OnLandingLimitReached(void) : "Fired when the player leaves the ground after the landing limit is reached. The player will be teleported when they next land." + output OnActivate(void) : "Fired when the player would be teleported. Can be used for custom behavior instead of teleporting the player." + ] diff --git a/fgd/visgroups.cfg b/fgd/visgroups.cfg index 5b536ca98..ed4772e7c 100644 --- a/fgd/visgroups.cfg +++ b/fgd/visgroups.cfg @@ -198,6 +198,7 @@ - Trigger Multiple (`trigger_multiple`) - Player Movement Triggers * `trigger_playermovement` + * `trigger_momentum_bhop` * `trigger_momentum_limitmovement` * `trigger_setspeed` - Level Transitions