Jazz2::Actors::Player class

Represents a controllable player.

The rabbit (Jazz, Spaz or Lori) that runs, jumps, fires and collects items. It can also be morphed into temporary forms such as the frog or the bird.

Base classes

class ActorBase
Base class of an object.

Derived classes

class MpPlayer
Player in online session.

Public types

struct CharacterTraits
Constant per-character properties.
struct InventoryState
Collected items and weapon loadout of a player.
enum class Modifier : std::uint8_t { None, Airboard, Copter, LizardCopter }
Modifier.
enum class SpecialMoveType : std::uint8_t { None, Buttstomp, Uppercut, Sidekick }
Special move type.
enum class InvulnerableType { Transient, Blinking, Shielded }
Type of invulnerability.
enum class FlightType { Normal, Cheat }
Type of copter flight state.

Public static variables

static float LegacyEnemyStompBounce constexpr
Non-Reforged bounce off an enemy hit by a buttstomp.
static float LegacyLandingTolerance constexpr
How far below a ledge's surface the non-Reforged player may arrive and still land on it.
static float HitboxLeft constexpr
How far the hitbox reaches left of the player's centre.
static float HitboxRight constexpr
The same right of the centre, see HitboxLeft.
static float LegacyAirFloorSnap constexpr
How far below the non-Reforged player's move a floor still catches it while falling sideways.
static float LegacyAirFloorSnapDashExtra constexpr
While dashing the reach is the horizontal speed in px/tick plus this, if that is more (20 at 16).
static float LegacyFallSpeedCap constexpr
Non-Reforged terminal fall speed.
static float LegacyButtstompSpeed constexpr
Non-Reforged buttstomp descent speed, the same for all characters.
static float LegacyButtstompHoverSpeed constexpr
How fast the non-Reforged buttstomp sinks while it hovers before the descent, measured in the original.
static float LegacyButtstompHoldTime constexpr
How long the non-Reforged buttstomp hovers before the descent, in seconds.
static float LegacyButtstompHopSpeed constexpr
Non-Reforged hop off the floor after a buttstomp whose last step ends deep in it.
static float LegacyButtstompStep constexpr
Non-Reforged buttstomp descent per original tick (px), see LegacyButtstompHopDepth.
static float LegacyButtstompHopDepth constexpr
How far past the floor the last descent step has to end for the hop (px).
static float LegacyButtstompDriftSpeed constexpr
Non-Reforged sideways drift speed during a buttstomp, doubled with Run.
static float LegacyPushSpeed constexpr
Non-Reforged speed while pushing a solid object.
static float LegacyVineSpeed constexpr
Non-Reforged vine climbing speed cap, doubled while Run is held.
static float LegacyCopterDescentSpeed constexpr
Non-Reforged copter descent speed, the same for Jazz and Lori.
static float LegacyCopterWindUp constexpr
Rate the non-Reforged copter descent accelerates towards LegacyCopterDescentSpeed.
static float LegacyCopterAscentBrake constexpr
Rate copter ears set to rise brake a fall at, before the rise begins.
static float LegacyDoubleJumpKeyUpTime constexpr
How long Jump has to be up before a press can double jump.
static float LegacyGroundMoveWindUp constexpr
Wind-up of the uppercut and the sidekick, in seconds.
static float LegacyCopterFloorSnap constexpr
How close a floor has to be for copter ears moving sideways to drop onto it.
static float LegacyCopterFlightTime constexpr
How long a press keeps copter ears going, measured in JJ2+.
static float LegacyCopterLandGrace constexpr
How long copter ears outlive a landing they dropped onto.
static float LegacyDoubleJumpSpeed constexpr
Non-Reforged launch speed of Spaz's double jump.
static float LegacyDoubleJumpWindowTime constexpr
How long Spaz's non-Reforged double jump stays available.
static float LegacyUppercutSpeed constexpr
Launch speed of Jazz's non-Reforged uppercut.
static float LegacyUppercutGravity constexpr
Gravity while a non-Reforged uppercut is driving.
static float LegacyUppercutTicks constexpr
How long a non-Reforged uppercut drives before ordinary gravity resumes.
static float LegacyRFBlastSpeed constexpr
Speed a non-Reforged RF blast throws the player at.
static float LegacyRFBlastRiseSpeed constexpr
Upward kick a non-Reforged RF blast gives a player who is off the ground.
static float LegacyRFBlastLiftBase constexpr
Upward kick the same blast gives a player standing on the floor, at zero range.
static float LegacyRFBlastLiftSlope constexpr
How much LegacyRFBlastLiftBase grows per pixel of range.
static float LegacyRFBlastHoldTicks constexpr
How long a non-Reforged RF blast holds the thrown speed before friction resumes.
static float LegacyRFBlastReach constexpr
How close to a non-Reforged RF blast the player has to be to be thrown by it.
static float FireBaseHoldTicks constexpr
Ticks of held fire between two shots without fast fire pickups, less one.
static float FireFastFireStepTicks constexpr
Ticks one fast fire pickup takes off the held fire interval.
static float FireMinHoldTicks constexpr
Shortest held fire interval in ticks, less one.
static float FireReleaseWaitFrames constexpr
Longest wait in frames before the next shot after the fire key was released.
static float ToasterBaseIntervalTicks constexpr
Ticks between two Toaster shots while the player isn't moving vertically.
static float ToasterIntervalSpeedStep constexpr
Vertical speed in px per tick that takes one tick off the Toaster interval.
static std::uint16_t ToasterTicksPerAmmo constexpr
Ticks of Toaster fire one unit of ammo lasts.
static float ShieldFireInterval constexpr
Frames between two shots of a shield.
static float RFStartHalfWidth constexpr
Distance in px from the player's centre to a wall an RF rocket's start is measured at.
static float UpShotSpawnOffsetY constexpr
Pixels above the player's origin an upward shot starts.
static float LegacySpazSidekickSpeed constexpr
Non-Reforged sidekick launch speed for Spaz.
static float LegacySpazSidekickDistance constexpr
Distance the driven part of Spaz's non-Reforged sidekick covers.
static float SidekickDistanceEpsilon constexpr
Remainder of a sidekick's distance that counts as none left.
static float LegacySpringHoldTicks constexpr
Ticks a horizontal spring's launch speed is held before it clamps to LegacyCarryExitRunSpeed.
static float LegacySpringRetriggerTicks constexpr
Ticks before a horizontal spring can launch the player again, measured in JJ2+.
static std::int32_t LegacySpringMinOverlapPixels constexpr
Sprite pixels the player and a spring must share to launch it, as in the original.
static float LegacySpringRiseHoldTicks constexpr
Ticks an upward spring's launch speed is held before gravity acts on it, measured in the original.
static float LegacyVerticalSpringCarryTicks constexpr
Ticks a horizontal pole's carry lasts after a vertical spring that keeps the horizontal speed.
static float LegacySpringRebuildTicks constexpr
Ticks a spring launch's speed takes to rebuild after a double jump discards it.
static float LegacyWarpOutControlTime constexpr
How long after a warp lands control comes back outside Reforged.
static float LegacyLoriSidekickDistance constexpr
Distance one of Lori's non-Reforged kicks covers.
static float LegacyLoriKickPushDrain constexpr
Rate a blocked kick of Lori's spends LegacyLoriSidekickDistance at, per frame.
static float LegacyLoriKickRamp constexpr
Quadratic ramp of Lori's non-Reforged kick, per tick squared.
static float LegacyLoriSidekickSpeed constexpr
Non-Reforged sidekick launch speed for Lori.
static float LegacyPoleLaunchBonus constexpr
Non-Reforged speed a vertical pole adds to the one the player arrived with.
static float LegacyHPoleLaunchBonus constexpr
Non-Reforged speed a horizontal pole adds to the one the player arrived with.
static float LegacyHPoleMaxLaunch constexpr
Ceiling on the non-Reforged horizontal pole launch.
static float HPoleKeepRunningTime constexpr
How long the horizontal pole's launch carries the player.
static float PoleLaunchControlTimeout constexpr
How long a pole's launch takes control away from the player.
static float LegacyHPoleCrouchBlockTime constexpr
How long the non-Reforged horizontal pole refuses the crouch after its launch.
static float LegacyFloatUpSpeed constexpr
Speed a non-Reforged float-up area holds the player at.
static float LegacyFloatUpFallCap constexpr
Fastest a non-Reforged player descends while inside a float-up area.
static float LegacyWaterSpeed constexpr
Non-Reforged swimming speed cap, doubled while Run is held.
static float LegacyWaterAccelX constexpr
Non-Reforged horizontal swimming acceleration, the same with Run held.
static float LegacyWaterAccelY constexpr
Non-Reforged vertical swimming acceleration, doubled while Run is held.
static float LegacyWaterCoast constexpr
Non-Reforged horizontal coasting under water with nothing held, as a share of the speed per tick.
static float LegacyWaterCoastStop constexpr
Horizontal speed under water below which the coasting stops at once.
static float LegacyWindFactor constexpr
Pixels a non-Reforged wind area moves the player per unit of its strength.
static float LegacyBeltFactor constexpr
Pixels a non-Reforged belt moves the player per unit of its strength.
static float LegacyAccBeltSpeed constexpr
Speed a non-Reforged accelerating belt drives the player to, per unit of strength.
static float LegacyAccBeltStep constexpr
How much an accelerating belt adds per tick, per unit of strength.
static std::int32_t LegacyAccBeltRunBonus constexpr
Strength a non-Reforged accelerating belt gains while Run is held.
static float LegacyCarryExitRunSpeed constexpr
Speed a non-Reforged carry clamps to when it ends with Run held.

Public static functions

static auto GetInvulnerableStrength(InvulnerableType type) -> std::int32_t constexpr
Returns the rank of a InvulnerableType.
static auto GetCharacterTraits(PlayerType type) -> const CharacterTraits&
Returns constant per-character properties for a given player type.
static auto IsTemporaryForm(PlayerType type) -> bool
Returns true for temporary forms (the frog and both birds).
static void DrawShield(RenderQueue& renderQueue, ShieldType shieldType, float shieldTime, Metadata* metadata, float elapsedFrames, Vector2f pos, std::uint16_t baseLayer, std::unique_ptr<RenderCommand>(&shieldRenderCommands)[2])
Draws the active shield decoration around a position.
static void SpawnSugarRushStar(ILevelHandler* levelHandler, Metadata* metadata, Vector2f pos, std::uint16_t baseLayer)
Spawns a single star of the sugar rush trail at a position.
static auto UpdateRemoteRevUp(ILevelHandler* levelHandler, Metadata* metadata, Vector2f pos, std::uint16_t baseLayer, bool facingLeft, float timeMult, float& revUpTime, float& sparkCooldown) -> float
Advances a remote player's run-in-place and returns its animation speed factor.

Constructors, destructors, conversion operators

Player()
Creates a new instance.
~Player()

Public functions

auto GetPlayerIndex() const -> std::uint8_t
Returns player index.
auto GetPlayerType() const -> PlayerType
Returns player type.
auto IsBird() const -> bool
Returns true while morphed into either of the two birds.
auto GetPersistentPlayerType() const -> PlayerType
Returns the player type to carry over to the next level or to store.
auto GetPlayerTypeBeforeMorph() const -> PlayerType
Returns the character a temporary form was taken from, or the current type.
auto GetOriginalPlayerType() const -> PlayerType
Returns the character the player started the level with.
auto GetEffectiveFurColor() const -> std::uint32_t
Returns the fur color to actually use for this player.
auto GetPaletteOffset() const -> std::int32_t
Returns the player's offset into the shared palette texture, or -1 if not recolored.
auto GetSpecialMove() const -> SpecialMoveType
Returns current special move.
auto HasFiredWithin(float frames) const -> bool
Returns whether the player has fired within the specified number of frames.
auto GetWeaponAmmo() const -> ArrayView<const std::uint16_t>
Return weapon ammo.
auto GetWeaponUpgrades() const -> ArrayView<const std::uint8_t>
Returns weapon upgrades.
auto GetCurrentWeapon() const -> WeaponType
Returns the weapon the player holds.
auto HasSugarRush() const -> bool
Returns true if sugar rush is active.
auto CanJump() const -> bool
Returns true if the player can jump.
auto CanBreakSolidObjects() const -> bool
Returns true if the player can bread solid objects.
auto IsButtstompStarting() const -> bool
Returns true if a buttstomp is still in its start transition.
auto IsRammingFrozen(const ActorBase* target) const -> bool
Returns true if the player runs into a frozen target fast enough to break it.
auto CanMoveVertically() const -> bool
Returns true if the player can move vertically, i.e. not affected by gravity.
auto IsInWater() const -> bool
Returns true if the player is currently in water.
auto IsContinuousJumpAllowed() const -> bool virtual
Returns true if continuous jump is allowed.
auto IsLedgeClimbAllowed() const -> bool
Returns true if ledge climbing is allowed.
auto GetCameraLeadDirection() const -> std::int32_t
Returns the direction the non-Reforged camera leads in, -1, 0 or 1.
auto GetCameraVerticalOffset() const -> float
Returns how far the non-Reforged camera should drop below the player, in pixels.
auto GetCameraLookOffset() const -> float
Returns how far the non-Reforged camera is panned by looking up (negative) or down (positive), in pixels.
auto ConsumeStompLanding() -> bool
Returns true once after a buttstomp landed, so the camera can shake.
auto OnLevelChanging(Actors::ActorBase* initiator, ExitType exitType) -> bool virtual
Called when the level is about to change.
void ReceiveLevelCarryOver(ExitType exitType, const PlayerCarryOver& carryOver) virtual
Called at the beginning of the next level to reveive carry over information.
auto PrepareLevelCarryOver() -> PlayerCarryOver virtual
Returns current carry over information.
void ReceiveReturnCarryOver(ExitType exitType, const PlayerCarryOver& carryOver)
Called when the player returns to a restored level to receive carry over information.
void InitializeFromStream(ILevelHandler* levelHandler, Stream& src, std::uint16_t version)
Initializes player state from a stream.
void SerializeResumableToStream(Stream& dest)
Serializes player state to a stream.
auto Respawn(Vector2f pos) -> bool virtual
Respawns the player.
void WarpToPosition(Vector2f pos, WarpFlags flags) virtual
Warps to a given position.
void WarpToCheckpoint()
Warps to the last checkpoint.
auto GetModifier() const -> Modifier
Returns current modifier.
auto SetModifier(Modifier modifier, const std::shared_ptr<ActorBase>& decor = nullptr) -> bool virtual
Sets current modifier.
auto IsFlyCheatActive() const -> bool
Returns whether fly-cheat behavior is currently active.
void SetCopterFlight(float timeLeft, FlightType type = FlightType::Normal)
Sets copter flight duration and type, timeLeft <= 0 disables it.
void EnableFlyCheat(bool active) virtual
Enables or disables fly cheat behavior.
auto TakeDamage(std::int32_t amount, float pushForce = 0.0f, bool ignoreInvulnerable = false) -> bool virtual
Takes damage.
auto Freeze(float timeLeft) -> bool virtual
Freezes the player for specified time.
void SetInvulnerability(float timeLeft, InvulnerableType type) virtual
Sets invulnerability, replacing whatever is running.
void GrantInvulnerability(float timeLeft, InvulnerableType type)
Grants invulnerability without weakening what is already running.
auto GetInvulnerableType() const -> InvulnerableType
Returns the effect the currently running invulnerability is showing.
auto GetScore() const -> std::int32_t
Returns score.
void AddScore(std::int32_t amount) virtual
Adds score.
auto AddHealth(std::int32_t amount) -> bool virtual
Adds health.
auto GetLives() const -> std::int32_t
Returns lives.
auto AddLives(std::int32_t count) -> bool virtual
Adds lives.
auto GetCoins() const -> std::int32_t
Returns coins.
void AddCoins(std::int32_t count)
Adds coins.
void AddCoinsInternal(std::int32_t count)
Adds coins without notification (internal use only).
auto GetGems(std::uint8_t gemType) const -> std::int32_t
Returns gems.
void AddGems(std::uint8_t gemType, std::int32_t count)
Adds gems.
auto GetConsumedFood() const -> std::int32_t
Returns food eaten.
void ConsumeFood(bool isDrinkable)
Consumes food.
void ActivateSugarRush(float duration)
Activates sugar rush.
void DeactivateSugarRush()
Deactivates sugar rush immediately and restores the default renderer.
auto AddAmmo(WeaponType weaponType, std::int16_t count) -> bool virtual
Adds weapon ammo.
void AddWeaponUpgrade(WeaponType weaponType, std::uint8_t upgrade) virtual
Adds weapon upgrade.
auto AddFastFire(std::int32_t count) -> bool
Adds fast fire.
auto CanMorphTo(PlayerType type) -> bool
Returns true if the player can morph to a given player type.
auto MorphTo(PlayerType type) -> bool virtual
Morphs to a given player type.
auto MorphToInstantly(PlayerType type) -> bool virtual
Changes the player type immediately, without any transition or effect.
void MorphRevert()
Reverts a morph.
auto SetDizzy(float timeLeft) -> bool virtual
Sets duration of dizziness.
auto ApplyBlastKnockback(bool pushLeft, float distanceSqr) -> bool
Throws the player away from an RF blast.
auto GetActiveShield() const -> ShieldType
Returns active shield.
auto SetShield(ShieldType shieldType, float timeLeft) -> bool virtual
Sets active shield.
auto IncreaseShieldTime(float timeLeft) -> bool virtual
Increases active shield time.
auto SpawnBird(std::uint8_t type, Vector2f pos) -> bool
Spawns bird companion.
auto DisableControllable(float timeout) -> bool
Disables controls for specified time.
void SetCheckpoint(Vector2f pos, float ambientLight)
Sets checkpoint.
auto GetCurrentAmbientLight() const -> float
Returns the ambient light intensity currently applied to this player.
void SetCurrentAmbientLight(float value)
Records the ambient light intensity currently applied to this player.
void SetCheckpointAmbientLight(float ambientLight)
Overrides the ambient light intensity to restore when respawning at the checkpoint.
auto GetCarryingObject() const -> ActorBase*
Returns carrying object.
void CancelCarryingObject(ActorBase* expectedActor = nullptr)
Cancels carrying object.
void UpdateCarryingObject(ActorBase* actor, SuspendType suspendType = SuspendType::None)
Updates carrying object.
void SwitchToWeaponByIndex(std::uint32_t weaponIndex)
Switches current weapon to a given index.
void GetFirePointAndAngle(Vector3i& initialPos, Vector2f& gunspotPos, float& angle)
Returns weapon fire point and angle.
void ResetRevUpState()
Clears all run-in-place rev-up state.

Protected types

enum class LevelExitingState : std::uint8_t { None, Waiting, WaitingForWarp, Transition, Ready }
State of level exiting.
enum class WeaponWheelState : std::uint8_t { Hidden, Opening, Visible, Closing }
State of HUD weapon wheel.
enum class StopPhase : std::uint8_t { None, Skid, Slide, Settle, Hold }
Phase of the chain of poses a player sliding to a halt goes through.
enum class SetCurrentWeaponReason { Unknown, User, Rollback, AddAmmo, AddUpgrade, Shield }
Reason the current weapon was changed.

Protected functions

auto OnActivatedAsync(const ActorActivationDetails& details) -> Task<bool> override
Called when the object is created and activated.
auto OnTileDeactivated() -> bool override
Called when corresponding tile should be deactivated.
auto OnPerish(ActorBase* collider) -> bool override
Called when the object has no health left and should perish.
void OnUpdate(float timeMult) override
Called every frame to update the object state.
void OnSerializeState(Stream& dest) override
Serializes the live state of the object to a level state snapshot.
void OnDeserializeState(Stream& src) override
Restores the live state of the object from a level state snapshot.
void OnUpdateHitbox() override
Called when the hitbox needs to be updated.
auto OnDraw(RenderQueue& renderQueue) -> bool override
Called when the object needs to be drawn.
void OnEmitLights(SmallVectorImpl<LightEmitter>& lights) override
Called when emitting lights.
void OnEmitRemotedLights(SmallVectorImpl<LightEmitter>& lights) override
Called when emitting lights that have to be replicated to remote peers.
auto OnHandleCollision(ActorBase* other) -> bool override
Called when the object collides with another object.
void OnHitFloor(float timeMult) override
Called when the object hits a floor.
void OnHitCeiling(float timeMult) override
Called when the object hits a ceiling.
void OnHitWall(float timeMult) override
Called when the object hits a wall.
auto GetGravityModifier(float baseGravity, bool isRising) const -> float override
Returns the gravity applied this frame, may depend on direction (e.g., the player's jump arc).
auto GetLegacyGravity(bool isRising) const -> float
auto GetLegacyFallCap() const -> float
auto ApplyPlayerBump(Player& other, bool stackingEnabled) -> bool
Pushes this player and other apart so they can't overlap.
void UpdatePlayerStacking(float timeMult, bool snap)
Lets this player stand on top of another player as on a one-way platform.
void DecreaseShieldTime(float time) virtual
Reduces remaining shield time when a hit is absorbed (only if more than time remains).
void OnHandleSpectate(float timeMult) virtual
Called each frame while the player is in PlayerType::Spectate mode.
void OnPushSolidObject(float timeMult, float pushSpeedX) virtual
Called when a solid object is pushed.
void OnHitSpring(Vector2f pos, Vector2f force, bool keepSpeedX, bool keepSpeedY, bool& removeSpecialMove) virtual
Called when a spring is hit.
void OnWaterSplash(Vector2f pos, bool inwards) virtual
Called when water should splash.
auto PlayPlayerSfx(StringView identifier, float gain = 1.0f, float pitch = 1.0f) -> std::shared_ptr<AudioBufferPlayer>
Plays a sound effect for the player.
auto SetPlayerTransition(AnimState state, bool cancellable, bool removeControl, SpecialMoveType specialMove, Function<void()>&& callback = {}) -> bool
Starts a player animation transition.
auto CanFreefall() -> bool
Returns true if the player should freefall.
void EndDamagingMove()
Ends active damaging move.
auto FireCurrentWeapon(WeaponType weaponType) -> bool virtual
Fires currently equipped weapon.
void EmitWeaponFlare() virtual
Emits weapon flare after firing.
void SetCurrentWeapon(WeaponType weaponType, SetCurrentWeaponReason reason) virtual
Sets current weapon.

Protected static variables

static const char* WeaponNames constexpr
Display names of all weapons.

Constants

static float MaxDashingSpeed protected constexpr
Maximum horizontal speed while dashing.
static float MaxRunningSpeed protected constexpr
Maximum horizontal speed while running.
static float MaxVineSpeed protected constexpr
Maximum speed while climbing a vine.
static float MaxDizzySpeed protected constexpr
Maximum horizontal speed while dizzy.
static float MaxShallowWaterSpeed protected constexpr
Maximum horizontal speed in shallow water.
static float Acceleration protected constexpr
Horizontal acceleration.
static float Deceleration protected constexpr
Horizontal deceleration.
static float MaxPushingSpeed protected constexpr
Speed above which the player is no longer considered to be pushing.

Non-Reforged movement constants

Measured in the original and converted to this engine's 60 Hz baseline, velocities by LegacyFrameRateScale and accelerations by its square.

static float LegacyTickRate constexpr
Tick rate of the original game.
static float LegacyFrameRateScale constexpr
Velocity scale from the original's ticks to this engine's 60 Hz baseline.
static float LegacyFrameRateScaleSqr constexpr
Acceleration scale from the original's ticks to this engine's 60 Hz baseline.
static float LegacyWalkSpeed constexpr
Non-Reforged walk speed cap.
static float LegacyDashSpeed constexpr
Non-Reforged dash speed cap while Run is held.
static float FrozenRamSpeed constexpr
Horizontal speed above which running into a frozen object breaks it, in all modes.
static float FrozenRamBounceSpeedY constexpr
Vertical speed of the bounce off a broken frozen object.
static float LegacyWalkAccel constexpr
Non-Reforged horizontal acceleration with no Run.
static float LegacyDashAccel constexpr
Non-Reforged horizontal acceleration while Run is held.
static float LegacyWalkDecel constexpr
Non-Reforged deceleration with no direction held.
static float LegacyDashDecel constexpr
Non-Reforged deceleration with no direction held while the dash is active.
static float LegacySlideWalkDecel constexpr
Non-Reforged deceleration on a strength-0 slide tile, no direction held.
static float LegacySlideDashDecel constexpr
Non-Reforged deceleration on a strength-0 slide tile while the dash is active.
static float LegacySlideWalkDecelStep constexpr
How much each step of a slide tile's strength takes off LegacySlideWalkDecel.
static float LegacySlideDashDecelStep constexpr
The same step for LegacySlideDashDecel.
static float TubeControlTime constexpr
How long a sucker tube keeps hold of the player.
static float TubeSnapY constexpr
Where in its tile a horizontal sucker tube holds the player, from the top.
static float TubeBallPoseTime constexpr
How long the sucker tube's ball pose stays after leaving the last tube tile.
static float LegacyDashGraceTicks constexpr
How long the non-Reforged dash outlives the Run key.
static float LegacyCameraButtstompDrop constexpr
How far the non-Reforged camera drops during a buttstomp.
static float LegacyStompQuakeTicks constexpr
Ticks the camera shakes after a buttstomp landed, original 17 ticks.
static float LandSoundMinFallSpeed constexpr
Fall speed a floor has to stop for the landing sound, 3 px per tick of the original.
static float LandAnimFrameTicks constexpr
Ticks the non-Reforged landing pose spends on each of its frames.
static float SidekickEndSpeedUp constexpr
How much faster the sidekick's ending animation plays, in both modes.
static float LegacyRevUpJumpBoost constexpr
Extra launch speed of a jump out of a run-in-place, about a tile of height.
static float LegacyJumpSpeed constexpr
Non-Reforged jump launch speed from a standstill.
static float LegacySpeedJumpScale constexpr
Extra non-Reforged launch speed per unit of horizontal speed.
static float LegacyRiseGravity constexpr
Non-Reforged rise gravity while the jump key is held.
static float LegacyRiseGravityReleased constexpr
Non-Reforged rise gravity once the jump key is released.
static float LegacyRiseGravityReleasedNearApex constexpr
Non-Reforged released rise gravity below LegacyRiseBrakeEaseSpeed.
static float LegacyRiseBrakeEaseSpeed constexpr
Rise speed below which the non-Reforged released rise eases off.
static float LegacyFallGravity constexpr
Non-Reforged fall gravity.
static float LegacyWaterGravity constexpr
Non-Reforged underwater gravity.
static float LegacyWaterEnterDepth constexpr
How far below the surface the non-Reforged player starts swimming (px).
static float LegacyWaterExitDepth constexpr
How far below the surface the non-Reforged player stops swimming (px).
static float LegacyWaterJumpDepth constexpr
How far below the surface a non-Reforged swimmer can still jump out of the water (px).
static float LegacyWaterJumpBoost constexpr
How much stronger than a jump off the ground the non-Reforged jump out of the water launches.
static float LegacyAppliedSpeedCap constexpr
Non-Reforged cap on applied movement, on both axes.
static float LegacyRiseSpeedCap constexpr
Non-Reforged applied upward-speed cap.
static float LegacyVerticalSpeedLimit constexpr
Non-Reforged limit of internal speed, on either axis.

Flying carrot

Measured from hand-played recordings in the original, scripted input can't fly.

static float LegacyFlyRiseAccel constexpr
static float LegacyFlyRiseBrake constexpr
Deceleration of a climb once Up is released, until it reaches zero.
static float LegacyFlyRiseBrakeHeld constexpr
Deceleration of a climb while Jump is held.
static float LegacyFlyDescentSpeed constexpr
Descent speed while Down is held.
static float LegacyFlyFallAccel constexpr
Downward acceleration once the flight is actually falling, to LegacyFlyTerminalSpeed.
static float LegacyFlyTerminalSpeed constexpr
Terminal speed of the flight's unpowered descent.
static float LegacyLizardCopterDuration constexpr
How long a ride on the lizard copter lasts outside Reforged.
static float SugarRushDuration constexpr
How long the sugar rush lasts, 1400 ticks of the original.
static float InvincibleCarrotDuration constexpr
How long the invincibility carrot protects, 1050 ticks of the original.
static float EnergyCarrotInvulnerability constexpr
How long the energy carrot protects, 70 ticks of the original.
static float SpeedTileThreshold constexpr
Speed above which the player breaks a speed tile, 8 px per tick of the original.
static std::int32_t GemsPerLife constexpr
Number of gems of the total that give a life.
static float LegacyFlyDuration constexpr
How long the flight lasts, practically until it is cancelled.

Run-in-place wind-up accumulator

The wind-up is entered on a decaying charge rather than a tap count. The shape is measured, the numbers are fitted to the boundary cases.

static float RevUpChargeGainTap constexpr
What one press is worth.
static float RevUpChargeGainHeld constexpr
static float RevUpChargeHeldCap constexpr
The most one press can add by being held.
static float RevUpChargeDecay constexpr
static std::int32_t RevUpPressesRequired constexpr
Presses below which nothing happens at all, whatever the charge.
static float RevUpChargeLightThreshold constexpr
Enough to launch when the tapping stops, but not to show the wind-up.
static float RevUpChargeThreshold constexpr
Where the wind-up itself begins, above what three plain taps reach.

Sliding to a halt

walk_stop plays once, dash_stop loops until the speed falls below this, then run_stop plays once. Measured in the original and shared with Reforged, since it's only an animation.

static float StopSettleSpeed constexpr
static float LegacyDashAnimSpeed constexpr
Speed above which the dash animation is shown.
static float LegacyRunAnimFrameTicks constexpr
Ticks one frame of a ground-run animation lasts at a standstill.
static float LegacyRunAnimMinFrameTicks constexpr
The floor on LegacyRunAnimFrameTicks, one frame per tick.
static float LegacySpringAnimMinFrameTicks constexpr
Fastest the non-Reforged spring pose runs (original 2 ticks per frame).
static float LegacySpringAnimMaxFrameTicks constexpr
Slowest the non-Reforged spring pose runs (original 8 ticks per frame).
static AnimState HorizontalAnimMask constexpr
The two-bit horizontal speed field of a composite animation state.
static AnimState VerticalAnimMask constexpr
The vertical field beside it, AnimState::Jump | AnimState::Fall.

Enum documentation

enum class Jazz2::Actors::Player::Modifier : std::uint8_t

Modifier.

Enumerators
None

No modifier

Airboard

Riding an airboard

Copter

Using a copter

LizardCopter

Using a lizard copter

enum class Jazz2::Actors::Player::SpecialMoveType : std::uint8_t

Special move type.

Enumerators
None

No special move

Buttstomp

Buttstomp

Uppercut

Uppercut

Sidekick

Sidekick

enum class Jazz2::Actors::Player::InvulnerableType

Type of invulnerability.

Enumerators
Transient

Invulnerable without any visual effect

Blinking

Invulnerable with blinking effect

Shielded

Invulnerable due to an active shield

enum class Jazz2::Actors::Player::FlightType

Type of copter flight state.

Enumerators
Normal

Timed/regular flight

Cheat

Cheat-enabled flight

enum class Jazz2::Actors::Player::LevelExitingState : std::uint8_t protected

State of level exiting.

Enumerators
None

Not exiting

Waiting

Waiting before exiting

WaitingForWarp

Waiting for a warp to complete

Transition

Playing the exit transition

Ready

Ready to exit

enum class Jazz2::Actors::Player::WeaponWheelState : std::uint8_t protected

State of HUD weapon wheel.

Enumerators
Hidden

Hidden

Opening

Opening

Visible

Visible

Closing

Closing

enum class Jazz2::Actors::Player::StopPhase : std::uint8_t protected

Phase of the chain of poses a player sliding to a halt goes through.

Enumerators
None

Not sliding to a halt

Skid

walk_stop, played once

Slide

dash_stop, looping until the speed falls below StopSettleSpeed

Settle

run_stop, played once and followed by standing

Hold

The skid held on its last frame, for a slide too slow to reach StopPhase::Slide

enum class Jazz2::Actors::Player::SetCurrentWeaponReason protected

Reason the current weapon was changed.

Enumerators
Unknown

Unspecified

User

Set by the user

Rollback

Set due to rollback

AddAmmo

Set because an ammo for a new weapon was collected

AddUpgrade

Set because a new upgrade for a weapon was collected

Shield

Set because a shield was activated

Function documentation

static std::int32_t Jazz2::Actors::Player::GetInvulnerableStrength(InvulnerableType type) constexpr

Returns the rank of a InvulnerableType.

GrantInvulnerability() never replaces a running effect with a lower-ranked one.

static void Jazz2::Actors::Player::DrawShield(RenderQueue& renderQueue, ShieldType shieldType, float shieldTime, Metadata* metadata, float elapsedFrames, Vector2f pos, std::uint16_t baseLayer, std::unique_ptr<RenderCommand>(&shieldRenderCommands)[2])

Draws the active shield decoration around a position.

Parameters
renderQueue Render queue
shieldType Active shield type
shieldTime Remaining shield time, in frames
metadata Player's metadata
elapsedFrames Elapsed level frames
pos World position
baseLayer Base render layer
shieldRenderCommands Render commands owned by the caller

Shared by local and remote players.

static void Jazz2::Actors::Player::SpawnSugarRushStar(ILevelHandler* levelHandler, Metadata* metadata, Vector2f pos, std::uint16_t baseLayer)

Spawns a single star of the sugar rush trail at a position.

Parameters
levelHandler Level handler
metadata Player's metadata
pos World position
baseLayer Base render layer

Shared by local and remote players, every peer spawns its own stars.

static float Jazz2::Actors::Player::UpdateRemoteRevUp(ILevelHandler* levelHandler, Metadata* metadata, Vector2f pos, std::uint16_t baseLayer, bool facingLeft, float timeMult, float& revUpTime, float& sparkCooldown)

Advances a remote player's run-in-place and returns its animation speed factor.

Parameters
levelHandler Level handler
metadata Player's metadata
pos World position
baseLayer Base render layer
facingLeft Whether the player faces left
timeMult Frame time
revUpTime Caller's accumulator for how long the pose has been up
sparkCooldown Caller's accumulator for the spark interval
Returns Divisor for the pose's animation duration

The charge depends only on how long the pose has been up, so it's reproduced locally without being sent.

PlayerType Jazz2::Actors::Player::GetPersistentPlayerType() const

Returns the player type to carry over to the next level or to store.

A bird is never carried over, so the character it was taken from is returned instead.

std::uint32_t Jazz2::Actors::Player::GetEffectiveFurColor() const

Returns the fur color to actually use for this player.

Returns 0 if recoloring is disabled by preferences or while morphed into a bird.

std::int32_t Jazz2::Actors::Player::GetCameraLeadDirection() const

Returns the direction the non-Reforged camera leads in, -1, 0 or 1.

The direction held, zero during a special move. How far it leads comes from the speed, see Rendering::PlayerViewport.

float Jazz2::Actors::Player::GetCameraVerticalOffset() const

Returns how far the non-Reforged camera should drop below the player, in pixels.

Zero except during a buttstomp. Matches the original.

float Jazz2::Actors::Player::GetCameraLookOffset() const

Returns how far the non-Reforged camera is panned by looking up (negative) or down (positive), in pixels.

Holding Up or crouching for a moment pans the view, it eases back once released. Zero in Reforged.

void Jazz2::Actors::Player::ReceiveReturnCarryOver(ExitType exitType, const PlayerCarryOver& carryOver)

Called when the player returns to a restored level to receive carry over information.

Applies only the progress made in the level it's returning from. The exit it stands on is ignored until the player steps off it.

void Jazz2::Actors::Player::SetInvulnerability(float timeLeft, InvulnerableType type) virtual

Sets invulnerability, replacing whatever is running.

Can also weaken it, so server corrections go through it. timeLeft <= 0 clears it. Gameplay should use GrantInvulnerability() instead.

void Jazz2::Actors::Player::GrantInvulnerability(float timeLeft, InvulnerableType type)

Grants invulnerability without weakening what is already running.

Keeps the longer time and the stronger effect.

bool Jazz2::Actors::Player::CanMorphTo(PlayerType type)

Returns true if the player can morph to a given player type.

false if the character's sprites aren't available.

bool Jazz2::Actors::Player::MorphTo(PlayerType type) virtual

Morphs to a given player type.

Returns false if the player already has the type or its sprites aren't available.

bool Jazz2::Actors::Player::MorphToInstantly(PlayerType type) virtual

Changes the player type immediately, without any transition or effect.

Returns false if the player already has the type or its sprites aren't available.

void Jazz2::Actors::Player::MorphRevert()

Reverts a morph.

A temporary form reverts to the character it was taken from, others to the starting character.

bool Jazz2::Actors::Player::ApplyBlastKnockback(bool pushLeft, float distanceSqr)

Throws the player away from an RF blast.

Parameters
pushLeft Whether the player is thrown left
distanceSqr Squared distance from the blast
Returns false if the blast was too far away

Non-Reforged only, measured in the original.

void Jazz2::Actors::Player::SetCheckpointAmbientLight(float ambientLight)

Overrides the ambient light intensity to restore when respawning at the checkpoint.

Used online, where checkpoints are activated by the server.

void Jazz2::Actors::Player::OnSerializeState(Stream& dest) override protected

Serializes the live state of the object to a level state snapshot.

State set from the event parameters needn't be stored, the object is spawned again with them. Derived classes call the base first and read the data back in the same order.

void Jazz2::Actors::Player::OnDeserializeState(Stream& src) override protected

Restores the live state of the object from a level state snapshot.

Called after OnActivatedAsync(), before the object is added to the level. Running transitions aren't restored, so the restored state must not wait for a transition callback.

void Jazz2::Actors::Player::OnEmitRemotedLights(SmallVectorImpl<LightEmitter>& lights) override protected

Called when emitting lights that have to be replicated to remote peers.

Defaults to OnEmitLights(). Override it to leave out lights that clients produce on their own.

bool Jazz2::Actors::Player::ApplyPlayerBump(Player& other, bool stackingEnabled) protected

Pushes this player and other apart so they can't overlap.

Parameters
other The other player in contact
stackingEnabled If true, vertical overlap is left to UpdatePlayerStacking
Returns true if the players were separated

Equal-mass elastic separation along the axis of least penetration.

void Jazz2::Actors::Player::UpdatePlayerStacking(float timeMult, bool snap) protected

Lets this player stand on top of another player as on a one-way platform.

Parameters
timeMult Frame time multiplier
snap Whether to move the feet onto the player below, false only grounds it

Call before the physics update so jump input sees it.

void Jazz2::Actors::Player::OnHandleSpectate(float timeMult) virtual protected

Called each frame while the player is in PlayerType::Spectate mode.

By default, flies the invisible player around with the movement keys.

Variable documentation

static float Jazz2::Actors::Player::LegacyEnemyStompBounce constexpr

Non-Reforged bounce off an enemy hit by a buttstomp.

Faster than the fall itself. The ascent decays at the released rise rate, see GetGravityModifier().

static float Jazz2::Actors::Player::HitboxLeft constexpr

How far the hitbox reaches left of the player's centre.

Measured in the original: a floor holds the player up 12 px past a right-hand edge and 11 px before a left-hand one, and a wall stops it 12 px away on the left and 11 px away on the right.

static float Jazz2::Actors::Player::LegacyAirFloorSnap constexpr

How far below the non-Reforged player's move a floor still catches it while falling sideways.

Measured in the original with a fixed fall and horizontal speed: from 2 px/tick across, the player lands whenever the floor is less than 8 px under where the tick's move leaves it, at every fall speed tried. While dashing it reaches further, see LegacyAirFloorSnapDashExtra.

static float Jazz2::Actors::Player::LegacyButtstompHoldTime constexpr

How long the non-Reforged buttstomp hovers before the descent, in seconds.

39 ticks from the press to the first descending tick in the original, after a jump or a fall alike.

static float Jazz2::Actors::Player::LegacyButtstompDriftSpeed constexpr

Non-Reforged sideways drift speed during a buttstomp, doubled with Run.

A flat rate applied through the whole move, bypassing the player's speed.

static float Jazz2::Actors::Player::LegacyPushSpeed constexpr

Non-Reforged speed while pushing a solid object.

A flat rate, whatever the player was doing before.

static float Jazz2::Actors::Player::LegacyCopterWindUp constexpr

Rate the non-Reforged copter descent accelerates towards LegacyCopterDescentSpeed.

Visible only when the copter is engaged with little vertical speed, a faster fall drops straight to it.

static float Jazz2::Actors::Player::LegacyCopterAscentBrake constexpr

Rate copter ears set to rise brake a fall at, before the rise begins.

The rise then winds up only while Jump is held, so tapping hovers rather than climbs. Measured in JJ2+.

static float Jazz2::Actors::Player::LegacyDoubleJumpKeyUpTime constexpr

How long Jump has to be up before a press can double jump.

Tapping faster never double jumps. Measured in JJ2+.

static float Jazz2::Actors::Player::LegacyGroundMoveWindUp constexpr

Wind-up of the uppercut and the sidekick, in seconds.

The same for both moves and every character in the original, transitions are played to fit it.

static float Jazz2::Actors::Player::LegacyCopterFloorSnap constexpr

How close a floor has to be for copter ears moving sideways to drop onto it.

Not without a horizontal speed. Measured in JJ2+.

static float Jazz2::Actors::Player::LegacyCopterLandGrace constexpr

How long copter ears outlive a landing they dropped onto.

A jump right after keeps them going. Measured in JJ2+.

static float Jazz2::Actors::Player::LegacyDoubleJumpSpeed constexpr

Non-Reforged launch speed of Spaz's double jump.

A straight speed assignment, height is controlled by holding the key like the first jump.

static float Jazz2::Actors::Player::LegacyDoubleJumpWindowTime constexpr

How long Spaz's non-Reforged double jump stays available.

A timer started when the jump key is released, not a band of fall speeds. Measured in the original.

static float Jazz2::Actors::Player::LegacyUppercutSpeed constexpr

Launch speed of Jazz's non-Reforged uppercut.

Taken from the distance travelled in the original, not its reported speed. Gravity is nearly off while it runs, see LegacyUppercutGravity.

static float Jazz2::Actors::Player::LegacyRFBlastSpeed constexpr

Speed a non-Reforged RF blast throws the player at.

Held for LegacyRFBlastHoldTicks with friction and direction keys suppressed, then it decelerates like after a sidekick. Measured in the original.

static float Jazz2::Actors::Player::LegacyRFBlastLiftBase constexpr

Upward kick the same blast gives a player standing on the floor, at zero range.

Grows with the range, a linear fit of the measurement in the original.

static float Jazz2::Actors::Player::LegacyRFBlastReach constexpr

How close to a non-Reforged RF blast the player has to be to be thrown by it.

Distance from the shot, not from the wall. No lower bound.

static float Jazz2::Actors::Player::LegacySpazSidekickDistance constexpr

Distance the driven part of Spaz's non-Reforged sidekick covers.

Afterwards the speed snaps to the walk cap and the ordinary deceleration stops him.

static float Jazz2::Actors::Player::SidekickDistanceEpsilon constexpr

Remainder of a sidekick's distance that counts as none left.

Below float resolution of level coordinates, a smaller remainder could never be worked off and the kick would hang in mid-air.

static float Jazz2::Actors::Player::LegacySpringHoldTicks constexpr

Ticks a horizontal spring's launch speed is held before it clamps to LegacyCarryExitRunSpeed.

Changes only the speed, not the travel, but a jump out of the launch takes its boost from it.

static float Jazz2::Actors::Player::LegacySpringRebuildTicks constexpr

Ticks a spring launch's speed takes to rebuild after a double jump discards it.

The rebuild runs at the launch speed divided by this, up to LegacyDashSpeed. Only a spring arms it.

static float Jazz2::Actors::Player::LegacyWarpOutControlTime constexpr

How long after a warp lands control comes back outside Reforged.

The warp-out animation still plays, but control doesn't wait for it. Matches the original.

static float Jazz2::Actors::Player::LegacyLoriKickPushDrain constexpr

Rate a blocked kick of Lori's spends LegacyLoriSidekickDistance at, per frame.

A flat rate, so a blocked kick lasts as long as the original's.

static float Jazz2::Actors::Player::LegacyLoriKickRamp constexpr

Quadratic ramp of Lori's non-Reforged kick, per tick squared.

Her kick accelerates quadratically instead of starting at its peak. Measured in the original.

static float Jazz2::Actors::Player::LegacyLoriSidekickSpeed constexpr

Non-Reforged sidekick launch speed for Lori.

Her kick is the one move exempt from LegacyAppliedSpeedCap, see OnUpdatePhysics().

static float Jazz2::Actors::Player::LegacyPoleLaunchBonus constexpr

Non-Reforged speed a vertical pole adds to the one the player arrived with.

So chained poles or a pole entered off a spring compound.

static float Jazz2::Actors::Player::LegacyHPoleLaunchBonus constexpr

Non-Reforged speed a horizontal pole adds to the one the player arrived with.

Capped at LegacyHPoleMaxLaunch. Measured in the original.

static float Jazz2::Actors::Player::LegacyHPoleCrouchBlockTime constexpr

How long the non-Reforged horizontal pole refuses the crouch after its launch.

Lasts as long as the pole's exit animation. Measured in the original.

static float Jazz2::Actors::Player::LegacyFloatUpSpeed constexpr

Speed a non-Reforged float-up area holds the player at.

Assigned every frame inside the area, even to a grounded player. Measured in the original.

static float Jazz2::Actors::Player::LegacyFloatUpFallCap constexpr

Fastest a non-Reforged player descends while inside a float-up area.

Caps the movement, not the speed, so it also slows a buttstomp. Measured in the original.

static float Jazz2::Actors::Player::LegacyWaterSpeed constexpr

Non-Reforged swimming speed cap, doubled while Run is held.

Applies on both axes. The original tests the cap before adding, so the speed ends one step past it.

static float Jazz2::Actors::Player::LegacyWaterCoast constexpr

Non-Reforged horizontal coasting under water with nothing held, as a share of the speed per tick.

Applied until the speed is below LegacyWaterCoastStop. Measured in JJ2+.

static float Jazz2::Actors::Player::LegacyWindFactor constexpr

Pixels a non-Reforged wind area moves the player per unit of its strength.

Moves the position, not the speed.

static float Jazz2::Actors::Player::LegacyBeltFactor constexpr

Pixels a non-Reforged belt moves the player per unit of its strength.

Moves the position, not the speed. Twice LegacyWindFactor, they don't share a strength.

static float Jazz2::Actors::Player::LegacyAccBeltSpeed constexpr

Speed a non-Reforged accelerating belt drives the player to, per unit of strength.

Unlike the other belts, it ramps the speed up and then holds it.

static float Jazz2::Actors::Player::LegacyAccBeltStep constexpr

How much an accelerating belt adds per tick, per unit of strength.

Applied after the brake, otherwise the steady state falls one friction step short.

static std::int32_t Jazz2::Actors::Player::LegacyAccBeltRunBonus constexpr

Strength a non-Reforged accelerating belt gains while Run is held.

Raises only the target speed, by a flat amount. Measured in the original.

static float Jazz2::Actors::Player::LegacyCarryExitRunSpeed constexpr

Speed a non-Reforged carry clamps to when it ends with Run held.

Leaving a sucker tube or an accelerating belt clamps the speed to this, or to LegacyWalkSpeed with nothing held.

static float Jazz2::Actors::Player::MaxPushingSpeed protected constexpr

Speed above which the player is no longer considered to be pushing.

Ends the push animation even if the push grace timer hasn't expired yet.

static float Jazz2::Actors::Player::LegacyWalkAccel constexpr

Non-Reforged horizontal acceleration with no Run.

Applied in the direction of the input, on the ground and in the air alike, so turning around is symmetric.

static float Jazz2::Actors::Player::LegacySlideWalkDecel constexpr

Non-Reforged deceleration on a strength-0 slide tile, no direction held.

The walk and dash slide brakes don't share a ratio, so both are measured separately.

static float Jazz2::Actors::Player::LegacySlideWalkDecelStep constexpr

How much each step of a slide tile's strength takes off LegacySlideWalkDecel.

Linear in the strength. Measured in the original.

static float Jazz2::Actors::Player::TubeControlTime constexpr

How long a sucker tube keeps hold of the player.

Measured in the original, but used in both modes. Re-armed every frame inside a tube tile, it suppresses horizontal friction but not gravity.

static float Jazz2::Actors::Player::TubeSnapY constexpr

Where in its tile a horizontal sucker tube holds the player, from the top.

Measured in the original, used in both modes.

static float Jazz2::Actors::Player::TubeBallPoseTime constexpr

How long the sucker tube's ball pose stays after leaving the last tube tile.

Affects only the pose, not the movement. Measured in the original.

static float Jazz2::Actors::Player::LegacyDashGraceTicks constexpr

How long the non-Reforged dash outlives the Run key.

The full LegacyDashSpeed is kept until then, and clamped back to LegacyWalkSpeed in a single frame.

static float Jazz2::Actors::Player::LegacyCameraButtstompDrop constexpr

How far the non-Reforged camera drops during a buttstomp.

The only vertical camera lead in the original. Measured in the original.

static float Jazz2::Actors::Player::LandAnimFrameTicks constexpr

Ticks the non-Reforged landing pose spends on each of its frames.

Deliberately slower than the original, chosen by eye. Per frame, because Lori's landing has more frames than Jazz's and Spaz's.

static float Jazz2::Actors::Player::SidekickEndSpeedUp constexpr

How much faster the sidekick's ending animation plays, in both modes.

Deliberately faster than the original, the pose looked too slow in play.

static float Jazz2::Actors::Player::LegacyRevUpJumpBoost constexpr

Extra launch speed of a jump out of a run-in-place, about a tile of height.

Fitted, not measured, because the wind-up can't be driven from a script.

static float Jazz2::Actors::Player::LegacyRiseGravityReleased constexpr

Non-Reforged rise gravity once the jump key is released.

Releasing jump makes the rest of the rise heavier instead of clamping the speed. It eases off near the apex, see LegacyRiseGravityReleasedNearApex.

static float Jazz2::Actors::Player::LegacyWaterGravity constexpr

Non-Reforged underwater gravity.

Applied in HandleWaterAndModifierMovement(), because OnHandleWater() disables gravity for a swimming player.

static float Jazz2::Actors::Player::LegacyAppliedSpeedCap constexpr

Non-Reforged cap on applied movement, on both axes.

The speed above the cap is momentum, it still counts wherever the speed itself is read (e.g., jump launch).

static float Jazz2::Actors::Player::LegacyVerticalSpeedLimit constexpr

Non-Reforged limit of internal speed, on either axis.

Changes only how long a launch rides LegacyRiseSpeedCap. Only a sidekick is assigned above it.

static float Jazz2::Actors::Player::LegacyFlyRiseBrake constexpr

Deceleration of a climb once Up is released, until it reaches zero.

Different from LegacyRiseGravityReleased. Measured in the original.

static float Jazz2::Actors::Player::LegacyFlyDescentSpeed constexpr

Descent speed while Down is held.

Assigned outright, not accelerated towards.

static float Jazz2::Actors::Player::LegacyLizardCopterDuration constexpr

How long a ride on the lizard copter lasts outside Reforged.

A plain timer. The rest of the ride shares the flying carrot's model.

static float Jazz2::Actors::Player::LegacyFlyDuration constexpr

How long the flight lasts, practically until it is cancelled.

The original flies until a Fly Off area or a death.

static float Jazz2::Actors::Player::RevUpChargeGainTap constexpr

What one press is worth.

Three quick taps must never reach RevUpChargeThreshold, only with the last one held.

static float Jazz2::Actors::Player::RevUpChargeHeldCap constexpr

The most one press can add by being held.

Otherwise just holding Run on the spot would wind the player up.

static std::int32_t Jazz2::Actors::Player::RevUpPressesRequired constexpr

Presses below which nothing happens at all, whatever the charge.

Two held presses could reach the threshold by charge alone.

static float Jazz2::Actors::Player::RevUpChargeLightThreshold constexpr

Enough to launch when the tapping stops, but not to show the wind-up.

The player stands idle meanwhile and launches on release.

static float Jazz2::Actors::Player::LegacyDashAnimSpeed constexpr

Speed above which the dash animation is shown.

run up to the walk cap, dash_start from there to this, dash above it. Measured in the original.

static float Jazz2::Actors::Player::LegacyRunAnimFrameTicks constexpr

Ticks one frame of a ground-run animation lasts at a standstill.

A frame lasts max(1, 12 - |speed|) ticks, as in the original, not the animation's own rate.

static float Jazz2::Actors::Player::LegacySpringAnimMinFrameTicks constexpr

Fastest the non-Reforged spring pose runs (original 2 ticks per frame).

The launch pose follows the same 12 - speed rule off the vertical speed, with its own floor and ceiling.

static AnimState Jazz2::Actors::Player::HorizontalAnimMask constexpr

The two-bit horizontal speed field of a composite animation state.

A mask, because AnimState::Dash is AnimState::Walk | AnimState::Run.