forked from Phobos-developers/YRpp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDriveLocomotionClass.h
58 lines (47 loc) · 1.42 KB
/
DriveLocomotionClass.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//Locomotor = {4A582741-9839-11d1-B709-00A024DDAFD1}
#pragma once
#include <LocomotionClass.h>
class NOVTABLE DriveLocomotionClass : public LocomotionClass, public IPiggyback
{
public:
// TODO stub virtuals implementations
//Destructor
virtual ~DriveLocomotionClass() RX;
//Constructor
DriveLocomotionClass()
: DriveLocomotionClass(noinit_t())
{ JMP_THIS(0x4AF540); }
protected:
explicit __forceinline DriveLocomotionClass(noinit_t)
: LocomotionClass(noinit_t())
{ }
//===========================================================================
//===== Properties ==========================================================
//===========================================================================
public:
DWORD PreviousRamp;
DWORD CurrentRamp;
RateTimer SlopeTimer;
CoordStruct Destination;
CoordStruct HeadToCoord;
int SpeedAccum;
double movementspeed_50;
DWORD TrackNumber;
int TrackIndex;
bool IsOnShortTrack;
BYTE IsTurretLockedDown;
bool IsRotating;
bool IsDriving;
bool IsRocking;
bool IsLocked;
ILocomotion* Piggybackee;
int field_6C;
};
static_assert(sizeof(DriveLocomotionClass) == 0x70);
template<>
__forceinline DriveLocomotionClass* locomotion_cast<DriveLocomotionClass*>(ILocomotion* pThis)
{
CLSID locoCLSID;
return (SUCCEEDED(static_cast<LocomotionClass*>(pThis)->GetClassID(&locoCLSID)) && locoCLSID == LocomotionClass::CLSIDs::Drive) ?
static_cast<DriveLocomotionClass*>(pThis) : nullptr;
}