mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2024-12-04 01:41:40 +00:00
Removed doomclassic networking functions
This commit is contained in:
parent
513fc0ee8f
commit
7e3e0fd95d
3 changed files with 16 additions and 13 deletions
|
@ -141,9 +141,9 @@ namespace DoomLib
|
||||||
|
|
||||||
Globals *globaldata[4];
|
Globals *globaldata[4];
|
||||||
|
|
||||||
RecvFunc Recv;
|
//RecvFunc Recv;
|
||||||
SendFunc Send;
|
//SendFunc Send;
|
||||||
SendRemoteFunc SendRemote;
|
//SendRemoteFunc SendRemote;
|
||||||
|
|
||||||
|
|
||||||
bool Active = true;
|
bool Active = true;
|
||||||
|
@ -419,12 +419,14 @@ void DoomLib::SetPlayer( int id )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
void DoomLib::SetNetworking( RecvFunc rf, SendFunc sf, SendRemoteFunc sendRemote )
|
void DoomLib::SetNetworking( RecvFunc rf, SendFunc sf, SendRemoteFunc sendRemote )
|
||||||
{
|
{
|
||||||
Recv = rf;
|
Recv = rf;
|
||||||
Send = sf;
|
Send = sf;
|
||||||
SendRemote = sendRemote;
|
SendRemote = sendRemote;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int DoomLib::GetPlayer()
|
int DoomLib::GetPlayer()
|
||||||
{
|
{
|
||||||
|
@ -544,7 +546,7 @@ void DoomLib::SendNetwork() {
|
||||||
if ( !globalNetworking ) {
|
if ( !globalNetworking ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DoomLib::SendRemote();
|
//DoomLib::SendRemote();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoomLib::RunSound() {
|
void DoomLib::RunSound() {
|
||||||
|
|
|
@ -93,9 +93,9 @@ struct ExpansionData {
|
||||||
|
|
||||||
namespace DoomLib
|
namespace DoomLib
|
||||||
{
|
{
|
||||||
typedef int ( *RecvFunc)( char* buff, DWORD *numRecv );
|
//typedef int ( *RecvFunc)( char* buff, DWORD *numRecv );
|
||||||
typedef int ( *SendFunc)( const char* buff, DWORD size, sockaddr_in *target, int toNode );
|
//typedef int ( *SendFunc)( const char* buff, DWORD size, sockaddr_in *target, int toNode );
|
||||||
typedef int ( *SendRemoteFunc)();
|
//typedef int ( *SendRemoteFunc)();
|
||||||
|
|
||||||
void InitGlobals( void *ptr = NULL );
|
void InitGlobals( void *ptr = NULL );
|
||||||
void InitGame( int argc, char ** argv );
|
void InitGame( int argc, char ** argv );
|
||||||
|
@ -108,7 +108,7 @@ namespace DoomLib
|
||||||
void Draw();
|
void Draw();
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
|
|
||||||
void SetNetworking( RecvFunc rf, SendFunc sf, SendRemoteFunc sendRemote );
|
//void SetNetworking( RecvFunc rf, SendFunc sf, SendRemoteFunc sendRemote );
|
||||||
|
|
||||||
void SetPlayer( int id );
|
void SetPlayer( int id );
|
||||||
int GetPlayer();
|
int GetPlayer();
|
||||||
|
@ -126,9 +126,9 @@ namespace DoomLib
|
||||||
|
|
||||||
void RunSound();
|
void RunSound();
|
||||||
|
|
||||||
extern RecvFunc Recv;
|
//extern RecvFunc Recv;
|
||||||
extern SendFunc Send;
|
//extern SendFunc Send;
|
||||||
extern SendRemoteFunc SendRemote;
|
//extern SendRemoteFunc SendRemote;
|
||||||
|
|
||||||
extern void* (*Z_Malloc)( int size, int tag, void* user );
|
extern void* (*Z_Malloc)( int size, int tag, void* user );
|
||||||
extern void (*Z_FreeTag)(int lowtag );
|
extern void (*Z_FreeTag)(int lowtag );
|
||||||
|
|
|
@ -84,7 +84,8 @@ int DOOMPORT = 1002; // DHM - Nerve :: On original XBox, ports 1000 - 1255 saved
|
||||||
|
|
||||||
|
|
||||||
unsigned long GetServerIP() {
|
unsigned long GetServerIP() {
|
||||||
return ::g->sendaddress[::g->doomcom.consoleplayer].sin_addr.s_addr;
|
//return ::g->sendaddress[::g->doomcom.consoleplayer].sin_addr.s_addr;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void (*netget) (void);
|
void (*netget) (void);
|
||||||
|
@ -99,7 +100,7 @@ int UDPsocket (void)
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
// allocate a socket
|
// allocate a socket
|
||||||
s = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
//s = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||||
if ( !IsValidSocket( s ) ) {
|
if ( !IsValidSocket( s ) ) {
|
||||||
int err = GetLastSocketError();
|
int err = GetLastSocketError();
|
||||||
I_Error( "can't create socket, error %d", err );
|
I_Error( "can't create socket, error %d", err );
|
||||||
|
|
Loading…
Reference in a new issue