ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/MSVC/Flatline.h
(Generate patch)

Comparing Daodan/MSVC/Flatline.h (file contents):
Revision 581 by gumby, Fri Jan 14 08:36:34 2011 UTC vs.
Revision 582 by gumby, Wed Jan 19 04:35:43 2011 UTC

# Line 115 | Line 115 | typedef struct {
115   } td;
116   typedef struct {
117          uint16_t PlayerNum;
118 <        Vector3 Position;
119 <        float Facing;
120 <        float DesiredFacing;
118 >        //Vector3 Position;
119 >        
120 >        //float Facing;
121 >        //float DesiredFacing;
122 >
123 >        float UD;
124 >        float LR;
125 >
126          uint32_t Health;
127          uint32_t MaxHealth;
128          //input_struct Inputs;
# Line 129 | Line 134 | typedef struct {
134          int Damage;
135          int Deaths;
136          uint16_t Ping;
137 +
138   } player_data;
139  
140   //todo, move health in...
# Line 145 | Line 151 | typedef struct {
151   } flatline_event;
152  
153   typedef struct {
154 +        int16_t PlayerNum;
155          float MouseDeltaX;
156          float MouseDeltaY;
157          uint32_t Actions1;
158          uint32_t Actions2;
159 +        float Facing;
160 +        float DesiredFacing;
161 +        Vector3 Position;
162   } player_input;
163  
164   //used for storing data about each player
# Line 209 | Line 219 | enum FlatlineEvent {
219   };
220  
221  
222 + typedef struct {
223 +        //Server Only
224 +        bool PleaseUpdateAllPlayers;
225 +        //Client stuff (can be used by server "client")
226 +
227 +        //Move from random scattered bools to these, please.
228 +        bool ClientConnected;
229 +        unsigned int ClientSlot;
230 +        bool ServerStatus;
231 + } multiplayer_status;
232  
233   enum {
234          STATE_ALIVE,
# Line 226 | Line 246 | typedef struct {
246          Character* Chr;
247          uint16_t spawnnumber;
248          uint16_t list_slot;
249 +        
250 +        //Todo: move into struct for slightly faster copying
251          float MouseDeltaX;
252          float MouseDeltaY;
253          uint32_t Actions1;
254          uint32_t Actions2;
255 +        float Facing;
256 +        float DesiredFacing;
257 +        //float Height;
258 +        Vector3 Position;
259 +
260          unsigned int LastInputTime;
261          input_struct CacheInput;
262          player_data player_data;
# Line 241 | Line 268 | typedef struct {
268          int DeathTime;
269          uint32_t Ping;
270          bool DataApplied;
271 +        
272 +        uint32_t ShapeshiftCooldown;
273   } player_info;
274  
275   player_info * FLr_FindEmptySlot();
# Line 259 | Line 288 | extern sockaddr_in client_address;
288   extern sockaddr_in address;
289   extern player_info Players[];
290   extern player_info * PlayerList[];
291 <
291 > extern multiplayer_status MultiplayerStatus;
292   int UDPServer_SendToAll(void* packet, int size);
293  
294   extern bool client_connected;
# Line 270 | Line 299 | void FLrRun_Scores();
299   void FLrPlayerDisconnect( int Player );
300   void FLrPlayerRespawn( int Player );
301   int FLrEvent_GetNumArgs( int eventIndex );
302 <
302 > bool FlatlineInitialize();
303   extern unsigned int lastPingTime;
304   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)