group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
TitanfallConstants.hpp File Reference

Titanfall-inspired movement constants adapted to Quake units. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  tms
 Titanfall-inspired movement constants, adapted to Quake units.
 

Variables

constexpr float tms::k_walkSpeed = 320.0f
 Max wish speed when walking (u/s).
 
constexpr float tms::k_sprintSpeed = 530.0f
 Max wish speed when sprinting (u/s).
 
constexpr float tms::k_crouchSpeed = 200.0f
 Max wish speed when crouching (u/s).
 
constexpr float tms::k_jumpSpeed = 380.0f
 Upward velocity on ground jump (u/s).
 
constexpr float tms::k_doubleJumpSpeed = 340.0f
 Upward velocity on air jump (u/s).
 
constexpr float tms::k_slidehopJumpSpeed = 280.0f
 Upward velocity when jumping during slide (u/s).
 
constexpr float tms::k_doubleJumpCooldown = 0.10f
 Min time after first jump before double jump is allowed (s).
 
constexpr float tms::k_coyoteTime = 0.15f
 Grace period after leaving ground/wall to still jump (s).
 
constexpr int tms::k_enableJumpLurch = 1
 Master enable for jump lurch (1 = enabled, 0 = disabled).
 
constexpr float tms::k_jumpLurchMinGroundedTime = 0.3f
 Min continuous grounded time before a ground jump re-arms lurch (s).
 
constexpr float tms::k_jumpLurchGraceMin = 0.2f
 Time after jump where lurch is at max strength (s).
 
constexpr float tms::k_jumpLurchGraceMax = 0.5f
 Time after jump where lurch is disabled entirely (s).
 
constexpr float tms::k_jumpLurchStrength = 5.0f
 Multiplier for lurch intensity.
 
constexpr float tms::k_jumpLurchMax = 180.0f
 Maximum lurch velocity magnitude (u/s).
 
constexpr float tms::k_jumpLurchBaseVelocity = 60.0f
 Base lurch velocity before scaling (u/s).
 
constexpr float tms::k_jumpLurchSpeedLoss = 0.125f
 Fraction of speed lost on lurch (12.5%).
 
constexpr float tms::k_slideMinStartSpeed = 400.0f
 Min horizontal speed to enter slide (u/s).
 
constexpr float tms::k_slideMinSpeed = 100.0f
 Slide cancels below this speed (u/s).
 
constexpr float tms::k_slideBoostMin = 80.0f
 Min speed boost on slide entry (u/s).
 
constexpr float tms::k_slideBoostMax = 200.0f
 Max speed boost on slide entry (u/s).
 
constexpr float tms::k_slideBoostCooldown = 2.0f
 Cooldown between slide boosts (s).
 
constexpr float tms::k_slideBrakingDecelMin = 200.0f
 Initial braking deceleration (u/s^2).
 
constexpr float tms::k_slideBrakingDecelMax = 400.0f
 Maximum braking deceleration (u/s^2).
 
constexpr float tms::k_slideBrakingRampTime = 3.0f
 Time to ramp from min to max braking (s).
 
constexpr float tms::k_slideFloorInfluenceForce = 400.0f
 How much slope angle affects slide speed (u/s^2).
 
constexpr int tms::k_slideFatigueDecayTicks = 384
 Ticks (at 128Hz = 3s) to reset one fatigue level.
 
constexpr int tms::k_slideFatigueMax = 4
 Max fatigue levels (boost fully killed at this).
 
constexpr float tms::k_wallrunCheckDist = 35.0f
 Sphere-cast distance for side walls (u).
 
constexpr float tms::k_wallrunSphereRadius = 12.0f
 Sphere-cast radius for wall detection (u).
 
constexpr float tms::k_wallrunMinGroundDist = 50.0f
 Min height above ground to wallrun (u).
 
constexpr float tms::k_wallrunMaxSpeed = 630.0f
 Max speed while wallrunning (u/s).
 
constexpr float tms::k_wallrunAccel = 800.0f
 Forward acceleration along wall (u/s^2).
 
constexpr float tms::k_wallrunPushForce = 300.0f
 Force pushing player toward wall (u/s^2).
 
constexpr float tms::k_wallrunKickoffDuration = 1.75f
 Max time on same wall before kickoff (s).
 
constexpr float tms::k_wallrunSpeedLossDelay = 0.1f
 Delay before clamping speed on wall (s).
 
constexpr float tms::k_wallrunIntentThreshold = 0.1f
 Min dot(wishDir, -wallNormal) to enter/maintain a wallrun.
 
constexpr float tms::k_wallrunGripTime = 0.5f
 Initial zero-gravity "grip" phase on a wall (s).
 
constexpr float tms::k_wallrunGravityRampTime = 1.0f
 Time to ramp gravity 0 → full after grip ends (s).
 
constexpr float tms::k_wallJumpUpForce = 320.0f
 Upward velocity on wall jump (u/s).
 
constexpr float tms::k_wallJumpSideForce = 350.0f
 Sideways velocity on wall jump (away from wall) (u/s).
 
constexpr float tms::k_wallrunExitTime = 0.2f
 Duration of "exiting wall" flag after leaving (s).
 
constexpr float tms::k_wallrunCameraTilt = 7.5f
 Camera roll when wallrunning (degrees).
 
constexpr float tms::k_wallrunCameraTiltSpeed = 10.0f
 Interpolation speed for camera tilt.
 
constexpr float tms::k_climbCheckDist = 35.0f
 Forward sphere-cast distance (u).
 
constexpr float tms::k_climbSphereRadius = 12.0f
 Sphere-cast radius for climb detection (u).
 
constexpr float tms::k_climbMaxSpeed = 280.0f
 Max upward climbing speed (u/s).
 
constexpr float tms::k_climbMinSpeed = 180.0f
 Min climbing speed (after decay) (u/s).
 
constexpr float tms::k_climbKickoffDuration = 1.5f
 Max climb time on same wall (s).
 
constexpr float tms::k_climbMaxWallLookAngle = 30.0f
 Max angle (degrees) between look dir and wall normal.
 
constexpr float tms::k_climbSidewaysMultiplier = 0.1f
 Sideways movement reduction while climbing.
 
constexpr float tms::k_climbJumpUpForce = 320.0f
 Upward velocity on climb jump (u/s).
 
constexpr float tms::k_climbJumpBackForce = 350.0f
 Backward velocity on climb jump (u/s).
 
constexpr float tms::k_climbMinGroundDist = 40.0f
 Min height above ground to start climbing (u).
 
constexpr float tms::k_climbExitTime = 0.5f
 Duration of "exiting climb" flag (s).
 
constexpr float tms::k_climbRegrabLowerHeight = 400.0f
 Must be this much lower to regrab same wall (u).
 
constexpr float tms::k_ledgeCheckDist = 35.0f
 Forward trace distance for ledge detection (u).
 
constexpr float tms::k_ledgeSphereRadius = 12.0f
 Sphere-cast radius for ledge traces (u).
 
constexpr float tms::k_ledgeMaxGrabDist = 35.0f
 Max distance from ledge surface to grab (u).
 
constexpr float tms::k_ledgeMinHoldTime = 0.5f
 Min time frozen on ledge before release (s).
 
constexpr float tms::k_ledgeMoveAccel = 800.0f
 Acceleration pulling player toward ledge (u/s^2).
 
constexpr float tms::k_ledgeMaxSpeed = 400.0f
 Max speed of pull toward ledge (u/s).
 
constexpr float tms::k_ledgeJumpUpForce = 380.0f
 Upward velocity on ledge jump / mantle (u/s).
 
constexpr float tms::k_ledgeJumpBackForce = 120.0f
 Backward velocity on ledge jump (u/s).
 
constexpr float tms::k_ledgeExitTime = 0.5f
 Duration of "exiting ledge" flag (s).
 
constexpr float tms::k_speedCap = 7000.0f
 Hard horizontal speed limit (u/s).
 
constexpr float tms::k_standingHalfHeight = 36.0f
 Standing AABB half-height (u).
 
constexpr float tms::k_crouchingHalfHeight = 22.0f
 Crouching/sliding AABB half-height (u).
 
constexpr float tms::k_grappleMaxRange = 800.0f
 Max hook distance (~20 m in Quake units).
 
constexpr float tms::k_grapplePullSpeed = 800.0f
 Direct velocity toward anchor (u/s). Overrides, not additive.
 
constexpr float tms::k_grappleDetachDist = 80.0f
 Auto-detach when this close to anchor (~2 m).
 
constexpr float tms::k_grappleMaxDuration = 5.0f
 Safety timeout (s).
 
constexpr float tms::k_grappleCooldown = 6.0f
 Cooldown between grapples (s).
 
constexpr float tms::k_grappleLaunchLookBias
 Look-direction weight on detach launch (0 = pure grapple dir, 1 = pure look).
 
constexpr float tms::k_grappleLaunchSpeedMult = 1.15f
 Speed multiplier on launch (slight boost for momentum).
 

Detailed Description

Titanfall-inspired movement constants adapted to Quake units.