mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-25 16:26:18 +00:00
Fix Snowballs service compile under MinGW
This commit is contained in:
parent
a5b2b269a9
commit
a47d71713f
3 changed files with 7 additions and 7 deletions
|
@ -50,10 +50,10 @@ public:
|
|||
virtual ~CBufSock();
|
||||
|
||||
/// Sets the application identifier
|
||||
void setAppId( uint64 id ) { _AppId = id; }
|
||||
void setAppId( uintptr_t id ) { _AppId = id; }
|
||||
|
||||
/// Returns the application identifier
|
||||
uint64 appId() const { return _AppId; }
|
||||
uintptr_t appId() const { return _AppId; }
|
||||
|
||||
/// Returns a string with the characteristics of the object
|
||||
std::string asString() const;
|
||||
|
@ -256,7 +256,7 @@ private:
|
|||
NLMISC::CObjectVector<uint8> _ReadyToSendBuffer;
|
||||
TBlockSize _RTSBIndex;
|
||||
|
||||
uint64 _AppId;
|
||||
uintptr_t _AppId;
|
||||
|
||||
// Connected state (from the user's point of view, i.e. changed when the connection/disconnection event is at the front of the receive queue)
|
||||
bool _ConnectedState;
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace NLNET {
|
|||
|
||||
static size_t ThreadCreator = 0;
|
||||
|
||||
static const uint64 AppIdDeadConnection = 0xDEAD;
|
||||
static const uintptr_t AppIdDeadConnection = 0xDEAD;
|
||||
|
||||
uint32 TotalCallbackCalled = 0;
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ void cbAddClient ( CMessage& msgin, TSockId from, CCallbackNetBase& clientcb )
|
|||
|
||||
if(from->appId() != 0)
|
||||
{
|
||||
CPlayer *p = (CPlayer *)(uint)from->appId();
|
||||
CPlayer *p = (CPlayer *)(void *)from->appId();
|
||||
if(id == p->id)
|
||||
p->State = CPlayer::ONLINE;
|
||||
}
|
||||
|
@ -590,12 +590,12 @@ void onDisconnectClient ( TSockId from, void *arg )
|
|||
{
|
||||
uint32 id;
|
||||
|
||||
uint64 i = from->appId();
|
||||
uintptr_t i = from->appId();
|
||||
|
||||
if(i == 0)
|
||||
return;
|
||||
|
||||
CPlayer *p = (CPlayer *)(uint)i;
|
||||
CPlayer *p = (CPlayer *)(void *)i;
|
||||
id = p->id;
|
||||
|
||||
nlinfo( "A client with unique Id %u has disconnected", id );
|
||||
|
|
Loading…
Reference in a new issue