107 |
|
//AC->HeadFacing |
108 |
|
//AC->HeadPitch |
109 |
|
typedef struct { |
110 |
+ |
uint16_t throwing; |
111 |
+ |
uint16_t throwFrame; |
112 |
+ |
char throwName[32]; |
113 |
+ |
} td; |
114 |
+ |
typedef struct { |
115 |
|
uint16_t PlayerNum; |
116 |
|
Vector3 Position; |
112 |
– |
Vector3 LastPosition; |
113 |
– |
Vector3 Location; |
117 |
|
float Facing; |
118 |
|
float DesiredFacing; |
116 |
– |
float CosmeticFacing; |
119 |
|
uint32_t Health; |
120 |
|
uint32_t MaxHealth; |
121 |
|
input_struct Inputs; |
122 |
|
int rare_sync_index; |
121 |
– |
//__int16 Varient; |
122 |
– |
#if 0 |
123 |
– |
uint16_t Frame; |
123 |
|
char Animation[32]; |
124 |
< |
uint16_t AnimationToState; |
125 |
< |
uint16_t AnimationFromState; |
126 |
< |
uint16_t AnimationType; |
127 |
< |
uint16_t NextAnimationType; |
128 |
< |
uint16_t AnimationType2; |
129 |
< |
__int16 InterpolationCurrentFrame; |
131 |
< |
__int16 InterpolationFromState; |
132 |
< |
__int16 InterpolationLength; |
133 |
< |
Quaternion InterpolationStartRotations[19]; |
134 |
< |
Vector3 StitchVelocity; |
135 |
< |
int StitchHeight; |
136 |
< |
char Stitch; |
137 |
< |
Quaternion BoneMatrices[19]; |
138 |
< |
int Overlay; |
139 |
< |
Quaternion OverlayRotations[19]; |
140 |
< |
#endif |
124 |
> |
uint16_t Frame; |
125 |
> |
td throw_data; |
126 |
> |
int Kills; |
127 |
> |
int Damage; |
128 |
> |
int Deaths; |
129 |
> |
|
130 |
|
} player_data; |
131 |
|
|
132 |
|
//todo, move health in... |
137 |
|
char Class[32]; |
138 |
|
} rare_sync_data; |
139 |
|
|
140 |
+ |
typedef struct { |
141 |
+ |
unsigned int event_index; |
142 |
+ |
int intArray[]; |
143 |
+ |
} flatline_event; |
144 |
+ |
|
145 |
|
//used for storing data about each player |
146 |
|
typedef struct { |
147 |
|
int FLATLINE; |
148 |
|
char id; |
149 |
|
int packet_index; |
150 |
< |
union payload |
150 |
> |
union |
151 |
|
{ |
152 |
|
char data[1080]; |
153 |
|
connect_reply connect_reply; |
158 |
|
player_data player_data; |
159 |
|
rare_sync_data rare_sync_data; |
160 |
|
uint16_t sync_request; |
161 |
+ |
flatline_event flatline_event; |
162 |
|
}; |
163 |
|
} flatline_packet; |
164 |
|
#define FLATLINE_HEADER (sizeof(flatline_packet)-sizeof(char)*1080) |
171 |
|
extern int sock; |
172 |
|
|
173 |
|
enum { |
174 |
+ |
NULL_PACKET, // |
175 |
|
CONNECT_SEND, |
176 |
|
CONNECT_REPLY, |
177 |
|
STATUS, |
183 |
|
PLAYER_DATA, |
184 |
|
RARE_SYNC_DATA, |
185 |
|
RARE_SYNC_DATA_REQUEST, |
186 |
+ |
FLATLINE_EVENT, |
187 |
+ |
}; |
188 |
+ |
|
189 |
+ |
enum FlatlineEvent { |
190 |
+ |
EV_RESPAWN, |
191 |
+ |
EV_DISCONNECT, |
192 |
+ |
EV_DOOR_OPEN, |
193 |
+ |
EV_MAX, |
194 |
|
}; |
195 |
|
|
196 |
|
|
197 |
+ |
|
198 |
+ |
|
199 |
+ |
enum { |
200 |
+ |
STATE_ALIVE, |
201 |
+ |
STATE_DEAD, |
202 |
+ |
}; |
203 |
+ |
enum { |
204 |
+ |
PF_HOST, |
205 |
+ |
PF_BOT, |
206 |
+ |
PF_SCRIPTEDAI, |
207 |
+ |
}; |
208 |
|
typedef struct { |
209 |
|
int ip; |
210 |
|
char name[32]; |
212 |
|
Character* Chr; |
213 |
|
uint16_t spawnnumber; |
214 |
|
uint16_t list_slot; |
200 |
– |
|
215 |
|
float MouseDeltaX; |
216 |
|
float MouseDeltaY; |
217 |
|
uint32_t Actions1; |
218 |
|
uint32_t Actions2; |
219 |
|
unsigned int LastInputTime; |
220 |
|
input_struct CacheInput; |
207 |
– |
|
221 |
|
player_data player_data; |
209 |
– |
|
222 |
|
unsigned int rare_sync_index; |
223 |
|
void* OldClass; |
224 |
|
Inventory Inventory; |
225 |
+ |
uint16_t state; |
226 |
+ |
int flags; |
227 |
|
} player_info; |
228 |
|
|
229 |
|
player_info * FLr_FindEmptySlot(); |
246 |
|
extern bool client_connected; |
247 |
|
extern bool server_started; |
248 |
|
extern char player_name[]; |
249 |
< |
|
249 |
> |
void FLrRun_Scores(); |
250 |
> |
void PlayerDisconnect( int Player ); |
251 |
> |
int FLrEvent_GetNumArgs( int eventIndex ); |
252 |
|
#endif |