Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 268e9e6

Browse files
committed
Merge branch 'pre4-testing' into 4zk-content-source
2 parents 8ae7560 + 02dea04 commit 268e9e6

14 files changed

+116
-135
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
260260

261261
<details><summary><b>Changed</b></summary>
262262

263+
- Exposed `MovableObject` property `RestThreshold` to Lua (R/W).
264+
263265
- `ACRocket`s can now function without a full set of thrusters. This also means that "Null Emitter" thrusters are no longer required for rockets.
264266

265267
- Changed `MOSprite` property `SpriteAnimMode` `Enum` `LOOPWHENMOVING` to `LOOPWHENACTIVE` as it also describes active devices.

Entities/ADoor.cpp

Lines changed: 31 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ namespace RTE {
7979
m_DrawMaterialLayerWhenClosed = reference.m_DrawMaterialLayerWhenClosed;
8080
m_DoorMaterialID = reference.m_DoorMaterialID;
8181
m_DoorMaterialTempErased = reference.m_DoorMaterialTempErased;
82-
if (reference.m_DoorMoveStartSound) { m_DoorMoveStartSound = dynamic_cast<SoundContainer*>(reference.m_DoorMoveStartSound->Clone()); }
83-
if (reference.m_DoorMoveSound) { m_DoorMoveSound = dynamic_cast<SoundContainer*>(reference.m_DoorMoveSound->Clone()); }
84-
if (reference.m_DoorDirectionChangeSound) { m_DoorDirectionChangeSound = dynamic_cast<SoundContainer*>(reference.m_DoorDirectionChangeSound->Clone()); }
85-
if (reference.m_DoorMoveEndSound) { m_DoorMoveEndSound = dynamic_cast<SoundContainer*>(reference.m_DoorMoveEndSound->Clone()); }
82+
if (reference.m_DoorMoveStartSound) { m_DoorMoveStartSound.reset(dynamic_cast<SoundContainer*>(reference.m_DoorMoveStartSound->Clone())); }
83+
if (reference.m_DoorMoveSound) { m_DoorMoveSound.reset(dynamic_cast<SoundContainer*>(reference.m_DoorMoveSound->Clone())); }
84+
if (reference.m_DoorDirectionChangeSound) { m_DoorDirectionChangeSound.reset(dynamic_cast<SoundContainer*>(reference.m_DoorDirectionChangeSound->Clone())); }
85+
if (reference.m_DoorMoveEndSound) { m_DoorMoveEndSound.reset(dynamic_cast<SoundContainer*>(reference.m_DoorMoveEndSound->Clone())); }
8686

8787
return 0;
8888
}
@@ -131,17 +131,13 @@ namespace RTE {
131131
} else if (propName == "DrawMaterialLayerWhenClosed") {
132132
reader >> m_DrawMaterialLayerWhenClosed;
133133
} else if (propName == "DoorMoveStartSound") {
134-
m_DoorMoveStartSound = new SoundContainer;
135-
reader >> m_DoorMoveStartSound;
134+
m_DoorMoveStartSound.reset(dynamic_cast<SoundContainer *>(g_PresetMan.ReadReflectedPreset(reader)));
136135
} else if (propName == "DoorMoveSound") {
137-
m_DoorMoveSound = new SoundContainer;
138-
reader >> m_DoorMoveSound;
136+
m_DoorMoveSound.reset(dynamic_cast<SoundContainer *>(g_PresetMan.ReadReflectedPreset(reader)));
139137
} else if (propName == "DoorDirectionChangeSound") {
140-
m_DoorDirectionChangeSound = new SoundContainer;
141-
reader >> m_DoorDirectionChangeSound;
138+
m_DoorDirectionChangeSound.reset(dynamic_cast<SoundContainer *>(g_PresetMan.ReadReflectedPreset(reader)));
142139
} else if (propName == "DoorMoveEndSound") {
143-
m_DoorMoveEndSound = new SoundContainer;
144-
reader >> m_DoorMoveEndSound;
140+
m_DoorMoveEndSound.reset(dynamic_cast<SoundContainer *>(g_PresetMan.ReadReflectedPreset(reader)));
145141
} else {
146142
return Actor::ReadProperty(propName, reader);
147143
}
@@ -180,13 +176,13 @@ namespace RTE {
180176
writer.NewProperty("DrawMaterialLayerWhenClosed");
181177
writer << m_DrawMaterialLayerWhenClosed;
182178
writer.NewProperty("DoorMoveStartSound");
183-
writer << m_DoorMoveStartSound;
179+
writer << m_DoorMoveStartSound.get();
184180
writer.NewProperty("DoorMoveSound");
185-
writer << m_DoorMoveSound;
181+
writer << m_DoorMoveSound.get();
186182
writer.NewProperty("DoorDirectionChangeSound");
187-
writer << m_DoorDirectionChangeSound;
183+
writer << m_DoorDirectionChangeSound.get();
188184
writer.NewProperty("DoorMoveEndSound");
189-
writer << m_DoorMoveEndSound;
185+
writer << m_DoorMoveEndSound.get();
190186

191187
return 0;
192188
}
@@ -200,11 +196,6 @@ namespace RTE {
200196
if (m_DoorMoveEndSound) { m_DoorMoveEndSound->Stop(); }
201197
if (!notInherited) { Actor::Destroy(); }
202198

203-
delete m_DoorMoveStartSound;
204-
delete m_DoorMoveSound;
205-
delete m_DoorDirectionChangeSound;
206-
delete m_DoorMoveEndSound;
207-
208199
for (ADSensor &sensor : m_Sensors) {
209200
sensor.Destroy();
210201
}
@@ -249,8 +240,8 @@ namespace RTE {
249240

250241
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
251242

252-
bool ADoor::EraseDoorMaterial(bool updateMaterialArea, bool keepMaterialDrawnFlag) {
253-
if (!keepMaterialDrawnFlag) { m_DoorMaterialDrawn = false; }
243+
bool ADoor::EraseDoorMaterial(bool updateMaterialArea) {
244+
m_DoorMaterialDrawn = false;
254245

255246
if (!g_SceneMan.GetTerrain() || !g_SceneMan.GetTerrain()->GetMaterialBitmap()) {
256247
return false;
@@ -270,22 +261,21 @@ namespace RTE {
270261

271262
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
272263

273-
void ADoor::MaterialDrawOverride(bool enable) {
264+
void ADoor::TempEraseOrRedrawDoorMaterial(bool erase) {
274265
if (!g_SceneMan.GetTerrain() || !g_SceneMan.GetTerrain()->GetMaterialBitmap()) {
275266
return;
276267
}
277268

278-
if (enable) {
279-
// Erase the material temporarily if we have drawn it and the override isn't already in effect
280-
if (m_DoorMaterialDrawn && m_DoorMaterialTempErased != enable) { EraseDoorMaterial(true, true); }
281-
} else {
282-
// Draw the door back if we were indeed temporarily suppressing it before
283-
if (m_DoorMaterialDrawn && m_DoorMaterialTempErased != enable) {
284-
m_Door->Draw(g_SceneMan.GetTerrain()->GetMaterialBitmap(), Vector(), g_DrawDoor, true);
285-
g_SceneMan.GetTerrain()->AddUpdatedMaterialArea(m_Door->GetBoundingBox());
286-
}
269+
bool doorMaterialDrawnState = m_DoorMaterialDrawn;
270+
if (erase && m_DoorMaterialDrawn && !m_DoorMaterialTempErased) {
271+
EraseDoorMaterial(true);
272+
m_DoorMaterialDrawn = doorMaterialDrawnState;
273+
} else if (!erase && m_DoorMaterialDrawn && m_DoorMaterialTempErased) {
274+
DrawDoorMaterial(true);
275+
m_DoorMaterialDrawn = doorMaterialDrawnState;
287276
}
288-
m_DoorMaterialTempErased = enable;
277+
278+
m_DoorMaterialTempErased = erase;
289279
}
290280

291281
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -370,7 +360,6 @@ namespace RTE {
370360
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
371361

372362
void ADoor::Update() {
373-
374363
if (m_Door) {
375364
if (m_DoorState != STOPPED && m_SensorTimer.IsPastSimMS(m_SensorInterval)) { UpdateSensors(); }
376365
UpdateDoorAttachableActions();
@@ -383,11 +372,8 @@ namespace RTE {
383372

384373
Actor::Update();
385374

386-
if (!m_Door) {
387-
EraseDoorMaterial();
388-
// Start the spinning out of control animation for the motor, start it slow
389-
m_SpriteAnimDuration *= 4;
390-
}
375+
// Start the spinning out of control animation for the motor, start it slow
376+
if (!m_Door) { m_SpriteAnimDuration *= 4; }
391377

392378
if (m_SpriteAnimMode == LOOPWHENOPENCLOSE && m_FrameCount > 1 && (m_DoorState == OPENING || m_DoorState == CLOSING) && m_SpriteAnimTimer.IsPastSimMS(m_SpriteAnimDuration)) {
393379
m_Frame = (m_Frame + 1) % m_FrameCount;
@@ -397,11 +383,11 @@ namespace RTE {
397383
// Lose health when door is lost, spinning out of control until grinds to halt
398384
if (!m_Door && m_Status != DYING && m_Status != DEAD) {
399385
m_SpriteAnimMode = ALWAYSLOOP;
400-
m_SpriteAnimDuration = LERP(0, m_MaxHealth, 10, m_InitialSpriteAnimDuration, m_Health);
386+
m_SpriteAnimDuration = static_cast<int>(LERP(0, m_MaxHealth, 10.0F, static_cast<float>(m_InitialSpriteAnimDuration), m_Health));
401387

402388
if (m_DoorMoveSound) {
403389
if (!m_DoorMoveSound->IsBeingPlayed()) { m_DoorMoveSound->Play(m_Pos); }
404-
m_DoorMoveSound->SetPitch(LERP(10, m_InitialSpriteAnimDuration, 2, 1, m_SpriteAnimDuration));
390+
m_DoorMoveSound->SetPitch(LERP(10.0F, static_cast<float>(m_InitialSpriteAnimDuration), 2.0F, 1.0F, static_cast<float>(m_SpriteAnimDuration)));
405391
}
406392

407393
m_Health -= 0.4F;
@@ -412,7 +398,7 @@ namespace RTE {
412398
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
413399

414400
void ADoor::UpdateSensors() {
415-
const Actor *foundActor = 0;
401+
const Actor *foundActor = nullptr;
416402
bool anySensorInput = false;
417403

418404
for (ADSensor &sensor : m_Sensors) {
@@ -423,7 +409,7 @@ namespace RTE {
423409
if (m_Team == Activity::NoTeam) {
424410
OpenDoor();
425411
break;
426-
// If a sensor has found an enemy Actor, close the door and break so we don't accidentally open it for a friendly Actor.
412+
// If a sensor has found an enemy Actor, close the door and stop looking, so we don't accidentally open it for a friendly Actor.
427413
} else if (foundActor->GetTeam() != m_Team) {
428414
CloseDoor();
429415
break;
@@ -501,7 +487,7 @@ namespace RTE {
501487
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
502488

503489
void ADoor::DrawHUD(BITMAP *targetBitmap, const Vector &targetPos, int whichScreen, bool playerControlled) {
504-
m_HUDStack = -m_CharHeight / 2;
490+
m_HUDStack = -static_cast<int>(m_CharHeight) / 2;
505491

506492
if (!m_HUDVisible) {
507493
return;

Entities/ADoor.h

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -101,49 +101,49 @@ namespace RTE {
101101
/// Gets this ADoor's door move start sound. Ownership is NOT transferred!
102102
/// </summary>
103103
/// <returns>The SoundContainer for this ADoor's door move start sound.</returns>
104-
SoundContainer * GetDoorMoveStartSound() const { return m_DoorMoveStartSound; }
104+
SoundContainer * GetDoorMoveStartSound() const { return m_DoorMoveStartSound.get(); }
105105

106106
/// <summary>
107107
/// Sets this ADoor's door move start sound. Ownership IS transferred!
108108
/// </summary>
109109
/// <param name="newSound">The new SoundContainer for this ADoor's door move start sound.</param>
110-
void SetDoorMoveStartSound(SoundContainer *newSound) { m_DoorMoveStartSound = newSound; }
110+
void SetDoorMoveStartSound(SoundContainer *newSound) { m_DoorMoveStartSound.reset(newSound); }
111111

112112
/// <summary>
113113
/// Gets this ADoor's door move sound. Ownership is NOT transferred!
114114
/// </summary>
115115
/// <returns>The SoundContainer for this ADoor's door move sound.</returns>
116-
SoundContainer * GetDoorMoveSound() const { return m_DoorMoveSound; }
116+
SoundContainer * GetDoorMoveSound() const { return m_DoorMoveSound.get(); }
117117

118118
/// <summary>
119119
/// Sets this ADoor's door move sound. Ownership IS transferred!
120120
/// </summary>
121121
/// <param name="newSound">The new SoundContainer for this ADoor's door move sound.</param>
122-
void SetDoorMoveSound(SoundContainer *newSound) { m_DoorMoveSound = newSound; }
122+
void SetDoorMoveSound(SoundContainer *newSound) { m_DoorMoveSound.reset(newSound); }
123123

124124
/// <summary>
125125
/// Gets this ADoor's door direction change sound. Ownership is NOT transferred!
126126
/// </summary>
127127
/// <returns>The SoundContainer for this ADoor's door direction change sound.</returns>
128-
SoundContainer * GetDoorDirectionChangeSound() const { return m_DoorDirectionChangeSound; }
128+
SoundContainer * GetDoorDirectionChangeSound() const { return m_DoorDirectionChangeSound.get(); }
129129

130130
/// <summary>
131131
/// Sets this ADoor's door direction change sound. Ownership IS transferred!
132132
/// </summary>
133133
/// <param name="newSound">The new SoundContainer for this ADoor's door direction change sound.</param>
134-
void SetDoorDirectionChangeSound(SoundContainer *newSound) { m_DoorDirectionChangeSound = newSound; }
134+
void SetDoorDirectionChangeSound(SoundContainer *newSound) { m_DoorDirectionChangeSound.reset(newSound); }
135135

136136
/// <summary>
137137
/// Gets this ADoor's door move end sound. Ownership is NOT transferred!
138138
/// </summary>
139139
/// <returns>The SoundContainer for this ADoor's door move end sound.</returns>
140-
SoundContainer * GetDoorMoveEndSound() const { return m_DoorMoveEndSound; }
140+
SoundContainer * GetDoorMoveEndSound() const { return m_DoorMoveEndSound.get(); }
141141

142142
/// <summary>
143143
/// Sets this ADoor's door move end sound. Ownership IS transferred!
144144
/// </summary>
145145
/// <param name="newSound">The new SoundContainer for this ADoor's door move end sound.</param>
146-
void SetDoorMoveEndSound(SoundContainer *newSound) { m_DoorMoveEndSound = newSound; }
146+
void SetDoorMoveEndSound(SoundContainer *newSound) { m_DoorMoveEndSound.reset(newSound); }
147147
#pragma endregion
148148

149149
#pragma region Concrete Methods
@@ -163,10 +163,10 @@ namespace RTE {
163163
void StopDoor();
164164

165165
/// <summary>
166-
/// Used to temporarily remove or add back the material drawing of this in the scene. Used for making pathfinding work through doors.
166+
/// Used to temporarily remove or add back the material drawing of this in the Scene. Used for making pathfinding work through doors.
167167
/// </summary>
168-
/// <param name="enable">Whether to enable the override or not.</param>
169-
void MaterialDrawOverride(bool enable);
168+
/// <param name="erase">Whether to erase door material (true) or draw it (false).</param>
169+
void TempEraseOrRedrawDoorMaterial(bool erase);
170170
#pragma endregion
171171

172172
#pragma region Virtual Override Methods
@@ -235,10 +235,10 @@ namespace RTE {
235235
bool m_DoorMaterialTempErased; //!< Whether the drawing override is enabled and the door material is erased to allow better pathfinding.
236236
Vector m_LastDoorMaterialPos; //!< The position the door attachable had when its material was drawn to the material bitmap. This is used to erase the previous material representation.
237237

238-
SoundContainer *m_DoorMoveStartSound; //!< Sound played when the door starts moving from fully open/closed position towards the opposite end.
239-
SoundContainer *m_DoorMoveSound; //!< Sound played while the door is moving between open/closed position.
240-
SoundContainer *m_DoorDirectionChangeSound; //!< Sound played when the door is interrupted while moving and changes directions.
241-
SoundContainer *m_DoorMoveEndSound; //!< Sound played when the door stops moving and is at fully open/closed position.
238+
std::unique_ptr<SoundContainer> m_DoorMoveStartSound; //!< Sound played when the door starts moving from fully open/closed position towards the opposite end.
239+
std::unique_ptr<SoundContainer> m_DoorMoveSound; //!< Sound played while the door is moving between open/closed position.
240+
std::unique_ptr<SoundContainer> m_DoorDirectionChangeSound; //!< Sound played when the door is interrupted while moving and changes directions.
241+
std::unique_ptr<SoundContainer> m_DoorMoveEndSound; //!< Sound played when the door stops moving and is at fully open/closed position.
242242

243243
private:
244244

@@ -270,9 +270,8 @@ namespace RTE {
270270
/// This is to get rid of the material footprint made with DrawDoorMaterial when the door part starts to move.
271271
/// </summary>
272272
/// <param name="updateMaterialArea">Whether to update the MaterialArea after erasing or not. Used for DrawDoorMaterial().</param>
273-
/// <param name="keepMaterialDrawnFlag">Whether to keep the DoorMaterialDrawn flag or not. Used for MaterialDrawOverride().</param>
274273
/// <returns>Whether the fill erasure was successful (if the same material as the door was found and erased).</returns>
275-
bool EraseDoorMaterial(bool updateMaterialArea = true, bool keepMaterialDrawnFlag = false);
274+
bool EraseDoorMaterial(bool updateMaterialArea = true);
276275

277276
/// <summary>
278277
/// Clears all the member variables of this ADoor, effectively resetting the members of this abstraction level only.

Entities/AHuman.cpp

Lines changed: 34 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3703,52 +3703,44 @@ void AHuman::Update()
37033703
m_Paths[FGROUND][WALK].Terminate();
37043704
m_Paths[BGROUND][WALK].Terminate();
37053705
}
3706-
}
3707-
// CRAWLING
3708-
else if (m_MoveState == CRAWL)
3709-
{
3710-
// LEG Crawls
3711-
float FGLegProg = m_Paths[FGROUND][CRAWL].GetRegularProgress();
3712-
float BGLegProg = m_Paths[BGROUND][CRAWL].GetRegularProgress();
3706+
} else if (m_MoveState == CRAWL) {
3707+
// Start crawling only once we are fully prone.
3708+
if (m_ProneState == PRONE) {
37133709

3714-
// FG Leg crawl
3715-
if (m_pFGLeg && (!m_pBGLeg || (!(m_Paths[FGROUND][CRAWL].PathEnded() && BGLegProg < 0.5) || m_StrideStart)))
3716-
{
3717-
// m_StrideStart = false;
3718-
// Reset the stride timer if the path is about to restart
3719-
if (m_Paths[FGROUND][CRAWL].PathEnded() || m_Paths[FGROUND][CRAWL].PathIsAtStart()) { m_StrideTimer.Reset(); }
3720-
m_pFGFootGroup->PushAsLimb(m_Pos + RotateOffset(m_pFGLeg->GetParentOffset()), m_Vel, m_Rotation, m_Paths[FGROUND][CRAWL], deltaTime);
3721-
}
3722-
else
3723-
m_Paths[FGROUND][CRAWL].Terminate();
3710+
float FGLegProg = m_Paths[FGROUND][CRAWL].GetRegularProgress();
3711+
float BGLegProg = m_Paths[BGROUND][CRAWL].GetRegularProgress();
37243712

3725-
// BG Leg crawl
3726-
if (m_pBGLeg && (!m_pFGLeg || !(m_Paths[BGROUND][CRAWL].PathEnded() && FGLegProg < 0.5)))
3727-
{
3728-
m_StrideStart = false;
3729-
// Reset the stride timer if the path is about to restart
3730-
if (m_Paths[BGROUND][CRAWL].PathEnded() || m_Paths[BGROUND][CRAWL].PathIsAtStart()) { m_StrideTimer.Reset(); }
3731-
m_pBGFootGroup->PushAsLimb(m_Pos + RotateOffset(m_pBGLeg->GetParentOffset()), m_Vel, m_Rotation, m_Paths[BGROUND][CRAWL], deltaTime);
3732-
}
3733-
else
3734-
m_Paths[BGROUND][CRAWL].Terminate();
3713+
if (m_pFGLeg && (!m_pBGLeg || (!(m_Paths[FGROUND][CRAWL].PathEnded() && BGLegProg < 0.5F) || m_StrideStart))) {
3714+
if (m_Paths[FGROUND][CRAWL].PathEnded() || m_Paths[FGROUND][CRAWL].PathIsAtStart()) { m_StrideTimer.Reset(); }
3715+
m_pFGFootGroup->PushAsLimb(m_Pos + RotateOffset(m_pFGLeg->GetParentOffset()), m_Vel, m_Rotation, m_Paths[FGROUND][CRAWL], deltaTime);
3716+
} else {
3717+
m_Paths[FGROUND][CRAWL].Terminate();
3718+
}
3719+
if (m_pBGLeg && (!m_pFGLeg || !(m_Paths[BGROUND][CRAWL].PathEnded() && FGLegProg < 0.5F))) {
3720+
m_StrideStart = false;
3721+
if (m_Paths[BGROUND][CRAWL].PathEnded() || m_Paths[BGROUND][CRAWL].PathIsAtStart()) { m_StrideTimer.Reset(); }
3722+
m_pBGFootGroup->PushAsLimb(m_Pos + RotateOffset(m_pBGLeg->GetParentOffset()), m_Vel, m_Rotation, m_Paths[BGROUND][CRAWL], deltaTime);
3723+
} else {
3724+
m_Paths[BGROUND][CRAWL].Terminate();
3725+
}
3726+
if (m_pBGArm) {
3727+
m_ArmClimbing[BGROUND] = true;
3728+
m_pBGHandGroup->PushAsLimb(m_Pos + RotateOffset(Vector(0, m_pBGArm->GetParentOffset().m_Y)), m_Vel, m_Rotation, m_Paths[BGROUND][ARMCRAWL], deltaTime);
3729+
} else if (m_pFGArm && !m_pFGArm->HoldsSomething()) {
3730+
m_ArmClimbing[FGROUND] = true;
3731+
m_pFGHandGroup->PushAsLimb(m_Pos + RotateOffset(Vector(0, m_pFGArm->GetParentOffset().m_Y)), m_Vel, m_Rotation, m_Paths[FGROUND][ARMCRAWL], deltaTime);
3732+
}
3733+
// Restart the stride if the current one seems to be taking too long.
3734+
if (m_StrideTimer.IsPastSimMS(m_Paths[FGROUND][CRAWL].GetTotalPathTime())) {
3735+
m_StrideStart = true;
3736+
m_Paths[FGROUND][CRAWL].Terminate();
3737+
m_Paths[BGROUND][CRAWL].Terminate();
3738+
}
3739+
} else {
3740+
if (m_pFGLeg) { m_pFGFootGroup->FlailAsLimb(m_Pos, RotateOffset(m_pFGLeg->GetParentOffset()), m_pFGLeg->GetMaxLength(), m_PrevVel, m_AngularVel, m_pFGLeg->GetMass(), deltaTime); }
37353741

3736-
// ARMS using rotated path to help crawl
3737-
if (m_pBGArm) {
3738-
m_ArmClimbing[BGROUND] = true;
3739-
m_pBGHandGroup->PushAsLimb(m_Pos + RotateOffset(Vector(0, m_pBGArm->GetParentOffset().m_Y)), m_Vel, m_Rotation, m_Paths[BGROUND][ARMCRAWL], deltaTime);
3740-
} else if (m_pFGArm && !m_pFGArm->HoldsSomething()) {
3741-
m_ArmClimbing[FGROUND] = true;
3742-
m_pFGHandGroup->PushAsLimb(m_Pos + RotateOffset(Vector(0, m_pFGArm->GetParentOffset().m_Y)), m_Vel, m_Rotation, m_Paths[FGROUND][ARMCRAWL], deltaTime);
3742+
if (m_pBGLeg) { m_pBGFootGroup->FlailAsLimb(m_Pos, RotateOffset(m_pBGLeg->GetParentOffset()), m_pBGLeg->GetMaxLength(), m_PrevVel, m_AngularVel, m_pBGLeg->GetMass(), deltaTime); }
37433743
}
3744-
3745-
// Restart the stride if the current one seems to be taking too long
3746-
if (m_StrideTimer.IsPastSimMS(m_Paths[FGROUND][CRAWL].GetTotalPathTime()))
3747-
{
3748-
m_StrideStart = true;
3749-
m_Paths[FGROUND][CRAWL].Terminate();
3750-
m_Paths[BGROUND][CRAWL].Terminate();
3751-
}
37523744
} else if (m_pFGLeg || m_pBGLeg) {
37533745
if (m_MoveState == JUMP) {
37543746
// TODO: Utilize jump paths in an intuitive way!

0 commit comments

Comments
 (0)