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 588 by gumby, Fri Feb 11 08:21:14 2011 UTC vs.
Revision 589 by gumby, Sat Aug 20 09:47:49 2011 UTC

# Line 2 | Line 2
2   #include "Flatline_Server.h"
3   #include <Windows.h>
4   #include "PortForwardWrapper.h"
5 + #include "Mariusnet_Public.h"
6   //I hereby apologize for the uglyness of the below code.
7   //It was never intended to be "final" code, much less shared with anyone
8  
# Line 189 | Line 190 | void FLsSend_BINACHAR( short j, sockaddr
190  
191          sprintf(Char->OSD.Class, "%s", TMrInstance_GetInstanceName(PlayerList[j]->Chr->ONCC));
192                  
193 <        if(AC)
193 >        if(AC && AC->PhyContext)
194          {
195                  Char->Header.Position = AC->PhyContext->Position;
196          }
# Line 380 | Line 381 | bool FLrServer_PacketCallback(char* data
381  
382   bool FLrServer_Run()
383   {
384 +        m_announcegame Game;
385          HRESULT ret;
386          PortMappingContainer_C PMC =
387          {
# Line 412 | Line 414 | bool FLrServer_Run()
414          }
415  
416          DDrConsole_PrintF("Server started at %s...", inet_ntoa (*(struct in_addr *)*host_entry->h_addr_list));
417 +
418 +        Game.port = htons(27777);
419 +        sprintf_s(Game.g.Buffer, 128, "%s's Game", MariusLogin);
420 +
421 +        MSNet_CreateGame( &Game );
422 +
423          return NetUDPServer_Listen(27777, FLrServer_PacketCallback);
424   }

Diff Legend

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