Skip to content

Commit f1085a9

Browse files
committed
Removed a bunch of legacy code
1 parent 5fb0654 commit f1085a9

File tree

4 files changed

+0
-189
lines changed

4 files changed

+0
-189
lines changed

Source/Entities/ACrab.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,6 @@ void ACrab::Clear() {
6262
// m_StrideTimer[side].Reset();
6363
}
6464
m_Aiming = false;
65-
66-
m_DeviceState = SCANNING;
67-
m_SweepState = NOSWEEP;
68-
m_DigState = NOTDIGGING;
69-
m_JumpState = NOTJUMPING;
70-
m_JumpTarget.Reset();
71-
m_JumpingRight = true;
72-
m_DigTunnelEndPos.Reset();
73-
m_SweepCenterAimAngle = 0;
74-
m_SweepRange = c_EighthPI;
75-
m_DigTarget.Reset();
76-
m_FireTimer.Reset();
77-
m_SweepTimer.Reset();
78-
m_PatrolTimer.Reset();
79-
m_JumpTimer.Reset();
8065
m_AimRangeUpperLimit = -1;
8166
m_AimRangeLowerLimit = -1;
8267
m_LockMouseAimInput = false;
@@ -229,15 +214,6 @@ int ACrab::Create(const ACrab& reference) {
229214
}
230215
}
231216

232-
m_DeviceState = reference.m_DeviceState;
233-
m_SweepState = reference.m_SweepState;
234-
m_DigState = reference.m_DigState;
235-
m_JumpState = reference.m_JumpState;
236-
m_JumpTarget = reference.m_JumpTarget;
237-
m_JumpingRight = reference.m_JumpingRight;
238-
m_DigTunnelEndPos = reference.m_DigTunnelEndPos;
239-
m_SweepCenterAimAngle = reference.m_SweepCenterAimAngle;
240-
m_SweepRange = reference.m_SweepRange;
241217
m_AimRangeUpperLimit = reference.m_AimRangeUpperLimit;
242218
m_AimRangeLowerLimit = reference.m_AimRangeLowerLimit;
243219
m_LockMouseAimInput = reference.m_LockMouseAimInput;

Source/Entities/ACrab.h

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -321,74 +321,6 @@ namespace RTE {
321321
float m_AimRangeUpperLimit;
322322
// The maximum angle MountedMO can be aimed down, positive values only, in radians
323323
float m_AimRangeLowerLimit;
324-
325-
////////////////
326-
// AI States
327-
328-
enum DeviceHandlingState {
329-
STILL = 0,
330-
POINTING,
331-
SCANNING,
332-
AIMING,
333-
FIRING,
334-
THROWING,
335-
DIGGING
336-
};
337-
338-
enum SweepState {
339-
NOSWEEP = 0,
340-
SWEEPINGUP,
341-
SWEEPUPPAUSE,
342-
SWEEPINGDOWN,
343-
SWEEPDOWNPAUSE
344-
};
345-
346-
enum DigState {
347-
NOTDIGGING = 0,
348-
PREDIG,
349-
STARTDIG,
350-
TUNNELING,
351-
FINISHINGDIG,
352-
PAUSEDIGGER
353-
};
354-
355-
enum JumpState {
356-
NOTJUMPING = 0,
357-
FORWARDJUMP,
358-
PREUPJUMP,
359-
UPJUMP,
360-
APEXJUMP,
361-
LANDJUMP
362-
};
363-
364-
// What the AI is doing with its held devices
365-
DeviceHandlingState m_DeviceState;
366-
// What we are doing with a device sweeping
367-
SweepState m_SweepState;
368-
// The current digging state
369-
DigState m_DigState;
370-
// The current jumping state
371-
JumpState m_JumpState;
372-
// Jumping target, overshoot this and the jump is completed
373-
Vector m_JumpTarget;
374-
// Jumping left or right
375-
bool m_JumpingRight;
376-
// The position of the end of the current tunnel being dug. When it is reached, digging can stop.
377-
Vector m_DigTunnelEndPos;
378-
// The center angle (in rads) for the sweeping motion done duing scannign and digging
379-
float m_SweepCenterAimAngle;
380-
// The range to each direction of the center that the sweeping motion will be done in
381-
float m_SweepRange;
382-
// The absolute coordinates of the last detected gold deposits
383-
Vector m_DigTarget;
384-
// Timer for how long to be shooting at a seen enemy target
385-
Timer m_FireTimer;
386-
// Timer for how long to be shooting at a seen enemy target
387-
Timer m_SweepTimer;
388-
// Timer for how long to be patrolling in a direction
389-
Timer m_PatrolTimer;
390-
// Timer for how long to be firing the jetpack in a direction
391-
Timer m_JumpTimer;
392324
// Whether mouse input should be locked to the aim range, or whether we can "wander" out. For static emplacements like turrets, this is good, but for moving things it's a bit sticky.
393325
bool m_LockMouseAimInput;
394326

Source/Entities/AHuman.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,6 @@ void AHuman::Clear() {
8484
m_WalkPathOffset.Reset();
8585
m_ArmSwingRate = 1.0F;
8686
m_DeviceArmSwayRate = 0.5F;
87-
88-
m_DeviceState = SCANNING;
89-
m_SweepState = NOSWEEP;
90-
m_DigState = NOTDIGGING;
91-
m_JumpState = NOTJUMPING;
92-
m_JumpTarget.Reset();
93-
m_JumpingRight = true;
94-
m_Crawling = false;
95-
m_DigTunnelEndPos.Reset();
96-
m_SweepCenterAimAngle = 0;
97-
m_SweepRange = c_EighthPI;
98-
m_DigTarget.Reset();
99-
m_FireTimer.Reset();
100-
m_SweepTimer.Reset();
101-
m_PatrolTimer.Reset();
102-
m_JumpTimer.Reset();
10387
}
10488

10589
int AHuman::Create() {
@@ -238,17 +222,6 @@ int AHuman::Create(const AHuman& reference) {
238222
m_Paths[BGROUND][RUN].SetBaseSpeedMultiplier(reference.m_Paths[BGROUND][WALK].GetSpeed(Speed::FAST) / reference.m_Paths[BGROUND][WALK].GetSpeed(Speed::NORMAL));
239223
}
240224

241-
m_DeviceState = reference.m_DeviceState;
242-
m_SweepState = reference.m_SweepState;
243-
m_DigState = reference.m_DigState;
244-
m_JumpState = reference.m_JumpState;
245-
m_JumpTarget = reference.m_JumpTarget;
246-
m_JumpingRight = reference.m_JumpingRight;
247-
m_Crawling = reference.m_Crawling;
248-
m_DigTunnelEndPos = reference.m_DigTunnelEndPos;
249-
m_SweepCenterAimAngle = reference.m_SweepCenterAimAngle;
250-
m_SweepRange = reference.m_SweepRange;
251-
252225
return 0;
253226
}
254227

Source/Entities/AHuman.h

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -638,76 +638,6 @@ namespace RTE {
638638
float m_ArmSwingRate; //!< Controls the rate at which this AHuman's Arms follow the movement of its Legs while they're not holding device(s).
639639
float m_DeviceArmSwayRate; //!< Controls the rate at which this AHuman's Arms follow the movement of its Legs while they're holding device(s). One-handed devices sway half as much as two-handed ones. Defaults to three quarters of Arm swing rate.
640640

641-
////////////////
642-
// AI States
643-
644-
enum DeviceHandlingState {
645-
STILL = 0,
646-
POINTING,
647-
SCANNING,
648-
AIMING,
649-
FIRING,
650-
THROWING,
651-
DIGGING
652-
};
653-
654-
enum SweepState {
655-
NOSWEEP = 0,
656-
SWEEPINGUP,
657-
SWEEPUPPAUSE,
658-
SWEEPINGDOWN,
659-
SWEEPDOWNPAUSE
660-
};
661-
662-
enum DigState {
663-
NOTDIGGING = 0,
664-
PREDIG,
665-
STARTDIG,
666-
TUNNELING,
667-
FINISHINGDIG,
668-
PAUSEDIGGER
669-
};
670-
671-
enum JumpState {
672-
NOTJUMPING = 0,
673-
FORWARDJUMP,
674-
PREUPJUMP,
675-
UPJUMP,
676-
APEXJUMP,
677-
LANDJUMP
678-
};
679-
680-
// What the AI is doing with its held devices
681-
DeviceHandlingState m_DeviceState;
682-
// What we are doing with a device sweeping
683-
SweepState m_SweepState;
684-
// The current digging state
685-
DigState m_DigState;
686-
// The current jumping state
687-
JumpState m_JumpState;
688-
// Jumping target, overshoot this and the jump is completed
689-
Vector m_JumpTarget;
690-
// Jumping left or right
691-
bool m_JumpingRight;
692-
// AI is crawling
693-
bool m_Crawling;
694-
// The position of the end of the current tunnel being dug. When it is reached, digging can stop.
695-
Vector m_DigTunnelEndPos;
696-
// The center angle (in rads) for the sweeping motion done duing scannign and digging
697-
float m_SweepCenterAimAngle;
698-
// The range to each direction of the center that the sweeping motion will be done in
699-
float m_SweepRange;
700-
// The absolute coordinates of the last detected gold deposits
701-
Vector m_DigTarget;
702-
// Timer for how long to be shooting at a seen enemy target
703-
Timer m_FireTimer;
704-
// Timer for how long to be shooting at a seen enemy target
705-
Timer m_SweepTimer;
706-
// Timer for how long to be patrolling in a direction
707-
Timer m_PatrolTimer;
708-
// Timer for how long to be firing the jetpack in a direction
709-
Timer m_JumpTimer;
710-
711641
#pragma region Event Handling
712642
/// Event listener to be run while this AHuman's PieMenu is opened.
713643
/// @param pieMenu The PieMenu this event listener needs to listen to. This will always be this' m_PieMenu and only exists for std::bind.

0 commit comments

Comments
 (0)