C++ conversion: fixed compilation errors for quake3 project.
This commit is contained in:
@@ -222,7 +222,7 @@ void SV_Startup( void ) {
|
||||
}
|
||||
SV_BoundMaxClients( 1 );
|
||||
|
||||
svs.clients = Z_Malloc (sizeof(client_t) * sv_maxclients->integer );
|
||||
svs.clients = (client_t*) Z_Malloc (sizeof(client_t) * sv_maxclients->integer );
|
||||
if ( com_dedicated->integer ) {
|
||||
svs.numSnapshotEntities = sv_maxclients->integer * PACKET_BACKUP * 64;
|
||||
} else {
|
||||
@@ -264,7 +264,7 @@ void SV_ChangeMaxClients( void ) {
|
||||
return;
|
||||
}
|
||||
|
||||
oldClients = Hunk_AllocateTempMemory( count * sizeof(client_t) );
|
||||
oldClients = (client_t*) Hunk_AllocateTempMemory( count * sizeof(client_t) );
|
||||
// copy the clients to hunk memory
|
||||
for ( i = 0 ; i < count ; i++ ) {
|
||||
if ( svs.clients[i].state >= CS_CONNECTED ) {
|
||||
@@ -279,7 +279,7 @@ void SV_ChangeMaxClients( void ) {
|
||||
Z_Free( svs.clients );
|
||||
|
||||
// allocate new clients
|
||||
svs.clients = Z_Malloc ( sv_maxclients->integer * sizeof(client_t) );
|
||||
svs.clients = (client_t*) Z_Malloc ( sv_maxclients->integer * sizeof(client_t) );
|
||||
Com_Memset( svs.clients, 0, sv_maxclients->integer * sizeof(client_t) );
|
||||
|
||||
// copy the clients over
|
||||
@@ -384,7 +384,7 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
|
||||
FS_ClearPakReferences(0);
|
||||
|
||||
// allocate the snapshot entities on the hunk
|
||||
svs.snapshotEntities = Hunk_Alloc( sizeof(entityState_t)*svs.numSnapshotEntities, h_high );
|
||||
svs.snapshotEntities = (entityState_t*) Hunk_Alloc( sizeof(entityState_t)*svs.numSnapshotEntities, h_high );
|
||||
svs.nextSnapshotEntities = 0;
|
||||
|
||||
// toggle the server bit so clients can detect that a
|
||||
@@ -464,7 +464,7 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
|
||||
}
|
||||
|
||||
// connect the client again
|
||||
denied = VM_ExplicitArgPtr( gvm, VM_Call( gvm, GAME_CLIENT_CONNECT, i, qfalse, isBot ) ); // firstTime = qfalse
|
||||
denied = (char*) VM_ExplicitArgPtr( gvm, VM_Call( gvm, GAME_CLIENT_CONNECT, i, qfalse, isBot ) ); // firstTime = qfalse
|
||||
if ( denied ) {
|
||||
// this generally shouldn't happen, because the client
|
||||
// was connected before the level change
|
||||
|
||||
Reference in New Issue
Block a user