-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathActor.h
213 lines (151 loc) · 5.17 KB
/
Actor.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
#pragma once
#include <vector>
#include "..\..\inc\types.h"
#include "clipset_movement.h"
#include "lighting.h"
#include "relationship.h"
#include "driving_mode.h"
#include "script.h"
//forward declaration
class ActorRecordingPlayback;
class ActorRecordingItem;
#include "ActorRecording.h"
#include <functional>
#include <memory>
class ActorRecordingPlayback {
protected:
bool m_hasFirstItemPlayback = false;;
bool m_playbackCompleted = false;
bool m_hasTeleportedToStartLocation = false;
int m_recordingItemIndex;
int m_maxRecordingItemIndex;
int m_attemptsCheckCompletion;
DWORD m_ticksStartCurrentItem;
DWORD m_ticksLastCheckOfCurrentItem;
DWORD m_ticksPlaybackStarted;
DWORD m_ticksTeleportStartLocation;
public:
ActorRecordingPlayback();
ActorRecordingPlayback(DWORD tickStart, int nrOfRecordedItems);
DWORD getTicksPlaybackStarted();
void setRecordingItemIndex(int index);
void nextRecordingItemIndex(DWORD ticksNow);
bool isCurrentRecordedItemLast();
int getRecordedItemIndex();
int getNumberOfRecordedItems();
int getAttemptsCheckedCompletion();
void incrementAttempstCheckedCompletion();
void setPlaybackCompleted();
bool hasPlaybackCompleted();
void setHasTeleportedToStartLocation(DWORD ticksNow);
bool hasTeleportedToStartLocation();
DWORD getTicksTeleportedToStartLocation();
void setTicksLastCheckOfCurrentItem(DWORD ticks);
DWORD getTicksLastCheckOfCurrentItem();
DWORD getTicksStartCurrentItem();
void setHasFirstItemPlayback(bool hasPlaybacked);
bool getHasFirstItemPlayback();
std::string toString();
};
class Actor
{
private:
Ped m_ped;
int m_blipId;
std::string m_name;
SCENE_MODE m_sceneStatus;
bool m_hasWaypoint=false;
Vector3 m_waypoint;
bool m_hasStartLocation=false;
Vector3 m_startLocation;
float m_startLocationHeading;
Vehicle m_startLocationVehicle;
Vector3 m_startLocationVehicleLocation;
float m_startLocationVehicleHeading;
int m_startLocationVehicleSeat = -1;
bool m_hasSpotlight = false;
SPOT_LIGHT_TYPE m_spotlightType;
SpotLightColor m_spotlightColor;
bool m_hasWalkingStyle = false;
ClipSet m_walkingStyle;
RelationshipGroup m_relationshipGroup;
bool m_vehicleNoDamage = false;
float m_walkingSpeed;
DrivingMode m_drivingMode;
bool m_hasRecording = false;
std::vector<std::shared_ptr<ActorRecordingItem>> m_actorRecordingItems;
bool m_replayRecordingInProgress = false;
ActorRecordingPlayback m_actorRecordingPlayback;
bool m_hasRecordingWithGunFire = false;
DWORD m_recordingDelay;
public:
Actor();
Actor(Ped ped);
Ped getActorPed();
std::string getName();
void setName(std::string name);
static Actor nullActor();
static void update_tick_recording_replay(Actor & actor);
bool isNullActor();
bool isActorThisPed(Ped ped);
void setActiveInScene(SCENE_MODE mode);
SCENE_MODE isActiveInScene();
void setBlipId(int blipId);
int getBlipId();
void changeActorPed(Ped newPed);
bool isActorInVehicle(Vehicle veh);
void setHasWaypoint(bool hasWaypoint);
bool hasWaypoint();
void setWaypoint(Vector3 location);
Vector3 getWaypoint();
void setHasStartLocation(bool hasStartLocation);
bool hasStartLocation();
void setStartLocation(Vector3 location);
Vector3 getStartLocation();
void setStartLocationHeading(float heading);
float getStartLocationHeading();
void setHasSpotLight(bool hasSpot);
bool hasSpotLight();
void setSpotLightType(SPOT_LIGHT_TYPE type);
SPOT_LIGHT_TYPE getSpotLightType();
void setSpotLightColor(SpotLightColor color);
SpotLightColor getSpotLightColor();
void setHasWalkingStyle(bool hasWalkingStyle);
bool hasWalkingStyle();
void setWalkingStyle(ClipSet walkingStyle);
ClipSet getWalkingStyle();
void setRelationshipGroup(RelationshipGroup group);
RelationshipGroup getRelationshipGroup();
void setVehicleNoDamage(bool noDamage);
bool hasVehicleNoDamage();
void setWalkingSpeed(float speed);
float getWalkingSpeed();
void setDrivingMode(DrivingMode drivingMode);
DrivingMode getDrivingMode();
void setHasRecording(bool hasRecording);
bool hasRecording();
void setHasRecordingWithGunFire(bool hasRecordingWithGunFire);
bool hasRecordingWithGunFire();
void setRecordingDelay(DWORD ticks);
DWORD getRecordingDelay();
void setStartLocationVehicle(Vehicle vehicle, Vector3 startLocationVehicleLocation,float startLocationVehicleHeading);
Vehicle getStartLocationVehicle();
Vector3 getStartLocationVehicleLocation();
bool hasStartLocationVehicle();
float getStartLocationVehicleHeading();
void setStartLocationVehicleSeat(int seat);
int getStartLocationVehicleSeat();
void setRecording(std::vector<std::shared_ptr<ActorRecordingItem>> actorRecordingItems);
std::vector<std::shared_ptr<ActorRecordingItem>> getRecording();
std::shared_ptr<ActorRecordingItem> getRecordingAt(int index);
void startReplayRecording(DWORD tickStart);
void stopReplayRecording();
void resumeReplayRecording();
bool isCurrentlyPlayingRecording();
void removeRecording();
ActorRecordingPlayback& getRecordingPlayback();
void setRecordingPlayback(ActorRecordingPlayback recordingPlayback);
void drawMarkersForRecording(bool showDisabled);
float distanceToNearestLocation(Vector3 startingPoint);
std::shared_ptr<ActorRecordingItem> getNearestRecording(Vector3 startingPoint);
};