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
 Max wish speed when walking (u/s). Sprint removed; this is the only base speed.
constexpr float tms::k_sprintSpeed = 550.0f
 Deprecated: sprint removed. Kept equal to k_walkSpeed for safety.
constexpr float tms::k_crouchSpeed = 350.0f
 Max wish speed when crouching (u/s).
constexpr float tms::k_adsSpeed = 280.0f
 Max wish speed while ADS-ing a precision (charge) weapon (u/s).
constexpr float tms::k_jumpSpeed = 660.0f
 Upward velocity on ground jump (u/s). Must mirror physics::k_jumpSpeed.
constexpr float tms::k_doubleJumpSpeed = 600.0f
 Upward velocity on air jump (u/s).
constexpr float tms::k_slidehopJumpSpeed = 500.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_doubleJumpHorizBoost = 400.0f
 Horizontal velocity (u/s) toward WASD wishDir on double jump.
constexpr float tms::k_doubleJumpGroundedRefreshTime = 0.5f
 Continuous time grounded (s) needed to refresh DJ.
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 = 400.0f
 Maximum lurch velocity magnitude (u/s).
constexpr float tms::k_jumpLurchBaseVelocity = 100.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 = 200.0f
 Slide cancels below this speed (u/s).
constexpr float tms::k_slideBoostMin = 180.0f
 Min speed boost on slide entry (u/s).
constexpr float tms::k_slideBoostMax = 380.0f
 Max speed boost on slide entry (u/s).
constexpr float tms::k_slideBoostCooldown = 1.5f
 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 float tms::k_slideSteerAccel = 200.0f
 Sideways accel from WASD while sliding (u/s^2).
constexpr int tms::k_slideFatigueDecayTicks = 200
 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_wallrunMinAttachSpeed = 200.0f
 Min horizontal speed required to enter wallrun (u/s).
constexpr float tms::k_wallrunMinStaySpeed = 100.0f
 Drop wallrun below this horizontal speed (u/s).
constexpr float tms::k_wallrunSameWallReattachSpeed = 100.0f
 Min inward speed to reattach a blacklisted wall (u/s).
constexpr float tms::k_wallrunMaxSpeed = 800.0f
 Max speed while wallrunning (u/s).
constexpr float tms::k_wallrunAccel = 500.0f
 Forward acceleration along wall (u/s^2).
constexpr float tms::k_wallrunPushForce = 800.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.2f
 Delay before clamping speed on wall (s).
constexpr float tms::k_wallrunIntentThreshold = 0.1f
 Min dot(wishDir, -wallNormal) to ENTER a wallrun.
constexpr float tms::k_wallrunDetachThreshold = -0.26f
 Min dot(wishDir, -wallNormal) to STAY on the wall.
constexpr float tms::k_wallrunGripTime = 1.0f
 Initial zero-gravity "grip" phase on a wall (s).
constexpr float tms::k_wallrunGravityRampTime = 2.0f
 Time to ramp gravity 0 → full after grip ends (s).
constexpr float tms::k_wallJumpUpForce = 640.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_wallrunEntryVerticalImpulse = 440.0f
 Lucio-style upward kick when attaching (u/s).
constexpr float tms::k_wallrunEntryVerticalCeiling = 640.0f
 Maximum vertical speed after the entry kick (u/s).
constexpr float tms::k_wallrunEntryHorizSnap = 1.0f
 Horizontal speed retention on wallrun entry.
constexpr float tms::k_wallrunVerticalDecayTau = 0.45f
 Exponential vertical decay while attached (s).
constexpr float tms::k_wallrunMaxFaceRedirect = 1.57079632679f
 Max face-normal rotation accepted per tick (rad).
constexpr float tms::k_speedCap = 7000.0f
 Hard horizontal speed limit (u/s).
constexpr float tms::k_playerCapsuleRadius = 16.0f
 Capsule cross-section radius (u), fixed across stances.
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_standingCapsuleHalfHeight = k_standingHalfHeight - k_playerCapsuleRadius
 Capsule segment half-length when standing.
constexpr float tms::k_crouchingCapsuleHalfHeight = k_crouchingHalfHeight - k_playerCapsuleRadius
 Capsule segment half-length when crouching.
constexpr float tms::k_grappleMaxRange = 4000.0f
 Max hook distance (~20 m in Quake units).
constexpr float tms::k_grapplePullSpeed = 4000.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 = 5.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).
constexpr float tms::k_grapplePerchFeetOffset = 50.0f
 Feet height above the hook point in perch mode (u).
constexpr float tms::k_grapplePerchVerticalGain = 8.0f
 Vertical-pull P-controller gain (1/s).
constexpr float tms::k_grapplePerchRiseRange = 100.0f
 Altitude diff (u) below target at which horizontal speed bottoms out — controls how steep the rise phase feels.
constexpr float tms::k_grapplePerchMinHorizFactor = 0.25f
 Floor on horizontal-speed throttle while below target.

Detailed Description

Titanfall-inspired movement constants adapted to Quake units.