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

Comparing Daodan/MSVC/Flatline_Server.c (file contents):
Revision 579 by gumby, Thu Jan 13 01:02:52 2011 UTC vs.
Revision 580 by gumby, Fri Jan 14 07:39:14 2011 UTC

# Line 125 | Line 125 | int UDPServer_SendToAll(void* packet, in
125  
126   //FLsPublic_Event
127   //Sends an event (door opening, player disconnecting, etc) to all players
128 < //Always make sure you send a pointer to this, even if it is just one arg. ;)
129 < //Returns 0 because mixing C and assembly is stupid.
128 > //Always make sure you send a pointer to this, even if it is just one arg. ;).
129   //If it is void the double door in State crashes. Probably stack corruption,
130   //I'm not sure exactly why.
131 + //So we return 0 to stop that.
132   int FLsPublic_Event( const unsigned int eventIndex, const int * args )
133   {
134          int numArgs = FLrEvent_GetNumArgs( eventIndex );
# Line 141 | Line 141 | int FLsPublic_Event( const unsigned int
141          return 0;
142   }
143  
144 + void FLsPingAll()
145 + {
146 +        flatline_packet ping;
147 +        ping.id = PK_PING;
148 +        lastPingTime = ping.ping = ONgGameState->GameTime;
149 +        UDPServer_SendToAll(&ping, FLATLINE_HEADER + 4);
150 + }

Diff Legend

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