Skip to content

Commit f610ea6

Browse files
committed
minor refactoring regarding LimbPaths and locomotion
1 parent 3c6a6f3 commit f610ea6

File tree

15 files changed

+199
-179
lines changed

15 files changed

+199
-179
lines changed

CHANGELOG.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4242
Lua function `GetAudibleVolume` to get the real audible volume of a SoundContainer's sounds as a float from 0 to 1. This accounts for literally everything, including game volume.
4343

4444
- New `LimbPath` features.
45-
New `LimbPath` INI property `ScaleMultiplier`, which is a vector. This will scale the X/Y axes of the limbpath accordingly, allowing for easily adjusting limbpaths to differently sized actors.
45+
New `LimbPath` INI and Lua (R/W) property `BaseTravelSpeedMultiplier` which is a multiplier on the TravelSpeed of that LimbPath, on top of any other gameplay multipliers like from crouching.
46+
New `LimbPath` INI and Lua (R/W) property `BaseScaleMultiplier`, which is a vector. This will scale the X/Y axes of the limbpath accordingly, allowing for easily adjusting limbpaths to differently sized actors, on top of any other gameplay multipliers like from running.
4647
New `LimbPath` INI property `SegmentEndedThreshold`, which defines the distance the limb must be from the end of the segment before it's considered complete. This defaults to 2.5.
47-
The `TravelSpeedMultiplier` property has been adjusted to work more consistently when interacting with script.
48+
Exposed `LimbPath` properties `TravelSpeed` and `PushForce` to Lua (R/W).
4849

4950
- New `AEmitter` and `PEmitter` INI and Lua (R/W) property `PlayBurstSound` which denotes whether the BurstSound should play when appropriate. This should not be confused for a trigger - it's just a enable/disable toggle to avoid having to remove and add BurstSound altogether.
5051

@@ -69,6 +70,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6970

7071
- MOs now only play the BurstSound of the first Wound they receive in a frame, which not only solves audio spam during e.g. explosions but also preserves intended audio when firing guns with a high ParticleCount at them.
7172

73+
- Changed how Get and SetLimbPathSpeed/PushForce work for `AHuman` and `ACrab`. The functions are as following:
74+
`GetLimbPathSpeed` has been renamed to `GetLimbPathTravelSpeed`.
75+
`SetLimbPathSpeed` has been renamed to `SetLimbPathTravelSpeed`.
76+
`GetLimbPathTravelSpeed(Actor.MovementState)` returns the FG/left side (for crabs) limb path travel speed for that specific movement state, instead of being hardcoded to walking only.
77+
`SetLimbPathTravelSpeed(Actor.MovementState, float newValue)` sets the travel speed for all layers and sides of any particular movement state's limb paths, instead of being hardcoded to walking only.
78+
`GetLimbPathPushForce(Actor.MovementState)` returns the FG/left side (for crabs) limb path push force for that specific movement state, instead of being hardcoded to walking only.
79+
`SetLimbPathPushForce(Actor.MovementState, float newValue)` sets the push force for all layers and sides of any particular movement state's limb paths, instead of being hardcoded to walking only.
80+
81+
- The `LimbPath` property `NormalTravelSpeed` has been renamed to just `TravelSpeed`.
82+
7283
</details>
7384

7485
<details><summary><b>Fixed</b></summary>
@@ -94,6 +105,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
94105

95106
- Removed `AHuman` property `MaxCrouchRotation`. `CrouchRotAngleTarget` is now used instead.
96107

108+
- Deprecated `LimbPath` properties `SlowTravelSpeed`, `NormalTravelSpeed` and `FastTravelSpeed`. For the sake of backwards compatibility they will not crash the game and `NormalTravelSpeed` is a valid synonym for the new `TravelSpeed`.
109+
97110
</details>
98111

99112
## [Release v6.2.2] - 2024/02/24

Data/Base.rte/Scripts/Global/FasterWalking.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ function FasterWalkingScript:BoostWalkSpeed(actor)
2323
end
2424
if walker then
2525
actor:SetNumberValue("FasterWalkingScript", 1);
26-
walker:SetLimbPathSpeed(0, walker:GetLimbPathSpeed(0) * self.multiplier);
27-
walker:SetLimbPathSpeed(1, walker:GetLimbPathSpeed(1) * self.multiplier);
28-
walker:SetLimbPathSpeed(2, walker:GetLimbPathSpeed(2) * self.multiplier);
29-
walker.LimbPathPushForce = walker.LimbPathPushForce * self.pushForceDenominator;
26+
walker:SetLimbPathTravelSpeed(Actor.WALK, walker:GetLimbPathTravelSpeed(Actor.WALK) * self.multiplier);
27+
walker:SetLimbPathTravelSpeed(Actor.RUN, walker:GetLimbPathTravelSpeed(Actor.RUN) * self.multiplier);
28+
walker:SetLimbPathPushForce(Actor.WALK, walker:GetLimbPathPushForce(Actor.WALK) * self.pushForceDenominator);
29+
walker:SetLimbPathPushForce(Actor.RUN, walker:GetLimbPathPushForce(Actor.RUN) * self.pushForceDenominator);
3030
end
3131
end

Data/Imperatus.rte/Actors/Infantry/AllPurpose/AllPurposeRobot.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ AddActor = AHuman
606606
CrouchLimbPathBG = LimbPath
607607
CopyOf = Human Crouch Path BG
608608
CrouchRotAngleTarget = -0.5
609+
CrouchWalkSpeedMultiplier = 0.6
609610
CrawlLimbPath = LimbPath
610611
PresetName = Robot Crawl Path
611612
StartOffset = Vector

Data/Imperatus.rte/Actors/Infantry/Combat/CombatRobot.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ AddActor = AHuman
571571
CrouchLimbPathBG = LimbPath
572572
CopyOf = Human Crouch Path BG
573573
CrouchRotAngleTarget = -0.4
574+
CrouchWalkSpeedMultiplier = 0.45
574575
CrawlLimbPath = LimbPath
575576
CopyOf = Robot Crawl Path
576577
ArmCrawlLimbPath = LimbPath

Data/Imperatus.rte/Actors/Shared/Robot.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
function Create(self)
2-
self.walkSpeed = self:GetLimbPathSpeed(1);
2+
self.baseWalkSpeed = self:GetLimbPathTravelSpeed(Actor.WALK);
33
end
44

55
function ThreadedUpdate(self)
6-
if self.Health > 0 then
6+
self:SetLimbPathTravelSpeed(Actor.WALK, self.baseWalkSpeed);
7+
local controller = self:GetController();
8+
if self.Health > 0 and not controller:IsState(Controller.BODY_WALKCROUCH) then
79
local walkSpeedScalar = 2.3;
810
local legs = {self.FGLeg, self.BGLeg};
911
for _, leg in pairs(legs) do
1012
walkSpeedScalar = walkSpeedScalar - (leg and leg.Frame/leg.FrameCount or 1.1);
1113
end
12-
self:SetLimbPathSpeed(1, self.walkSpeed * walkSpeedScalar);
14+
self:SetLimbPathTravelSpeed(Actor.WALK, self.baseWalkSpeed * walkSpeedScalar);
1315
--[[Display health as relative to physical damage? (to-do this in source instead)
1416
if self.Head and (self.FGArm or self.BGArm or self.FGLeg or self.BGLeg) then
1517
local limbs = {self.Head, self.FGArm, self.BGArm, self.FGLeg, self.BGLeg};

Source/Entities/ACrab.cpp

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -811,10 +811,11 @@ void ACrab::PreControllerUpdate() {
811811

812812
m_MoveState = WALK;
813813

814-
for (int side = 0; side < SIDECOUNT; ++side) {
815-
m_Paths[side][FGROUND][m_MoveState].SetSpeed(m_Controller.IsState(MOVE_FAST) ? FAST : NORMAL);
816-
m_Paths[side][BGROUND][m_MoveState].SetSpeed(m_Controller.IsState(MOVE_FAST) ? FAST : NORMAL);
817-
}
814+
// Was never actually used
815+
//for (int side = 0; side < SIDECOUNT; ++side) {
816+
// m_Paths[side][FGROUND][m_MoveState].SetSpeed(m_Controller.IsState(MOVE_FAST) ? FAST : NORMAL);
817+
// m_Paths[side][BGROUND][m_MoveState].SetSpeed(m_Controller.IsState(MOVE_FAST) ? FAST : NORMAL);
818+
//}
818819
}
819820

820821
// Walk backwards if the aiming is already focused in the opposite direction of travel.
@@ -1434,28 +1435,28 @@ void ACrab::DrawHUD(BITMAP* pTargetBitmap, const Vector& targetPos, int whichScr
14341435
}
14351436
}
14361437

1437-
float ACrab::GetLimbPathSpeed(int speedPreset) const {
1438-
return m_Paths[LEFTSIDE][FGROUND][WALK].GetSpeed(speedPreset);
1438+
float ACrab::GetLimbPathTravelSpeed(MovementState movementState) {
1439+
return m_Paths[LEFTSIDE][FGROUND][movementState].GetTravelSpeed();
14391440
}
14401441

1441-
void ACrab::SetLimbPathSpeed(int speedPreset, float speed) {
1442-
m_Paths[LEFTSIDE][FGROUND][WALK].OverrideSpeed(speedPreset, speed);
1443-
m_Paths[RIGHTSIDE][FGROUND][WALK].OverrideSpeed(speedPreset, speed);
1442+
void ACrab::SetLimbPathTravelSpeed(MovementState movementState, float newSpeed) {
1443+
m_Paths[LEFTSIDE][FGROUND][movementState].SetTravelSpeed(newSpeed);
1444+
m_Paths[RIGHTSIDE][FGROUND][movementState].SetTravelSpeed(newSpeed);
14441445

1445-
m_Paths[LEFTSIDE][BGROUND][WALK].OverrideSpeed(speedPreset, speed);
1446-
m_Paths[RIGHTSIDE][BGROUND][WALK].OverrideSpeed(speedPreset, speed);
1446+
m_Paths[LEFTSIDE][BGROUND][movementState].SetTravelSpeed(newSpeed);
1447+
m_Paths[RIGHTSIDE][BGROUND][movementState].SetTravelSpeed(newSpeed);
14471448
}
14481449

1449-
float ACrab::GetLimbPathPushForce() const {
1450-
return m_Paths[LEFTSIDE][FGROUND][WALK].GetDefaultPushForce();
1450+
float ACrab::GetLimbPathPushForce(MovementState movementState) {
1451+
return m_Paths[LEFTSIDE][FGROUND][movementState].GetPushForce();
14511452
}
14521453

1453-
void ACrab::SetLimbPathPushForce(float force) {
1454-
m_Paths[LEFTSIDE][FGROUND][WALK].OverridePushForce(force);
1455-
m_Paths[RIGHTSIDE][FGROUND][WALK].OverridePushForce(force);
1454+
void ACrab::SetLimbPathPushForce(MovementState movementState, float newForce) {
1455+
m_Paths[LEFTSIDE][FGROUND][movementState].SetPushForce(newForce);
1456+
m_Paths[RIGHTSIDE][FGROUND][movementState].SetPushForce(newForce);
14561457

1457-
m_Paths[LEFTSIDE][BGROUND][WALK].OverridePushForce(force);
1458-
m_Paths[RIGHTSIDE][BGROUND][WALK].OverridePushForce(force);
1458+
m_Paths[LEFTSIDE][BGROUND][movementState].SetPushForce(newForce);
1459+
m_Paths[RIGHTSIDE][BGROUND][movementState].SetPushForce(newForce);
14591460
}
14601461

14611462
int ACrab::WhilePieMenuOpenListener(const PieMenu* pieMenu) {

Source/Entities/ACrab.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -224,24 +224,24 @@ namespace RTE {
224224
/// @return The LimbPath corresponding to the passed in Layer and MovementState values.
225225
LimbPath* GetLimbPath(Side side, Layer layer, MovementState movementState) { return &m_Paths[side][layer][movementState]; }
226226

227-
/// Get walking limb path speed for the specified preset.
228-
/// @param speedPreset Speed preset to set 0 = LimbPath::SLOW, 1 = Limbpath::NORMAL, 2 = LimbPath::FAST
229-
/// @return Limb path speed for the specified preset in m/s.
230-
float GetLimbPathSpeed(int speedPreset) const;
231-
232-
/// Set walking limb path speed for the specified preset.
233-
/// @param speedPreset Speed preset to set 0 = LimbPath::SLOW, 1 = Limbpath::NORMAL, 2 = LimbPath::FAST. New speed value in m/s.
234-
void SetLimbPathSpeed(int speedPreset, float speed);
235-
236-
/// Gets the default force that a limb traveling walking LimbPath can push against
237-
/// stuff in the scene with.
238-
/// @return The default set force maximum, in kg * m/s^2.
239-
float GetLimbPathPushForce() const;
240-
241-
/// Sets the default force that a limb traveling walking LimbPath can push against
242-
/// stuff in the scene with.
243-
/// @param force The default set force maximum, in kg * m/s^2.
244-
void SetLimbPathPushForce(float force);
227+
/// Shortcut to get the speed of a particular move state's FG (and left side if relevant) limb path.
228+
/// @param movementState Which movement state to get the limb path speed for.
229+
/// @return Limb path speed for the specified movement state in m/s.
230+
float GetLimbPathTravelSpeed(MovementState movementState);
231+
232+
/// Shortcut to set the speed of a particular move state's limb path, including all layers (and sides if relevant)
233+
/// @param movementState Which movement state to set the limb path speed for.
234+
/// @param newSpeed New speed value in m/s.
235+
void SetLimbPathTravelSpeed(MovementState movementStateourmaxmovement, float newSpeed);
236+
237+
/// Shortcut to get the push force of a particular move state's FG (and left side if relevant) limb path.
238+
/// @return The push force, in kg * m/s^2.
239+
float GetLimbPathPushForce(MovementState movementState);
240+
241+
/// Shortcut to set the push force of a particular move state's limb path, including all layers (and sides if relevant)
242+
/// @param movementState Which movement state to set the limb path speed for.
243+
/// @param newForce New push force value in kg * m/s^2.
244+
void SetLimbPathPushForce(MovementState movementState, float newForce);
245245

246246
/// Gets this ACrab's stride sound. Ownership is NOT transferred!
247247
/// @return The SoundContainer for this ACrab's stride sound.

Source/Entities/AHuman.cpp

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,9 @@ int AHuman::Create(const AHuman& reference) {
218218
if (m_Paths[FGROUND][RUN].GetSegCount() == 0) {
219219
m_Paths[FGROUND][RUN].Create(reference.m_Paths[FGROUND][WALK]);
220220
m_Paths[BGROUND][RUN].Create(reference.m_Paths[BGROUND][WALK]);
221-
m_Paths[FGROUND][RUN].SetBaseSpeedMultiplier(reference.m_Paths[FGROUND][WALK].GetSpeed(Speed::FAST) / reference.m_Paths[FGROUND][WALK].GetSpeed(Speed::NORMAL));
222-
m_Paths[BGROUND][RUN].SetBaseSpeedMultiplier(reference.m_Paths[BGROUND][WALK].GetSpeed(Speed::FAST) / reference.m_Paths[BGROUND][WALK].GetSpeed(Speed::NORMAL));
221+
// Sensible default multiplier
222+
m_Paths[FGROUND][RUN].SetTravelSpeed(m_Paths[FGROUND][RUN].GetTravelSpeed() * 1.5);
223+
m_Paths[BGROUND][RUN].SetTravelSpeed(m_Paths[BGROUND][RUN].GetTravelSpeed() * 1.5);
223224
}
224225

225226
return 0;
@@ -1419,22 +1420,17 @@ void AHuman::UpdateCrouching() {
14191420
}
14201421

14211422
void AHuman::UpdateLimbPathSpeed() {
1422-
// Reset travel speed so limbpath GetSpeed() gives us sensible values
1423-
m_Paths[FGROUND][m_MoveState].SetTravelSpeedMultiplier(1.0F);
1424-
m_Paths[BGROUND][m_MoveState].SetTravelSpeedMultiplier(1.0F);
1425-
14261423
if (m_MoveState == WALK || m_MoveState == RUN || m_MoveState == CRAWL) {
14271424
float travelSpeedMultiplier = 1.0F;
14281425

14291426
// If crouching, move at reduced speed
14301427
if (m_MoveState == WALK) {
1431-
const float crouchSpeedMultiplier = 0.7F;
1432-
travelSpeedMultiplier *= Lerp(0.0F, 1.0F, 1.0F, crouchSpeedMultiplier, m_CrouchAmount);
1428+
travelSpeedMultiplier *= Lerp(0.0F, 1.0F, 1.0F, m_CrouchWalkSpeedMultiplier, m_CrouchAmount);
14331429
}
14341430

14351431
// If we're moving slowly horizontally, move at reduced speed (otherwise our legs kick about wildly as we're not yet up to speed)
14361432
// Calculate a min multiplier that is based on the total walkpath speed (so a fast walkpath has a smaller multipler). This is so a slow walkpath gets up to speed faster
1437-
const float ourMaxMovementSpeed = std::max(m_Paths[FGROUND][m_MoveState].GetSpeed(), m_Paths[BGROUND][m_MoveState].GetSpeed()) * 0.5F * travelSpeedMultiplier;
1433+
const float ourMaxMovementSpeed = std::max(m_Paths[FGROUND][m_MoveState].GetTravelSpeed(), m_Paths[BGROUND][m_MoveState].GetTravelSpeed()) * 0.5F * travelSpeedMultiplier;
14381434
const float minSpeed = 2.0F;
14391435
const float minMultiplier = minSpeed / ourMaxMovementSpeed;
14401436
travelSpeedMultiplier *= Lerp(0.0F, ourMaxMovementSpeed, minMultiplier, 1.0F, std::abs(m_Vel.m_X));
@@ -2817,22 +2813,25 @@ void AHuman::DrawHUD(BITMAP* pTargetBitmap, const Vector& targetPos, int whichSc
28172813
}
28182814
}
28192815

2820-
float AHuman::GetLimbPathSpeed(int speedPreset) const {
2821-
return m_Paths[FGROUND][WALK].GetSpeed(speedPreset);
2816+
float AHuman::GetLimbPathTravelSpeed(MovementState movementState) {
2817+
return m_Paths[FGROUND][movementState].GetTravelSpeed();
28222818
}
28232819

2824-
void AHuman::SetLimbPathSpeed(int speedPreset, float speed) {
2825-
m_Paths[FGROUND][WALK].OverrideSpeed(speedPreset, speed);
2826-
m_Paths[BGROUND][WALK].OverrideSpeed(speedPreset, speed);
2820+
void AHuman::SetLimbPathTravelSpeed(MovementState movementState, float newSpeed) {
2821+
m_Paths[FGROUND][movementState].SetTravelSpeed(newSpeed);
2822+
m_Paths[FGROUND][movementState].SetTravelSpeed(newSpeed);
28272823
}
28282824

2829-
float AHuman::GetLimbPathPushForce() const {
2830-
return m_Paths[FGROUND][WALK].GetDefaultPushForce();
2825+
float AHuman::GetLimbPathPushForce(MovementState movementState) {
2826+
return m_Paths[FGROUND][movementState].GetPushForce();
28312827
}
28322828

2833-
void AHuman::SetLimbPathPushForce(float force) {
2834-
m_Paths[FGROUND][WALK].OverridePushForce(force);
2835-
m_Paths[BGROUND][WALK].OverridePushForce(force);
2829+
void AHuman::SetLimbPathPushForce(MovementState movementState, float newForce) {
2830+
m_Paths[FGROUND][movementState].SetPushForce(newForce);
2831+
m_Paths[FGROUND][movementState].SetPushForce(newForce);
2832+
2833+
m_Paths[BGROUND][movementState].SetPushForce(newForce);
2834+
m_Paths[BGROUND][movementState].SetPushForce(newForce);
28362835
}
28372836

28382837
int AHuman::WhilePieMenuOpenListener(const PieMenu* pieMenu) {

Source/Entities/AHuman.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -462,24 +462,24 @@ namespace RTE {
462462
/// @return The LimbPath corresponding to the passed in Layer and MovementState values.
463463
LimbPath* GetLimbPath(Layer layer, MovementState movementState) { return &m_Paths[layer][movementState]; }
464464

465-
/// Get walking limb path speed for the specified preset.
466-
/// @param speedPreset Speed preset to set 0 = LimbPath::SLOW, 1 = Limbpath::NORMAL, 2 = LimbPath::FAST
467-
/// @return Limb path speed for the specified preset in m/s.
468-
float GetLimbPathSpeed(int speedPreset) const;
469-
470-
/// Set walking limb path speed for the specified preset.
471-
/// @param speedPreset Speed preset to set 0 = LimbPath::SLOW, 1 = Limbpath::NORMAL, 2 = LimbPath::FAST. New speed value in m/s.
472-
void SetLimbPathSpeed(int speedPreset, float speed);
473-
474-
/// Gets the default force that a limb traveling walking LimbPath can push against
475-
/// stuff in the scene with.
476-
/// @return The default set force maximum, in kg * m/s^2.
477-
float GetLimbPathPushForce() const;
478-
479-
/// Sets the default force that a limb traveling walking LimbPath can push against
480-
/// stuff in the scene with.
481-
/// @param force The default set force maximum, in kg * m/s^2.
482-
void SetLimbPathPushForce(float force);
465+
/// Shortcut to get the speed of a particular move state's FG (and left side if relevant) limb path.
466+
/// @param movementState Which movement state to get the limb path speed for.
467+
/// @return Limb path speed for the specified movement state in m/s.
468+
float GetLimbPathTravelSpeed(MovementState movementState);
469+
470+
/// Shortcut to set the speed of a particular move state's limb path, including all layers (and sides if relevant)
471+
/// @param movementState Which movement state to set the limb path speed for.
472+
/// @param newSpeed New speed value in m/s.
473+
void SetLimbPathTravelSpeed(MovementState movementState, float newSpeed);
474+
475+
/// Shortcut to get the push force of a particular move state's FG (and left side if relevant) limb path.
476+
/// @return The push force, in kg * m/s^2.
477+
float GetLimbPathPushForce(MovementState movementState);
478+
479+
/// Shortcut to set the push force of a particular move state's limb path, including all layers (and sides if relevant)
480+
/// @param movementState Which movement state to set the limb path speed for.
481+
/// @param newForce New push force value in kg * m/s^2.
482+
void SetLimbPathPushForce(MovementState movementState, float newForce);
483483

484484
/// Gets the target rot angle for the given MovementState.
485485
/// @param movementState The MovementState to get the rot angle target for.

Source/Entities/Actor.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ void Actor::Clear() {
6767
m_StableVel.SetXY(15.0F, 25.0F);
6868
m_StableRecoverDelay = 1000;
6969
m_CanRun = true;
70+
m_CrouchWalkSpeedMultiplier = 0.7F;
7071
m_HeartBeat.Reset();
7172
m_NewControlTmr.Reset();
7273
m_DeathTmr.Reset();
@@ -200,6 +201,7 @@ int Actor::Create(const Actor& reference) {
200201
m_StableVel = reference.m_StableVel;
201202
m_StableRecoverDelay = reference.m_StableRecoverDelay;
202203
m_CanRun = reference.m_CanRun;
204+
m_CrouchWalkSpeedMultiplier = reference.m_CrouchWalkSpeedMultiplier;
203205
m_GoldCarried = reference.m_GoldCarried;
204206
m_AimState = reference.m_AimState;
205207
m_AimRange = reference.m_AimRange;
@@ -330,6 +332,7 @@ int Actor::ReadProperty(const std::string_view& propName, Reader& reader) {
330332
MatchProperty("StableVelocityThreshold", { reader >> m_StableVel; });
331333
MatchProperty("StableRecoveryDelay", { reader >> m_StableRecoverDelay; });
332334
MatchProperty("CanRun", { reader >> m_CanRun; });
335+
MatchProperty("CrouchWalkSpeedMultiplier", { reader >> m_CrouchWalkSpeedMultiplier; });
333336
MatchProperty("AimAngle", { reader >> m_AimAngle; });
334337
MatchProperty("AimRange", { reader >> m_AimRange; });
335338
MatchProperty("AimDistance", { reader >> m_AimDistance; });
@@ -406,6 +409,8 @@ int Actor::Save(Writer& writer) const {
406409
writer << m_StableRecoverDelay;
407410
writer.NewProperty("CanRun");
408411
writer << m_CanRun;
412+
writer.NewProperty("CrouchWalkSpeedMultiplier");
413+
writer << m_CrouchWalkSpeedMultiplier;
409414
writer.NewProperty("AimAngle");
410415
writer << m_AimAngle;
411416
writer.NewProperty("AimRange");

0 commit comments

Comments
 (0)