| 35 |
|
#include "BFW_Utility.h" |
| 36 |
|
#include "Daodan_Console.h" |
| 37 |
|
#include "Oni_Character.h" |
| 38 |
< |
|
| 38 |
> |
#include "Flatline_Packet.h" |
| 39 |
|
|
| 40 |
|
#define pad1_size (sizeof(int64_t) - sizeof(short)) |
| 41 |
|
#define pad2_size (128 - (sizeof(short) + pad1_size + sizeof(int64_t))) |
| 113 |
|
uint16_t throwFrame; |
| 114 |
|
char throwName[32]; |
| 115 |
|
} td; |
| 116 |
+ |
/* |
| 117 |
|
typedef struct { |
| 118 |
|
uint16_t PlayerNum; |
| 119 |
|
//Vector3 Position; |
| 139 |
|
} player_data; |
| 140 |
|
|
| 141 |
|
//todo, move health in... |
| 142 |
< |
typedef struct { |
| 142 |
> |
/*typedef struct { |
| 143 |
|
short unsigned int PlayerNum; |
| 144 |
|
unsigned int index; |
| 145 |
|
Inventory Inventory; |
| 146 |
|
char Class[32]; |
| 147 |
|
} rare_sync_data; |
| 148 |
< |
|
| 148 |
> |
*/ |
| 149 |
|
typedef struct { |
| 150 |
|
unsigned int event_index; |
| 151 |
|
int intArray[]; |
| 152 |
|
} flatline_event; |
| 153 |
< |
|
| 153 |
> |
/* |
| 154 |
|
typedef struct { |
| 155 |
|
int16_t PlayerNum; |
| 156 |
|
float MouseDeltaX; |
| 161 |
|
float DesiredFacing; |
| 162 |
|
Vector3 Position; |
| 163 |
|
} player_input; |
| 164 |
< |
|
| 164 |
> |
*/ |
| 165 |
|
//used for storing data about each player |
| 166 |
|
typedef struct { |
| 167 |
|
//int FLATLINE; |
| 175 |
|
input_struct input_struct; |
| 176 |
|
new_player new_player; |
| 177 |
|
server_status server_status; |
| 178 |
< |
player_data player_data; |
| 179 |
< |
rare_sync_data rare_sync_data; |
| 178 |
> |
//player_data player_data; |
| 179 |
> |
//rare_sync_data rare_sync_data; |
| 180 |
|
uint16_t sync_request; |
| 181 |
|
flatline_event flatline_event; |
| 182 |
|
uint32_t ping; |
| 183 |
< |
player_input all_input[33]; |
| 183 |
> |
//player_input all_input[33]; |
| 184 |
|
}; |
| 185 |
|
} flatline_packet; |
| 186 |
|
#define FLATLINE_HEADER (sizeof(flatline_packet)-sizeof(char)*1080) |
| 202 |
|
ECHO, |
| 203 |
|
NEW_PLAYER, |
| 204 |
|
PLAYER_INPUT, |
| 205 |
< |
PLAYER_DATA, |
| 206 |
< |
RARE_SYNC_DATA, |
| 207 |
< |
RARE_SYNC_DATA_REQUEST, |
| 205 |
> |
//PLAYER_DATA, |
| 206 |
> |
//RARE_SYNC_DATA, |
| 207 |
> |
//RARE_SYNC_DATA_REQUEST, |
| 208 |
|
FLATLINE_EVENT, |
| 209 |
|
PK_PING, |
| 210 |
|
PK_PONG, |
| 211 |
< |
PK_ALL_INPUT, |
| 211 |
> |
//PK_ALL_INPUT, |
| 212 |
> |
PK_PLAYER_DATA, |
| 213 |
|
}; |
| 214 |
|
|
| 215 |
|
enum FlatlineEvent { |
| 249 |
|
Character* Chr; |
| 250 |
|
uint16_t spawnnumber; |
| 251 |
|
uint16_t list_slot; |
| 252 |
< |
|
| 253 |
< |
//Todo: move into struct for slightly faster copying |
| 254 |
< |
float MouseDeltaX; |
| 255 |
< |
float MouseDeltaY; |
| 256 |
< |
uint32_t Actions1; |
| 257 |
< |
uint32_t Actions2; |
| 258 |
< |
float Facing; |
| 259 |
< |
float DesiredFacing; |
| 260 |
< |
//float Height; |
| 252 |
> |
|
| 253 |
> |
PlayerInput InputFromClient; |
| 254 |
> |
|
| 255 |
> |
//////////////////////////// |
| 256 |
> |
//Sync stuff |
| 257 |
> |
//////////////////////////// |
| 258 |
> |
uint16_t UpdateFlags; |
| 259 |
> |
|
| 260 |
> |
PlayerInput Input; |
| 261 |
> |
PlayerHealth Health; |
| 262 |
> |
PlayerFacing Facings; |
| 263 |
> |
PlayerScore Score; |
| 264 |
> |
void* Animation; |
| 265 |
> |
uint16_t Frame; |
| 266 |
> |
PlayerThrowData ThrowData; |
| 267 |
> |
void* Class; |
| 268 |
> |
PlayerInventory Inventory; |
| 269 |
|
Vector3 Position; |
| 270 |
+ |
//////////////////////////// |
| 271 |
+ |
bool HasAppliedThrow; |
| 272 |
|
|
| 273 |
|
unsigned int LastInputTime; |
| 274 |
< |
input_struct CacheInput; |
| 275 |
< |
player_data player_data; |
| 276 |
< |
unsigned int rare_sync_index; |
| 265 |
< |
void* OldClass; |
| 266 |
< |
Inventory Inventory; |
| 274 |
> |
|
| 275 |
> |
|
| 276 |
> |
|
| 277 |
|
uint16_t state; |
| 278 |
|
int flags; |
| 279 |
|
int DeathTime; |
| 311 |
|
void FLrPlayerRespawn( int Player ); |
| 312 |
|
int FLrEvent_GetNumArgs( int eventIndex ); |
| 313 |
|
bool FlatlineInitialize(); |
| 314 |
+ |
|
| 315 |
+ |
bool DoWeUpdateThis( uint16_t BitSet, uint16_t Flag ); |
| 316 |
+ |
|
| 317 |
|
extern unsigned int lastPingTime; |
| 318 |
|
#endif |