| 64 |
|
DWORD WINAPI StartServer(void* lol); |
| 65 |
|
DWORD WINAPI StartClient(void* lol); |
| 66 |
|
|
| 67 |
– |
//oh snap, I just realized this is rossy's version of flatline_packet. :| |
| 68 |
– |
typedef struct { |
| 69 |
– |
char signature[8]; |
| 70 |
– |
uint16_t protocol_version; |
| 71 |
– |
char data[0]; //data[0] doesn't work well with simple casts, btw. If you allocate enough space for a handshake_packet |
| 72 |
– |
} handshake_packet; //there won't be enough room for data. You would have to manually manage the memory (ew) |
| 67 |
|
|
| 68 |
|
//initial connection |
| 69 |
|
typedef struct { |
| 91 |
|
CharacterObject Character; |
| 92 |
|
} new_player; |
| 93 |
|
|
| 94 |
< |
extern int update_rate; |
| 94 |
> |
//extern int update_rate; |
| 95 |
|
|
| 96 |
|
typedef struct { |
| 97 |
|
float MouseDeltaX; |
| 98 |
|
float MouseDeltaY; |
| 99 |
|
uint32_t Actions1; |
| 100 |
|
uint32_t Actions2; |
| 101 |
+ |
unsigned int Time; |
| 102 |
|
} input_struct; |
| 103 |
|
|
| 104 |
|
//TODO: |
| 117 |
|
uint32_t Health; |
| 118 |
|
uint32_t MaxHealth; |
| 119 |
|
input_struct Inputs; |
| 120 |
+ |
int rare_sync_index; |
| 121 |
+ |
//__int16 Varient; |
| 122 |
|
#if 0 |
| 123 |
|
uint16_t Frame; |
| 124 |
|
char Animation[32]; |
| 140 |
|
#endif |
| 141 |
|
} player_data; |
| 142 |
|
|
| 143 |
+ |
//todo, move health in... |
| 144 |
+ |
typedef struct { |
| 145 |
+ |
short unsigned int PlayerNum; |
| 146 |
+ |
unsigned int index; |
| 147 |
+ |
Inventory Inventory; |
| 148 |
+ |
char Class[32]; |
| 149 |
+ |
} rare_sync_data; |
| 150 |
+ |
|
| 151 |
|
//used for storing data about each player |
| 152 |
|
typedef struct { |
| 153 |
|
int FLATLINE; |
| 162 |
|
new_player new_player; |
| 163 |
|
server_status server_status; |
| 164 |
|
player_data player_data; |
| 165 |
+ |
rare_sync_data rare_sync_data; |
| 166 |
+ |
uint16_t sync_request; |
| 167 |
|
}; |
| 168 |
|
} flatline_packet; |
| 169 |
< |
#define FLATLINE_HEADER sizeof(flatline_packet)-sizeof(char)*1080 |
| 169 |
> |
#define FLATLINE_HEADER (sizeof(flatline_packet)-sizeof(char)*1080) |
| 170 |
|
//#define FLATLINE_PACKET_SIZE sizeof(flatline_packet) |
| 171 |
|
|
| 172 |
|
|
| 185 |
|
NEW_PLAYER, |
| 186 |
|
PLAYER_INPUT, |
| 187 |
|
PLAYER_DATA, |
| 188 |
+ |
RARE_SYNC_DATA, |
| 189 |
+ |
RARE_SYNC_DATA_REQUEST, |
| 190 |
|
}; |
| 191 |
|
|
| 192 |
|
|
| 193 |
|
typedef struct { |
| 194 |
|
int ip; |
| 195 |
< |
char name[32]; |
| 195 |
> |
char name[32]; |
| 196 |
|
char country[2]; |
| 197 |
|
Character* Chr; |
| 198 |
|
uint16_t spawnnumber; |
| 199 |
|
uint16_t list_slot; |
| 200 |
< |
uint32_t Actions1; |
| 192 |
< |
uint32_t Actions2; |
| 200 |
> |
|
| 201 |
|
float MouseDeltaX; |
| 202 |
|
float MouseDeltaY; |
| 203 |
+ |
uint32_t Actions1; |
| 204 |
+ |
uint32_t Actions2; |
| 205 |
+ |
unsigned int LastInputTime; |
| 206 |
+ |
input_struct CacheInput; |
| 207 |
+ |
|
| 208 |
+ |
player_data player_data; |
| 209 |
+ |
|
| 210 |
+ |
unsigned int rare_sync_index; |
| 211 |
+ |
void* OldClass; |
| 212 |
+ |
Inventory Inventory; |
| 213 |
|
} player_info; |
| 214 |
|
|
| 215 |
|
player_info * FLr_FindEmptySlot(); |