Fix build on 64bit platforms
This commit is contained in:
parent
e78c69cddf
commit
e18160e80f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=197023
2 changed files with 36 additions and 4 deletions
16
games/cube/files/patch-clientextras.cpp
Normal file
16
games/cube/files/patch-clientextras.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
--- clientextras.cpp.orig 2007-08-03 15:45:28.000000000 +0200
|
||||
+++ clientextras.cpp 2007-08-03 15:46:07.000000000 +0200
|
||||
@@ -14,11 +14,11 @@
|
||||
int n = 3;
|
||||
float speed = 100.0f;
|
||||
float mz = d->o.z-d->eyeheight+1.55f*scale;
|
||||
- int basetime = -((int)d&0xFFF);
|
||||
+ intptr_t basetime = -((intptr_t)d&0xFFF);
|
||||
if(d->state==CS_DEAD)
|
||||
{
|
||||
int r;
|
||||
- if(hellpig) { n = 2; r = range[3]; } else { n = (int)d%3; r = range[n]; };
|
||||
+ if(hellpig) { n = 2; r = range[3]; } else { n = (intptr_t)d%3; r = range[n]; };
|
||||
basetime = d->lastaction;
|
||||
int t = lastmillis-d->lastaction;
|
||||
if(t<0 || t>20000) return;
|
|
@ -1,5 +1,5 @@
|
|||
--- server.cpp.orig Tue Feb 6 01:26:35 2007
|
||||
+++ server.cpp Tue Feb 6 01:27:06 2007
|
||||
--- server.cpp.orig 2007-08-03 15:52:35.000000000 +0200
|
||||
+++ server.cpp 2007-08-03 15:58:58.000000000 +0200
|
||||
@@ -104,7 +104,7 @@
|
||||
void disconnect_client(int n, char *reason)
|
||||
{
|
||||
|
@ -9,8 +9,24 @@
|
|||
clients[n].type = ST_EMPTY;
|
||||
send2(true, -1, SV_CDIS, n);
|
||||
};
|
||||
@@ -408,6 +408,9 @@
|
||||
send2(true, -1, SV_CDIS, (int)event.peer->data);
|
||||
@@ -397,17 +397,20 @@
|
||||
}
|
||||
case ENET_EVENT_TYPE_RECEIVE:
|
||||
brec += event.packet->dataLength;
|
||||
- process(event.packet, (int)event.peer->data);
|
||||
+ process(event.packet, (intptr_t)event.peer->data);
|
||||
if(event.packet->referenceCount==0) enet_packet_destroy(event.packet);
|
||||
break;
|
||||
|
||||
case ENET_EVENT_TYPE_DISCONNECT:
|
||||
- if((int)event.peer->data<0) break;
|
||||
- printf("disconnected client (%s)\n", clients[(int)event.peer->data].hostname);
|
||||
- clients[(int)event.peer->data].type = ST_EMPTY;
|
||||
- send2(true, -1, SV_CDIS, (int)event.peer->data);
|
||||
+ if((intptr_t)event.peer->data<0) break;
|
||||
+ printf("disconnected client (%s)\n", clients[(intptr_t)event.peer->data].hostname);
|
||||
+ clients[(intptr_t)event.peer->data].type = ST_EMPTY;
|
||||
+ send2(true, -1, SV_CDIS, (intptr_t)event.peer->data);
|
||||
event.peer->data = (void *)-1;
|
||||
break;
|
||||
+
|
||||
|
|
Loading…
Reference in a new issue