mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-01-31 05:30:40 +00:00
s/WriteLong/WriteInt/ to match the argument type
This commit is contained in:
parent
5f5a6e7043
commit
94df46637a
36 changed files with 174 additions and 174 deletions
|
@ -1689,7 +1689,7 @@ bool idEntity::StartSoundShader( const idSoundShader *shader, const s_channelTyp
|
|||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.BeginWriting();
|
||||
msg.WriteLong( gameLocal.ServerRemapDecl( -1, DECL_SOUND, shader->Index() ) );
|
||||
msg.WriteInt( gameLocal.ServerRemapDecl( -1, DECL_SOUND, shader->Index() ) );
|
||||
msg.WriteByte( channel );
|
||||
ServerSendEvent( EVENT_STARTSOUNDSHADER, &msg, false, -1 );
|
||||
}
|
||||
|
@ -4834,7 +4834,7 @@ void idEntity::WriteColorToSnapshot( idBitMsgDelta &msg ) const {
|
|||
color[1] = renderEntity.shaderParms[ SHADERPARM_GREEN ];
|
||||
color[2] = renderEntity.shaderParms[ SHADERPARM_BLUE ];
|
||||
color[3] = renderEntity.shaderParms[ SHADERPARM_ALPHA ];
|
||||
msg.WriteLong( PackColor( color ) );
|
||||
msg.WriteInt( PackColor( color ) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -4925,7 +4925,7 @@ void idEntity::ServerSendEvent( int eventId, const idBitMsg *msg, bool saveEvent
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_EVENT );
|
||||
outMsg.WriteBits( gameLocal.GetSpawnId( this ), 32 );
|
||||
outMsg.WriteByte( eventId );
|
||||
outMsg.WriteLong( gameLocal.time );
|
||||
outMsg.WriteInt( gameLocal.time );
|
||||
if ( msg ) {
|
||||
outMsg.WriteBits( msg->GetSize(), idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
outMsg.WriteData( msg->GetData(), msg->GetSize() );
|
||||
|
@ -4967,7 +4967,7 @@ void idEntity::ClientSendEvent( int eventId, const idBitMsg *msg ) const {
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_EVENT );
|
||||
outMsg.WriteBits( gameLocal.GetSpawnId( this ), 32 );
|
||||
outMsg.WriteByte( eventId );
|
||||
outMsg.WriteLong( gameLocal.time );
|
||||
outMsg.WriteInt( gameLocal.time );
|
||||
if ( msg ) {
|
||||
outMsg.WriteBits( msg->GetSize(), idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
outMsg.WriteData( msg->GetData(), msg->GetSize() );
|
||||
|
@ -5348,8 +5348,8 @@ void idAnimatedEntity::AddDamageEffect( const trace_t &collision, const idVec3 &
|
|||
msg.WriteFloat( localOrigin[2] );
|
||||
msg.WriteDir( localNormal, 24 );
|
||||
msg.WriteDir( localDir, 24 );
|
||||
msg.WriteLong( gameLocal.ServerRemapDecl( -1, DECL_ENTITYDEF, def->Index() ) );
|
||||
msg.WriteLong( gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) );
|
||||
msg.WriteInt( gameLocal.ServerRemapDecl( -1, DECL_ENTITYDEF, def->Index() ) );
|
||||
msg.WriteInt( gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) );
|
||||
ServerSendEvent( EVENT_ADD_DAMAGE_EFFECT, &msg, false, -1 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -754,8 +754,8 @@ idEntityFx::WriteToSnapshot
|
|||
void idEntityFx::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
||||
GetPhysics()->WriteToSnapshot( msg );
|
||||
WriteBindToSnapshot( msg );
|
||||
msg.WriteLong( ( fxEffect != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_FX, fxEffect->Index() ) : -1 );
|
||||
msg.WriteLong( started );
|
||||
msg.WriteInt( ( fxEffect != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_FX, fxEffect->Index() ) : -1 );
|
||||
msg.WriteInt( started );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -4373,7 +4373,7 @@ void idGameLocal::SetPortalState( qhandle_t portal, int blockingBits ) {
|
|||
if ( !gameLocal.isClient ) {
|
||||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_PORTAL );
|
||||
outMsg.WriteLong( portal );
|
||||
outMsg.WriteInt( portal );
|
||||
outMsg.WriteBits( blockingBits, NUM_RENDER_PORTAL_BITS );
|
||||
networkSystem->ServerSendReliableMessage( -1, outMsg );
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ void idGameLocal::ServerSendDeclRemapToClient( int clientNum, declType_t type, i
|
|||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_REMAP_DECL );
|
||||
outMsg.WriteByte( type );
|
||||
outMsg.WriteLong( index );
|
||||
outMsg.WriteInt( index );
|
||||
outMsg.WriteString( decl->GetName() );
|
||||
networkSystem->ServerSendReliableMessage( clientNum, outMsg );
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ void idGameLocal::ServerClientBegin( int clientNum ) {
|
|||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SPAWN_PLAYER );
|
||||
outMsg.WriteByte( clientNum );
|
||||
outMsg.WriteLong( spawnIds[ clientNum ] );
|
||||
outMsg.WriteInt( spawnIds[ clientNum ] );
|
||||
networkSystem->ServerSendReliableMessage( -1, outMsg );
|
||||
}
|
||||
|
||||
|
@ -396,7 +396,7 @@ void idGameLocal::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.BeginWriting( );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SPAWN_PLAYER );
|
||||
outMsg.WriteByte( i );
|
||||
outMsg.WriteLong( spawnIds[ i ] );
|
||||
outMsg.WriteInt( spawnIds[ i ] );
|
||||
networkSystem->ServerSendReliableMessage( clientNum, outMsg );
|
||||
}
|
||||
|
||||
|
@ -407,7 +407,7 @@ void idGameLocal::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_EVENT );
|
||||
outMsg.WriteBits( event->spawnId, 32 );
|
||||
outMsg.WriteByte( event->event );
|
||||
outMsg.WriteLong( event->time );
|
||||
outMsg.WriteInt( event->time );
|
||||
outMsg.WriteBits( event->paramsSize, idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
if ( event->paramsSize ) {
|
||||
outMsg.WriteData( event->paramsBuf, event->paramsSize );
|
||||
|
@ -421,7 +421,7 @@ void idGameLocal::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_PORTALSTATES );
|
||||
outMsg.WriteLong( numPortals );
|
||||
outMsg.WriteInt( numPortals );
|
||||
for ( i = 0; i < numPortals; i++ ) {
|
||||
outMsg.WriteBits( gameRenderWorld->GetPortalState( (qhandle_t) (i+1) ) , NUM_RENDER_PORTAL_BITS );
|
||||
}
|
||||
|
@ -606,7 +606,7 @@ void idGameLocal::ServerWriteSnapshot( int clientNum, int sequence, idBitMsg &ms
|
|||
#if ASYNC_WRITE_TAGS
|
||||
idRandom tagRandom;
|
||||
tagRandom.SetSeed( random.RandomInt() );
|
||||
msg.WriteLong( tagRandom.GetSeed() );
|
||||
msg.WriteInt( tagRandom.GetSeed() );
|
||||
#endif
|
||||
|
||||
// create the snapshot
|
||||
|
@ -657,7 +657,7 @@ void idGameLocal::ServerWriteSnapshot( int clientNum, int sequence, idBitMsg &ms
|
|||
snapshot->firstEntityState = newBase;
|
||||
|
||||
#if ASYNC_WRITE_TAGS
|
||||
msg.WriteLong( tagRandom.RandomInt() );
|
||||
msg.WriteInt( tagRandom.RandomInt() );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -668,9 +668,9 @@ void idGameLocal::ServerWriteSnapshot( int clientNum, int sequence, idBitMsg &ms
|
|||
#if ASYNC_WRITE_PVS
|
||||
for ( i = 0; i < idEntity::MAX_PVS_AREAS; i++ ) {
|
||||
if ( i < numSourceAreas ) {
|
||||
msg.WriteLong( sourceAreas[ i ] );
|
||||
msg.WriteInt( sourceAreas[ i ] );
|
||||
} else {
|
||||
msg.WriteLong( 0 );
|
||||
msg.WriteInt( 0 );
|
||||
}
|
||||
}
|
||||
gameLocal.pvs.WritePVS( pvsHandle, msg );
|
||||
|
|
|
@ -1055,14 +1055,14 @@ void idLight::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
WriteBindToSnapshot( msg );
|
||||
|
||||
msg.WriteByte( currentLevel );
|
||||
msg.WriteLong( PackColor( baseColor ) );
|
||||
msg.WriteInt( PackColor( baseColor ) );
|
||||
// msg.WriteBits( lightParent.GetEntityNum(), GENTITYNUM_BITS );
|
||||
|
||||
/* // only helps prediction
|
||||
msg.WriteLong( PackColor( fadeFrom ) );
|
||||
msg.WriteLong( PackColor( fadeTo ) );
|
||||
msg.WriteLong( fadeStart );
|
||||
msg.WriteLong( fadeEnd );
|
||||
msg.WriteInt( PackColor( fadeFrom ) );
|
||||
msg.WriteInt( PackColor( fadeTo ) );
|
||||
msg.WriteInt( fadeStart );
|
||||
msg.WriteInt( fadeEnd );
|
||||
*/
|
||||
|
||||
// FIXME: send renderLight.shader
|
||||
|
@ -1070,13 +1070,13 @@ void idLight::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
msg.WriteFloat( renderLight.lightRadius[1], 5, 10 );
|
||||
msg.WriteFloat( renderLight.lightRadius[2], 5, 10 );
|
||||
|
||||
msg.WriteLong( PackColor( idVec4( renderLight.shaderParms[SHADERPARM_RED],
|
||||
msg.WriteInt( PackColor( idVec4( renderLight.shaderParms[SHADERPARM_RED],
|
||||
renderLight.shaderParms[SHADERPARM_GREEN],
|
||||
renderLight.shaderParms[SHADERPARM_BLUE],
|
||||
renderLight.shaderParms[SHADERPARM_ALPHA] ) ) );
|
||||
|
||||
msg.WriteFloat( renderLight.shaderParms[SHADERPARM_TIMESCALE], 5, 10 );
|
||||
msg.WriteLong( renderLight.shaderParms[SHADERPARM_TIMEOFFSET] );
|
||||
msg.WriteInt( renderLight.shaderParms[SHADERPARM_TIMEOFFSET] );
|
||||
//msg.WriteByte( renderLight.shaderParms[SHADERPARM_DIVERSITY] );
|
||||
msg.WriteShort( renderLight.shaderParms[SHADERPARM_MODE] );
|
||||
|
||||
|
|
|
@ -1157,7 +1157,7 @@ void idExplodingBarrel::Killed( idEntity *inflictor, idEntity *attacker, int dam
|
|||
byte msgBuf[MAX_EVENT_PARAM_SIZE];
|
||||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( gameLocal.time );
|
||||
msg.WriteInt( gameLocal.time );
|
||||
ServerSendEvent( EVENT_EXPLODE, &msg, false, -1 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1500,7 +1500,7 @@ void idMultiplayerGame::NewState( gameState_t news, idPlayer *player ) {
|
|||
|
||||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_WARMUPTIME );
|
||||
outMsg.WriteLong( warmupEndTime );
|
||||
outMsg.WriteInt( warmupEndTime );
|
||||
networkSystem->ServerSendReliableMessage( -1, outMsg );
|
||||
|
||||
break;
|
||||
|
@ -2789,7 +2789,7 @@ void idMultiplayerGame::PlayGlobalSound( int to, snd_evt_t evt, const char *shad
|
|||
return;
|
||||
}
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SOUND_INDEX );
|
||||
outMsg.WriteLong( gameLocal.ServerRemapDecl( to, DECL_SOUND, shaderDecl->Index() ) );
|
||||
outMsg.WriteInt( gameLocal.ServerRemapDecl( to, DECL_SOUND, shaderDecl->Index() ) );
|
||||
} else {
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SOUND_EVENT );
|
||||
outMsg.WriteByte( evt );
|
||||
|
@ -4018,7 +4018,7 @@ void idMultiplayerGame::VoiceChat( const idCmdArgs &args, bool team ) {
|
|||
|
||||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_VCHAT );
|
||||
outMsg.WriteLong( index );
|
||||
outMsg.WriteInt( index );
|
||||
outMsg.WriteBits( team ? 1 : 0, 1 );
|
||||
networkSystem->ClientSendReliableMessage( outMsg );
|
||||
}
|
||||
|
@ -4083,7 +4083,7 @@ void idMultiplayerGame::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_STARTSTATE );
|
||||
// send the game state and start time
|
||||
outMsg.WriteByte( gameState );
|
||||
outMsg.WriteLong( matchStartedTime );
|
||||
outMsg.WriteInt( matchStartedTime );
|
||||
outMsg.WriteShort( startFragLimit );
|
||||
// send the powerup states and the spectate states
|
||||
for( i = 0; i < gameLocal.numClients; i++ ) {
|
||||
|
@ -4107,7 +4107,7 @@ void idMultiplayerGame::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
if ( gameState == COUNTDOWN ) {
|
||||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_WARMUPTIME );
|
||||
outMsg.WriteLong( warmupEndTime );
|
||||
outMsg.WriteInt( warmupEndTime );
|
||||
networkSystem->ServerSendReliableMessage( clientNum, outMsg );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9701,10 +9701,10 @@ void idPlayer::WritePlayerStateToSnapshot( idBitMsgDelta &msg ) const {
|
|||
int i;
|
||||
|
||||
msg.WriteByte( bobCycle );
|
||||
msg.WriteLong( stepUpTime );
|
||||
msg.WriteInt( stepUpTime );
|
||||
msg.WriteFloat( stepUpDelta );
|
||||
#ifdef _D3XP
|
||||
msg.WriteLong( inventory.weapons );
|
||||
msg.WriteInt( inventory.weapons );
|
||||
#else
|
||||
msg.WriteShort( inventory.weapons );
|
||||
#endif
|
||||
|
|
|
@ -718,7 +718,7 @@ void idProjectile::AddDefaultDamageEffect( const trace_t &collision, const idVec
|
|||
msg.WriteFloat( collision.c.point[1] );
|
||||
msg.WriteFloat( collision.c.point[2] );
|
||||
msg.WriteDir( collision.c.normal, 24 );
|
||||
msg.WriteLong( ( collision.c.material != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) : -1 );
|
||||
msg.WriteInt( ( collision.c.material != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) : -1 );
|
||||
msg.WriteFloat( velocity[0], 5, 10 );
|
||||
msg.WriteFloat( velocity[1], 5, 10 );
|
||||
msg.WriteFloat( velocity[2], 5, 10 );
|
||||
|
|
|
@ -3154,7 +3154,7 @@ void idWeapon::Event_SetSkin( const char *skinname ) {
|
|||
byte msgBuf[MAX_EVENT_PARAM_SIZE];
|
||||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( ( skinDecl != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_SKIN, skinDecl->Index() ) : -1 );
|
||||
msg.WriteInt( ( skinDecl != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_SKIN, skinDecl->Index() ) : -1 );
|
||||
ServerSendEvent( EVENT_CHANGESKIN, &msg, false, -1 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7925,7 +7925,7 @@ void idPhysics_AF::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
int i;
|
||||
idCQuat quat;
|
||||
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteFloat( current.noMoveTime );
|
||||
msg.WriteFloat( current.activateTime );
|
||||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[0], AF_VELOCITY_EXPONENT_BITS, AF_VELOCITY_MANTISSA_BITS );
|
||||
|
|
|
@ -780,7 +780,7 @@ void idPhysics_Monster::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[0], MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[1], MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[2], MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteBits( current.onGround, 1 );
|
||||
}
|
||||
|
||||
|
|
|
@ -1031,8 +1031,8 @@ idPhysics_Parametric::WriteToSnapshot
|
|||
================
|
||||
*/
|
||||
void idPhysics_Parametric::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
||||
msg.WriteLong( current.time );
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.time );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteFloat( current.origin[0] );
|
||||
msg.WriteFloat( current.origin[1] );
|
||||
msg.WriteFloat( current.origin[2] );
|
||||
|
|
|
@ -1466,7 +1466,7 @@ void idPhysics_RigidBody::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
quat = current.i.orientation.ToCQuat();
|
||||
localQuat = current.localAxis.ToCQuat();
|
||||
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteFloat( current.i.position[0] );
|
||||
msg.WriteFloat( current.i.position[1] );
|
||||
msg.WriteFloat( current.i.position[2] );
|
||||
|
|
|
@ -308,7 +308,7 @@ void idAsyncClient::GetServerInfo( const netadr_t adr ) {
|
|||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
msg.WriteString( "getInfo" );
|
||||
msg.WriteLong( serverList.GetChallenge() ); // challenge
|
||||
msg.WriteInt( serverList.GetChallenge() ); // challenge
|
||||
|
||||
clientPort.SendPacket( adr, msg.GetData(), msg.GetSize() );
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ void idAsyncClient::GetLANServers( void ) {
|
|||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
msg.WriteString( "getInfo" );
|
||||
msg.WriteLong( serverList.GetChallenge() );
|
||||
msg.WriteInt( serverList.GetChallenge() );
|
||||
|
||||
broadcastAddress.type = NA_BROADCAST;
|
||||
for ( i = 0; i < MAX_SERVER_PORTS; i++ ) {
|
||||
|
@ -395,7 +395,7 @@ void idAsyncClient::GetNETServers( void ) {
|
|||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
msg.WriteString( "getServers" );
|
||||
msg.WriteLong( ASYNC_PROTOCOL_VERSION );
|
||||
msg.WriteInt( ASYNC_PROTOCOL_VERSION );
|
||||
msg.WriteString( cvarSystem->GetCVarString( "fs_game" ) );
|
||||
msg.WriteBits( cvarSystem->GetCVarInteger( "gui_filter_password" ), 2 );
|
||||
msg.WriteBits( cvarSystem->GetCVarInteger( "gui_filter_players" ), 2 );
|
||||
|
@ -623,9 +623,9 @@ void idAsyncClient::SendEmptyToServer( bool force, bool mapLoad ) {
|
|||
}
|
||||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( serverMessageSequence );
|
||||
msg.WriteLong( mapLoad ? GAME_INIT_ID_MAP_LOAD : gameInitId );
|
||||
msg.WriteLong( snapshotSequence );
|
||||
msg.WriteInt( serverMessageSequence );
|
||||
msg.WriteInt( mapLoad ? GAME_INIT_ID_MAP_LOAD : gameInitId );
|
||||
msg.WriteInt( snapshotSequence );
|
||||
msg.WriteByte( CLIENT_UNRELIABLE_MESSAGE_EMPTY );
|
||||
|
||||
channel.SendMessage( clientPort, clientTime, msg );
|
||||
|
@ -651,11 +651,11 @@ void idAsyncClient::SendPingResponseToServer( int time ) {
|
|||
}
|
||||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( serverMessageSequence );
|
||||
msg.WriteLong( gameInitId );
|
||||
msg.WriteLong( snapshotSequence );
|
||||
msg.WriteInt( serverMessageSequence );
|
||||
msg.WriteInt( gameInitId );
|
||||
msg.WriteInt( snapshotSequence );
|
||||
msg.WriteByte( CLIENT_UNRELIABLE_MESSAGE_PINGRESPONSE );
|
||||
msg.WriteLong( time );
|
||||
msg.WriteInt( time );
|
||||
|
||||
channel.SendMessage( clientPort, clientTime, msg );
|
||||
while( channel.UnsentFragmentsLeft() ) {
|
||||
|
@ -686,16 +686,16 @@ void idAsyncClient::SendUsercmdsToServer( void ) {
|
|||
|
||||
// send the user commands to the server
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( serverMessageSequence );
|
||||
msg.WriteLong( gameInitId );
|
||||
msg.WriteLong( snapshotSequence );
|
||||
msg.WriteInt( serverMessageSequence );
|
||||
msg.WriteInt( gameInitId );
|
||||
msg.WriteInt( snapshotSequence );
|
||||
msg.WriteByte( CLIENT_UNRELIABLE_MESSAGE_USERCMD );
|
||||
msg.WriteShort( clientPrediction );
|
||||
|
||||
numUsercmds = idMath::ClampInt( 0, 10, idAsyncNetwork::clientUsercmdBackup.GetInteger() ) + 1;
|
||||
|
||||
// write the user commands
|
||||
msg.WriteLong( gameFrame );
|
||||
msg.WriteInt( gameFrame );
|
||||
msg.WriteByte( numUsercmds );
|
||||
for ( last = NULL, i = gameFrame - numUsercmds + 1; i <= gameFrame; i++ ) {
|
||||
index = i & ( MAX_USERCMD_BACKUP - 1 );
|
||||
|
@ -910,14 +910,14 @@ void idAsyncClient::ProcessReliableMessagePure( const idBitMsg &msg ) {
|
|||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteByte( CLIENT_RELIABLE_MESSAGE_PURE );
|
||||
|
||||
outMsg.WriteLong( gameInitId );
|
||||
outMsg.WriteInt( gameInitId );
|
||||
|
||||
i = 0;
|
||||
while ( inChecksums[ i ] ) {
|
||||
outMsg.WriteLong( inChecksums[ i++ ] );
|
||||
outMsg.WriteInt( inChecksums[ i++ ] );
|
||||
}
|
||||
outMsg.WriteLong( 0 );
|
||||
outMsg.WriteLong( gamePakChecksum );
|
||||
outMsg.WriteInt( 0 );
|
||||
outMsg.WriteInt( gamePakChecksum );
|
||||
|
||||
if ( !channel.SendReliableMessage( outMsg ) ) {
|
||||
common->Error( "client->server reliable messages overflow\n" );
|
||||
|
@ -1456,18 +1456,18 @@ bool idAsyncClient::ValidatePureServerChecksums( const netadr_t from, const idBi
|
|||
dlmsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
dlmsg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
dlmsg.WriteString( "downloadRequest" );
|
||||
dlmsg.WriteLong( serverChallenge );
|
||||
dlmsg.WriteInt( serverChallenge );
|
||||
dlmsg.WriteShort( clientId );
|
||||
// used to make sure the server replies to the same download request
|
||||
dlmsg.WriteLong( dlRequest );
|
||||
dlmsg.WriteInt( dlRequest );
|
||||
// special case the code pak - if we have a 0 checksum then we don't need to download it
|
||||
dlmsg.WriteLong( missingGamePakChecksum );
|
||||
dlmsg.WriteInt( missingGamePakChecksum );
|
||||
// 0-terminated list of missing paks
|
||||
i = 0;
|
||||
while ( missingChecksums[ i ] ) {
|
||||
dlmsg.WriteLong( missingChecksums[ i++ ] );
|
||||
dlmsg.WriteInt( missingChecksums[ i++ ] );
|
||||
}
|
||||
dlmsg.WriteLong( 0 );
|
||||
dlmsg.WriteInt( 0 );
|
||||
clientPort.SendPacket( from, dlmsg.GetData(), dlmsg.GetSize() );
|
||||
}
|
||||
|
||||
|
@ -1509,14 +1509,14 @@ void idAsyncClient::ProcessPureMessage( const netadr_t from, const idBitMsg &msg
|
|||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
outMsg.WriteString( "pureClient" );
|
||||
outMsg.WriteLong( serverChallenge );
|
||||
outMsg.WriteInt( serverChallenge );
|
||||
outMsg.WriteShort( clientId );
|
||||
i = 0;
|
||||
while ( inChecksums[ i ] ) {
|
||||
outMsg.WriteLong( inChecksums[ i++ ] );
|
||||
outMsg.WriteInt( inChecksums[ i++ ] );
|
||||
}
|
||||
outMsg.WriteLong( 0 );
|
||||
outMsg.WriteLong( gamePakChecksum );
|
||||
outMsg.WriteInt( 0 );
|
||||
outMsg.WriteInt( gamePakChecksum );
|
||||
clientPort.SendPacket( from, outMsg.GetData(), outMsg.GetSize() );
|
||||
}
|
||||
|
||||
|
@ -1665,24 +1665,24 @@ void idAsyncClient::SetupConnection( void ) {
|
|||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
msg.WriteString( "challenge" );
|
||||
msg.WriteLong( clientId );
|
||||
msg.WriteInt( clientId );
|
||||
clientPort.SendPacket( serverAddress, msg.GetData(), msg.GetSize() );
|
||||
} else if ( clientState == CS_CONNECTING ) {
|
||||
common->Printf( "sending connect to %s with challenge 0x%x\n", Sys_NetAdrToString( serverAddress ), serverChallenge );
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
msg.WriteString( "connect" );
|
||||
msg.WriteLong( ASYNC_PROTOCOL_VERSION );
|
||||
msg.WriteInt( ASYNC_PROTOCOL_VERSION );
|
||||
#if ID_FAKE_PURE
|
||||
// fake win32 OS - might need to adapt depending on the case
|
||||
msg.WriteShort( 0 );
|
||||
#else
|
||||
msg.WriteShort( BUILD_OS_ID );
|
||||
#endif
|
||||
msg.WriteLong( clientDataChecksum );
|
||||
msg.WriteLong( serverChallenge );
|
||||
msg.WriteInt( clientDataChecksum );
|
||||
msg.WriteInt( serverChallenge );
|
||||
msg.WriteShort( clientId );
|
||||
msg.WriteLong( cvarSystem->GetCVarInteger( "net_clientMaxRate" ) );
|
||||
msg.WriteInt( cvarSystem->GetCVarInteger( "net_clientMaxRate" ) );
|
||||
msg.WriteString( cvarSystem->GetCVarString( "com_guid" ) );
|
||||
msg.WriteString( cvarSystem->GetCVarString( "password" ), -1, false );
|
||||
// do not make the protocol depend on PB
|
||||
|
@ -1697,7 +1697,7 @@ void idAsyncClient::SetupConnection( void ) {
|
|||
msg.BeginWriting();
|
||||
msg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
msg.WriteString( "clAuth" );
|
||||
msg.WriteLong( ASYNC_PROTOCOL_VERSION );
|
||||
msg.WriteInt( ASYNC_PROTOCOL_VERSION );
|
||||
msg.WriteNetadr( serverAddress );
|
||||
// if we don't have a com_guid, this will request a direct reply from auth with it
|
||||
msg.WriteByte( cvarSystem->GetCVarString( "com_guid" )[0] ? 1 : 0 );
|
||||
|
@ -1924,7 +1924,7 @@ void idAsyncClient::SendVersionCheck( bool fromMenu ) {
|
|||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
msg.WriteString( "versionCheck" );
|
||||
msg.WriteLong( ASYNC_PROTOCOL_VERSION );
|
||||
msg.WriteInt( ASYNC_PROTOCOL_VERSION );
|
||||
msg.WriteShort( BUILD_OS_ID );
|
||||
msg.WriteString( cvarSystem->GetCVarString( "si_version" ) );
|
||||
msg.WriteString( cvarSystem->GetCVarString( "com_guid" ) );
|
||||
|
@ -1953,7 +1953,7 @@ void idAsyncClient::SendVersionDLUpdate( int state ) {
|
|||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
msg.WriteString( "versionDL" );
|
||||
msg.WriteLong( ASYNC_PROTOCOL_VERSION );
|
||||
msg.WriteInt( ASYNC_PROTOCOL_VERSION );
|
||||
msg.WriteShort( state );
|
||||
clientPort.SendPacket( idAsyncNetwork::GetMasterAddress(), msg.GetData(), msg.GetSize() );
|
||||
}
|
||||
|
@ -2163,7 +2163,7 @@ bool idAsyncClient::SendAuthCheck( const char *cdkey, const char *xpkey ) {
|
|||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
msg.WriteString( "gameAuth" );
|
||||
msg.WriteLong( ASYNC_PROTOCOL_VERSION );
|
||||
msg.WriteInt( ASYNC_PROTOCOL_VERSION );
|
||||
msg.WriteByte( cdkey ? 1 : 0 );
|
||||
msg.WriteString( cdkey ? cdkey : "" );
|
||||
msg.WriteByte( xpkey ? 1 : 0 );
|
||||
|
|
|
@ -205,7 +205,7 @@ void idAsyncNetwork::WriteUserCmdDelta( idBitMsg &msg, const usercmd_t &cmd, con
|
|||
return;
|
||||
}
|
||||
|
||||
msg.WriteLong( cmd.gameTime );
|
||||
msg.WriteInt( cmd.gameTime );
|
||||
msg.WriteByte( cmd.buttons );
|
||||
msg.WriteShort( cmd.mx );
|
||||
msg.WriteShort( cmd.my );
|
||||
|
|
|
@ -769,7 +769,7 @@ void idAsyncServer::DropClient( int clientNum, const char *reason ) {
|
|||
if ( client.clientState >= SCS_PUREWAIT && clientNum != localClientNum ) {
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteByte( SERVER_RELIABLE_MESSAGE_DISCONNECT );
|
||||
msg.WriteLong( clientNum );
|
||||
msg.WriteInt( clientNum );
|
||||
msg.WriteString( reason );
|
||||
for ( i = 0; i < MAX_ASYNC_CLIENTS; i++ ) {
|
||||
// clientNum so SCS_PUREWAIT client gets it's own disconnect msg
|
||||
|
@ -918,7 +918,7 @@ void idAsyncServer::SendUserInfoBroadcast( int userInfoNum, const idDict &info,
|
|||
}
|
||||
|
||||
#if ID_CLIENTINFO_TAGS
|
||||
msg.WriteLong( sessLocal.mapSpawnData.userInfo[userInfoNum].Checksum() );
|
||||
msg.WriteInt( sessLocal.mapSpawnData.userInfo[userInfoNum].Checksum() );
|
||||
common->DPrintf( "broadcast for client %d: 0x%x\n", userInfoNum, sessLocal.mapSpawnData.userInfo[userInfoNum].Checksum() );
|
||||
sessLocal.mapSpawnData.userInfo[userInfoNum].Print();
|
||||
#endif
|
||||
|
@ -976,7 +976,7 @@ void idAsyncServer::SendUserInfoToClient( int clientNum, int userInfoNum, const
|
|||
msg.WriteBits( 0, 1 );
|
||||
|
||||
#if ID_CLIENTINFO_TAGS
|
||||
msg.WriteLong( 0 );
|
||||
msg.WriteInt( 0 );
|
||||
common->DPrintf( "user info %d to client %d: NULL base\n", userInfoNum, clientNum );
|
||||
#endif
|
||||
|
||||
|
@ -1039,7 +1039,7 @@ void idAsyncServer::SendApplySnapshotToClient( int clientNum, int sequence ) {
|
|||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteByte( SERVER_RELIABLE_MESSAGE_APPLYSNAPSHOT );
|
||||
msg.WriteLong( sequence );
|
||||
msg.WriteInt( sequence );
|
||||
|
||||
SendReliableMessage( clientNum, msg );
|
||||
}
|
||||
|
@ -1068,7 +1068,7 @@ bool idAsyncServer::SendEmptyToClient( int clientNum, bool force ) {
|
|||
}
|
||||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( gameInitId );
|
||||
msg.WriteInt( gameInitId );
|
||||
msg.WriteByte( SERVER_UNRELIABLE_MESSAGE_EMPTY );
|
||||
|
||||
client.channel.SendMessage( serverPort, serverTime, msg );
|
||||
|
@ -1102,9 +1102,9 @@ bool idAsyncServer::SendPingToClient( int clientNum ) {
|
|||
}
|
||||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( gameInitId );
|
||||
msg.WriteInt( gameInitId );
|
||||
msg.WriteByte( SERVER_UNRELIABLE_MESSAGE_PING );
|
||||
msg.WriteLong( realTime );
|
||||
msg.WriteInt( realTime );
|
||||
|
||||
client.channel.SendMessage( serverPort, serverTime, msg );
|
||||
|
||||
|
@ -1134,10 +1134,10 @@ void idAsyncServer::SendGameInitToClient( int clientNum ) {
|
|||
}
|
||||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( gameInitId );
|
||||
msg.WriteInt( gameInitId );
|
||||
msg.WriteByte( SERVER_UNRELIABLE_MESSAGE_GAMEINIT );
|
||||
msg.WriteLong( gameFrame );
|
||||
msg.WriteLong( gameTime );
|
||||
msg.WriteInt( gameFrame );
|
||||
msg.WriteInt( gameTime );
|
||||
msg.WriteDeltaDict( sessLocal.mapSpawnData.serverInfo, NULL );
|
||||
client.gameInitSequence = client.channel.SendMessage( serverPort, serverTime, msg );
|
||||
}
|
||||
|
@ -1169,11 +1169,11 @@ bool idAsyncServer::SendSnapshotToClient( int clientNum ) {
|
|||
|
||||
// write the snapshot
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( gameInitId );
|
||||
msg.WriteInt( gameInitId );
|
||||
msg.WriteByte( SERVER_UNRELIABLE_MESSAGE_SNAPSHOT );
|
||||
msg.WriteLong( client.snapshotSequence );
|
||||
msg.WriteLong( gameFrame );
|
||||
msg.WriteLong( gameTime );
|
||||
msg.WriteInt( client.snapshotSequence );
|
||||
msg.WriteInt( gameFrame );
|
||||
msg.WriteInt( gameTime );
|
||||
msg.WriteByte( idMath::ClampChar( client.numDuplicatedUsercmds ) );
|
||||
msg.WriteShort( idMath::ClampShort( client.clientAheadTime ) );
|
||||
|
||||
|
@ -1523,7 +1523,7 @@ void idAsyncServer::ProcessChallengeMessage( const netadr_t from, const idBitMsg
|
|||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
outMsg.WriteString( "challengeResponse" );
|
||||
outMsg.WriteLong( challenges[i].challenge );
|
||||
outMsg.WriteInt( challenges[i].challenge );
|
||||
outMsg.WriteShort( serverId );
|
||||
outMsg.WriteString( cvarSystem->GetCVarString( "fs_game_base" ) );
|
||||
outMsg.WriteString( cvarSystem->GetCVarString( "fs_game" ) );
|
||||
|
@ -1542,9 +1542,9 @@ void idAsyncServer::ProcessChallengeMessage( const netadr_t from, const idBitMsg
|
|||
outMsg.BeginWriting();
|
||||
outMsg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
outMsg.WriteString( "srvAuth" );
|
||||
outMsg.WriteLong( ASYNC_PROTOCOL_VERSION );
|
||||
outMsg.WriteInt( ASYNC_PROTOCOL_VERSION );
|
||||
outMsg.WriteNetadr( from );
|
||||
outMsg.WriteLong( -1 ); // this identifies "challenge" auth vs "connect" auth
|
||||
outMsg.WriteInt( -1 ); // this identifies "challenge" auth vs "connect" auth
|
||||
// protocol 1.37 addition
|
||||
outMsg.WriteByte( fileSystem->RunningD3XP() );
|
||||
serverPort.SendPacket( idAsyncNetwork::GetMasterAddress(), outMsg.GetData(), outMsg.GetSize() );
|
||||
|
@ -1579,12 +1579,12 @@ bool idAsyncServer::SendPureServerMessage( const netadr_t to, int OS ) {
|
|||
|
||||
i = 0;
|
||||
while ( serverChecksums[ i ] ) {
|
||||
outMsg.WriteLong( serverChecksums[ i++ ] );
|
||||
outMsg.WriteInt( serverChecksums[ i++ ] );
|
||||
}
|
||||
outMsg.WriteLong( 0 );
|
||||
outMsg.WriteInt( 0 );
|
||||
|
||||
// write the pak checksum for game code
|
||||
outMsg.WriteLong( gamePakChecksum );
|
||||
outMsg.WriteInt( gamePakChecksum );
|
||||
|
||||
serverPort.SendPacket( to, outMsg.GetData(), outMsg.GetSize() );
|
||||
return true;
|
||||
|
@ -1614,14 +1614,14 @@ bool idAsyncServer::SendReliablePureToClient( int clientNum ) {
|
|||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteByte( SERVER_RELIABLE_MESSAGE_PURE );
|
||||
|
||||
msg.WriteLong( gameInitId );
|
||||
msg.WriteInt( gameInitId );
|
||||
|
||||
i = 0;
|
||||
while ( serverChecksums[ i ] ) {
|
||||
msg.WriteLong( serverChecksums[ i++ ] );
|
||||
msg.WriteInt( serverChecksums[ i++ ] );
|
||||
}
|
||||
msg.WriteLong( 0 );
|
||||
msg.WriteLong( gamePakChecksum );
|
||||
msg.WriteInt( 0 );
|
||||
msg.WriteInt( gamePakChecksum );
|
||||
|
||||
SendReliableMessage( clientNum, msg );
|
||||
|
||||
|
@ -1751,9 +1751,9 @@ void idAsyncServer::ProcessConnectMessage( const netadr_t from, const idBitMsg &
|
|||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
outMsg.WriteString( "srvAuth" );
|
||||
outMsg.WriteLong( ASYNC_PROTOCOL_VERSION );
|
||||
outMsg.WriteInt( ASYNC_PROTOCOL_VERSION );
|
||||
outMsg.WriteNetadr( from );
|
||||
outMsg.WriteLong( clientId );
|
||||
outMsg.WriteInt( clientId );
|
||||
outMsg.WriteString( guid );
|
||||
// protocol 1.37 addition
|
||||
outMsg.WriteByte( fileSystem->RunningD3XP() );
|
||||
|
@ -1785,8 +1785,8 @@ void idAsyncServer::ProcessConnectMessage( const netadr_t from, const idBitMsg &
|
|||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
outMsg.WriteString( "print" );
|
||||
outMsg.WriteLong( SERVER_PRINT_GAMEDENY );
|
||||
outMsg.WriteLong( reply );
|
||||
outMsg.WriteInt( SERVER_PRINT_GAMEDENY );
|
||||
outMsg.WriteInt( reply );
|
||||
outMsg.WriteString( reason );
|
||||
serverPort.SendPacket( from, outMsg.GetData(), outMsg.GetSize() );
|
||||
|
||||
|
@ -1860,10 +1860,10 @@ void idAsyncServer::ProcessConnectMessage( const netadr_t from, const idBitMsg &
|
|||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
outMsg.WriteString( "connectResponse" );
|
||||
outMsg.WriteLong( clientNum );
|
||||
outMsg.WriteLong( gameInitId );
|
||||
outMsg.WriteLong( gameFrame );
|
||||
outMsg.WriteLong( gameTime );
|
||||
outMsg.WriteInt( clientNum );
|
||||
outMsg.WriteInt( gameInitId );
|
||||
outMsg.WriteInt( gameFrame );
|
||||
outMsg.WriteInt( gameTime );
|
||||
outMsg.WriteDeltaDict( sessLocal.mapSpawnData.serverInfo, NULL );
|
||||
|
||||
serverPort.SendPacket( from, outMsg.GetData(), outMsg.GetSize() );
|
||||
|
@ -2075,8 +2075,8 @@ void idAsyncServer::ProcessGetInfoMessage( const netadr_t from, const idBitMsg &
|
|||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
outMsg.WriteString( "infoResponse" );
|
||||
outMsg.WriteLong( challenge );
|
||||
outMsg.WriteLong( ASYNC_PROTOCOL_VERSION );
|
||||
outMsg.WriteInt( challenge );
|
||||
outMsg.WriteInt( ASYNC_PROTOCOL_VERSION );
|
||||
outMsg.WriteDeltaDict( sessLocal.mapSpawnData.serverInfo, NULL );
|
||||
|
||||
for ( i = 0; i < MAX_ASYNC_CLIENTS; i++ ) {
|
||||
|
@ -2088,11 +2088,11 @@ void idAsyncServer::ProcessGetInfoMessage( const netadr_t from, const idBitMsg &
|
|||
|
||||
outMsg.WriteByte( i );
|
||||
outMsg.WriteShort( client.clientPing );
|
||||
outMsg.WriteLong( client.channel.GetMaxOutgoingRate() );
|
||||
outMsg.WriteInt( client.channel.GetMaxOutgoingRate() );
|
||||
outMsg.WriteString( sessLocal.mapSpawnData.userInfo[i].GetString( "ui_name", "Player" ) );
|
||||
}
|
||||
outMsg.WriteByte( MAX_ASYNC_CLIENTS );
|
||||
outMsg.WriteLong( fileSystem->GetOSMask() );
|
||||
outMsg.WriteInt( fileSystem->GetOSMask() );
|
||||
|
||||
serverPort.SendPacket( from, outMsg.GetData(), outMsg.GetSize() );
|
||||
}
|
||||
|
@ -2578,7 +2578,7 @@ void idAsyncServer::PrintOOB( const netadr_t to, int opcode, const char *string
|
|||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
outMsg.WriteString( "print" );
|
||||
outMsg.WriteLong( opcode );
|
||||
outMsg.WriteInt( opcode );
|
||||
outMsg.WriteString( string );
|
||||
serverPort.SendPacket( to, outMsg.GetData(), outMsg.GetSize() );
|
||||
}
|
||||
|
@ -2741,7 +2741,7 @@ void idAsyncServer::ProcessDownloadRequestMessage( const netadr_t from, const id
|
|||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteShort( CONNECTIONLESS_MESSAGE_ID );
|
||||
outMsg.WriteString( "downloadInfo" );
|
||||
outMsg.WriteLong( dlRequest );
|
||||
outMsg.WriteInt( dlRequest );
|
||||
if ( !game->DownloadRequest( Sys_NetAdrToString( from ), challenges[ iclient ].guid, paklist.c_str(), pakbuf ) ) {
|
||||
common->DPrintf( "game: no downloads\n" );
|
||||
outMsg.WriteByte( SERVER_DL_NONE );
|
||||
|
@ -2803,7 +2803,7 @@ void idAsyncServer::ProcessDownloadRequestMessage( const netadr_t from, const id
|
|||
tmpMsg.WriteByte( SERVER_PAK_YES );
|
||||
tmpMsg.WriteString( pakNames[ i ] );
|
||||
tmpMsg.WriteString( pakURLs[ i ] );
|
||||
tmpMsg.WriteLong( dlSize[ i ] );
|
||||
tmpMsg.WriteInt( dlSize[ i ] );
|
||||
}
|
||||
|
||||
// keep last 5 bytes for an 'end of message' - SERVER_PAK_END and the totalDlSize long
|
||||
|
|
|
@ -86,7 +86,7 @@ bool idMsgQueue::Add( const byte *data, const int size ) {
|
|||
}
|
||||
int sequence = last;
|
||||
WriteShort( size );
|
||||
WriteLong( sequence );
|
||||
WriteInt( sequence );
|
||||
WriteData( data, size );
|
||||
last++;
|
||||
return true;
|
||||
|
@ -193,10 +193,10 @@ int idMsgQueue::ReadShort( void ) {
|
|||
|
||||
/*
|
||||
===============
|
||||
idMsgQueue::WriteLong
|
||||
idMsgQueue::WriteInt
|
||||
===============
|
||||
*/
|
||||
void idMsgQueue::WriteLong( int l ) {
|
||||
void idMsgQueue::WriteInt( int l ) {
|
||||
WriteByte( ( l >> 0 ) & 255 );
|
||||
WriteByte( ( l >> 8 ) & 255 );
|
||||
WriteByte( ( l >> 16 ) & 255 );
|
||||
|
@ -338,7 +338,7 @@ void idMsgChannel::WriteMessageData( idBitMsg &out, const idBitMsg &msg ) {
|
|||
tmp.Init( tmpBuf, sizeof( tmpBuf ) );
|
||||
|
||||
// write acknowledgement of last received reliable message
|
||||
tmp.WriteLong( reliableReceive.GetLast() );
|
||||
tmp.WriteInt( reliableReceive.GetLast() );
|
||||
|
||||
// write reliable messages
|
||||
reliableSend.CopyToBuffer( tmp.GetData() + tmp.GetSize() );
|
||||
|
@ -428,7 +428,7 @@ void idMsgChannel::SendNextFragment( idPort &port, const int time ) {
|
|||
// write the packet
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteShort( id );
|
||||
msg.WriteLong( outgoingSequence | FRAGMENT_BIT );
|
||||
msg.WriteInt( outgoingSequence | FRAGMENT_BIT );
|
||||
|
||||
fragLength = FRAGMENT_SIZE;
|
||||
if ( unsentFragmentStart + fragLength > unsentMsg.GetSize() ) {
|
||||
|
@ -507,7 +507,7 @@ int idMsgChannel::SendMessage( idPort &port, const int time, const idBitMsg &msg
|
|||
|
||||
// write the header
|
||||
unsentMsg.WriteShort( id );
|
||||
unsentMsg.WriteLong( outgoingSequence );
|
||||
unsentMsg.WriteInt( outgoingSequence );
|
||||
|
||||
// write out the message data
|
||||
WriteMessageData( unsentMsg, msg );
|
||||
|
|
|
@ -81,7 +81,7 @@ private:
|
|||
byte ReadByte( void );
|
||||
void WriteShort( int s );
|
||||
int ReadShort( void );
|
||||
void WriteLong( int l );
|
||||
void WriteInt( int l );
|
||||
int ReadLong( void );
|
||||
void WriteData( const byte *data, const int size );
|
||||
void ReadData( byte *data, const int size );
|
||||
|
|
|
@ -1597,7 +1597,7 @@ bool idEntity::StartSoundShader( const idSoundShader *shader, const s_channelTyp
|
|||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.BeginWriting();
|
||||
msg.WriteLong( gameLocal.ServerRemapDecl( -1, DECL_SOUND, shader->Index() ) );
|
||||
msg.WriteInt( gameLocal.ServerRemapDecl( -1, DECL_SOUND, shader->Index() ) );
|
||||
msg.WriteByte( channel );
|
||||
ServerSendEvent( EVENT_STARTSOUNDSHADER, &msg, false, -1 );
|
||||
}
|
||||
|
@ -4660,7 +4660,7 @@ void idEntity::WriteColorToSnapshot( idBitMsgDelta &msg ) const {
|
|||
color[1] = renderEntity.shaderParms[ SHADERPARM_GREEN ];
|
||||
color[2] = renderEntity.shaderParms[ SHADERPARM_BLUE ];
|
||||
color[3] = renderEntity.shaderParms[ SHADERPARM_ALPHA ];
|
||||
msg.WriteLong( PackColor( color ) );
|
||||
msg.WriteInt( PackColor( color ) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -4751,7 +4751,7 @@ void idEntity::ServerSendEvent( int eventId, const idBitMsg *msg, bool saveEvent
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_EVENT );
|
||||
outMsg.WriteBits( gameLocal.GetSpawnId( this ), 32 );
|
||||
outMsg.WriteByte( eventId );
|
||||
outMsg.WriteLong( gameLocal.time );
|
||||
outMsg.WriteInt( gameLocal.time );
|
||||
if ( msg ) {
|
||||
outMsg.WriteBits( msg->GetSize(), idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
outMsg.WriteData( msg->GetData(), msg->GetSize() );
|
||||
|
@ -4793,7 +4793,7 @@ void idEntity::ClientSendEvent( int eventId, const idBitMsg *msg ) const {
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_EVENT );
|
||||
outMsg.WriteBits( gameLocal.GetSpawnId( this ), 32 );
|
||||
outMsg.WriteByte( eventId );
|
||||
outMsg.WriteLong( gameLocal.time );
|
||||
outMsg.WriteInt( gameLocal.time );
|
||||
if ( msg ) {
|
||||
outMsg.WriteBits( msg->GetSize(), idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
outMsg.WriteData( msg->GetData(), msg->GetSize() );
|
||||
|
@ -5140,8 +5140,8 @@ void idAnimatedEntity::AddDamageEffect( const trace_t &collision, const idVec3 &
|
|||
msg.WriteFloat( localOrigin[2] );
|
||||
msg.WriteDir( localNormal, 24 );
|
||||
msg.WriteDir( localDir, 24 );
|
||||
msg.WriteLong( gameLocal.ServerRemapDecl( -1, DECL_ENTITYDEF, def->Index() ) );
|
||||
msg.WriteLong( gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) );
|
||||
msg.WriteInt( gameLocal.ServerRemapDecl( -1, DECL_ENTITYDEF, def->Index() ) );
|
||||
msg.WriteInt( gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) );
|
||||
ServerSendEvent( EVENT_ADD_DAMAGE_EFFECT, &msg, false, -1 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -724,8 +724,8 @@ idEntityFx::WriteToSnapshot
|
|||
void idEntityFx::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
||||
GetPhysics()->WriteToSnapshot( msg );
|
||||
WriteBindToSnapshot( msg );
|
||||
msg.WriteLong( ( fxEffect != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_FX, fxEffect->Index() ) : -1 );
|
||||
msg.WriteLong( started );
|
||||
msg.WriteInt( ( fxEffect != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_FX, fxEffect->Index() ) : -1 );
|
||||
msg.WriteInt( started );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -4074,7 +4074,7 @@ void idGameLocal::SetPortalState( qhandle_t portal, int blockingBits ) {
|
|||
if ( !gameLocal.isClient ) {
|
||||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_PORTAL );
|
||||
outMsg.WriteLong( portal );
|
||||
outMsg.WriteInt( portal );
|
||||
outMsg.WriteBits( blockingBits, NUM_RENDER_PORTAL_BITS );
|
||||
networkSystem->ServerSendReliableMessage( -1, outMsg );
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ void idGameLocal::ServerSendDeclRemapToClient( int clientNum, declType_t type, i
|
|||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_REMAP_DECL );
|
||||
outMsg.WriteByte( type );
|
||||
outMsg.WriteLong( index );
|
||||
outMsg.WriteInt( index );
|
||||
outMsg.WriteString( decl->GetName() );
|
||||
networkSystem->ServerSendReliableMessage( clientNum, outMsg );
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ void idGameLocal::ServerClientBegin( int clientNum ) {
|
|||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SPAWN_PLAYER );
|
||||
outMsg.WriteByte( clientNum );
|
||||
outMsg.WriteLong( spawnIds[ clientNum ] );
|
||||
outMsg.WriteInt( spawnIds[ clientNum ] );
|
||||
networkSystem->ServerSendReliableMessage( -1, outMsg );
|
||||
}
|
||||
|
||||
|
@ -396,7 +396,7 @@ void idGameLocal::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.BeginWriting( );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SPAWN_PLAYER );
|
||||
outMsg.WriteByte( i );
|
||||
outMsg.WriteLong( spawnIds[ i ] );
|
||||
outMsg.WriteInt( spawnIds[ i ] );
|
||||
networkSystem->ServerSendReliableMessage( clientNum, outMsg );
|
||||
}
|
||||
|
||||
|
@ -407,7 +407,7 @@ void idGameLocal::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_EVENT );
|
||||
outMsg.WriteBits( event->spawnId, 32 );
|
||||
outMsg.WriteByte( event->event );
|
||||
outMsg.WriteLong( event->time );
|
||||
outMsg.WriteInt( event->time );
|
||||
outMsg.WriteBits( event->paramsSize, idMath::BitsForInteger( MAX_EVENT_PARAM_SIZE ) );
|
||||
if ( event->paramsSize ) {
|
||||
outMsg.WriteData( event->paramsBuf, event->paramsSize );
|
||||
|
@ -421,7 +421,7 @@ void idGameLocal::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_PORTALSTATES );
|
||||
outMsg.WriteLong( numPortals );
|
||||
outMsg.WriteInt( numPortals );
|
||||
for ( i = 0; i < numPortals; i++ ) {
|
||||
outMsg.WriteBits( gameRenderWorld->GetPortalState( (qhandle_t) (i+1) ) , NUM_RENDER_PORTAL_BITS );
|
||||
}
|
||||
|
@ -592,7 +592,7 @@ void idGameLocal::ServerWriteSnapshot( int clientNum, int sequence, idBitMsg &ms
|
|||
#if ASYNC_WRITE_TAGS
|
||||
idRandom tagRandom;
|
||||
tagRandom.SetSeed( random.RandomInt() );
|
||||
msg.WriteLong( tagRandom.GetSeed() );
|
||||
msg.WriteInt( tagRandom.GetSeed() );
|
||||
#endif
|
||||
|
||||
// create the snapshot
|
||||
|
@ -643,7 +643,7 @@ void idGameLocal::ServerWriteSnapshot( int clientNum, int sequence, idBitMsg &ms
|
|||
snapshot->firstEntityState = newBase;
|
||||
|
||||
#if ASYNC_WRITE_TAGS
|
||||
msg.WriteLong( tagRandom.RandomInt() );
|
||||
msg.WriteInt( tagRandom.RandomInt() );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -654,9 +654,9 @@ void idGameLocal::ServerWriteSnapshot( int clientNum, int sequence, idBitMsg &ms
|
|||
#if ASYNC_WRITE_PVS
|
||||
for ( i = 0; i < idEntity::MAX_PVS_AREAS; i++ ) {
|
||||
if ( i < numSourceAreas ) {
|
||||
msg.WriteLong( sourceAreas[ i ] );
|
||||
msg.WriteInt( sourceAreas[ i ] );
|
||||
} else {
|
||||
msg.WriteLong( 0 );
|
||||
msg.WriteInt( 0 );
|
||||
}
|
||||
}
|
||||
gameLocal.pvs.WritePVS( pvsHandle, msg );
|
||||
|
|
|
@ -1048,14 +1048,14 @@ void idLight::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
WriteBindToSnapshot( msg );
|
||||
|
||||
msg.WriteByte( currentLevel );
|
||||
msg.WriteLong( PackColor( baseColor ) );
|
||||
msg.WriteInt( PackColor( baseColor ) );
|
||||
// msg.WriteBits( lightParent.GetEntityNum(), GENTITYNUM_BITS );
|
||||
|
||||
/* // only helps prediction
|
||||
msg.WriteLong( PackColor( fadeFrom ) );
|
||||
msg.WriteLong( PackColor( fadeTo ) );
|
||||
msg.WriteLong( fadeStart );
|
||||
msg.WriteLong( fadeEnd );
|
||||
msg.WriteInt( PackColor( fadeFrom ) );
|
||||
msg.WriteInt( PackColor( fadeTo ) );
|
||||
msg.WriteInt( fadeStart );
|
||||
msg.WriteInt( fadeEnd );
|
||||
*/
|
||||
|
||||
// FIXME: send renderLight.shader
|
||||
|
@ -1063,13 +1063,13 @@ void idLight::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
msg.WriteFloat( renderLight.lightRadius[1], 5, 10 );
|
||||
msg.WriteFloat( renderLight.lightRadius[2], 5, 10 );
|
||||
|
||||
msg.WriteLong( PackColor( idVec4( renderLight.shaderParms[SHADERPARM_RED],
|
||||
msg.WriteInt( PackColor( idVec4( renderLight.shaderParms[SHADERPARM_RED],
|
||||
renderLight.shaderParms[SHADERPARM_GREEN],
|
||||
renderLight.shaderParms[SHADERPARM_BLUE],
|
||||
renderLight.shaderParms[SHADERPARM_ALPHA] ) ) );
|
||||
|
||||
msg.WriteFloat( renderLight.shaderParms[SHADERPARM_TIMESCALE], 5, 10 );
|
||||
msg.WriteLong( renderLight.shaderParms[SHADERPARM_TIMEOFFSET] );
|
||||
msg.WriteInt( renderLight.shaderParms[SHADERPARM_TIMEOFFSET] );
|
||||
//msg.WriteByte( renderLight.shaderParms[SHADERPARM_DIVERSITY] );
|
||||
msg.WriteShort( renderLight.shaderParms[SHADERPARM_MODE] );
|
||||
|
||||
|
|
|
@ -993,7 +993,7 @@ void idExplodingBarrel::Killed( idEntity *inflictor, idEntity *attacker, int dam
|
|||
byte msgBuf[MAX_EVENT_PARAM_SIZE];
|
||||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( gameLocal.time );
|
||||
msg.WriteInt( gameLocal.time );
|
||||
ServerSendEvent( EVENT_EXPLODE, &msg, false, -1 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1057,7 +1057,7 @@ void idMultiplayerGame::NewState( gameState_t news, idPlayer *player ) {
|
|||
|
||||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_WARMUPTIME );
|
||||
outMsg.WriteLong( warmupEndTime );
|
||||
outMsg.WriteInt( warmupEndTime );
|
||||
networkSystem->ServerSendReliableMessage( -1, outMsg );
|
||||
|
||||
break;
|
||||
|
@ -2183,7 +2183,7 @@ void idMultiplayerGame::PlayGlobalSound( int to, snd_evt_t evt, const char *shad
|
|||
return;
|
||||
}
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SOUND_INDEX );
|
||||
outMsg.WriteLong( gameLocal.ServerRemapDecl( to, DECL_SOUND, shaderDecl->Index() ) );
|
||||
outMsg.WriteInt( gameLocal.ServerRemapDecl( to, DECL_SOUND, shaderDecl->Index() ) );
|
||||
} else {
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_SOUND_EVENT );
|
||||
outMsg.WriteByte( evt );
|
||||
|
@ -3284,7 +3284,7 @@ void idMultiplayerGame::VoiceChat( const idCmdArgs &args, bool team ) {
|
|||
|
||||
outMsg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_VCHAT );
|
||||
outMsg.WriteLong( index );
|
||||
outMsg.WriteInt( index );
|
||||
outMsg.WriteBits( team ? 1 : 0, 1 );
|
||||
networkSystem->ClientSendReliableMessage( outMsg );
|
||||
}
|
||||
|
@ -3349,7 +3349,7 @@ void idMultiplayerGame::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_STARTSTATE );
|
||||
// send the game state and start time
|
||||
outMsg.WriteByte( gameState );
|
||||
outMsg.WriteLong( matchStartedTime );
|
||||
outMsg.WriteInt( matchStartedTime );
|
||||
outMsg.WriteShort( startFragLimit );
|
||||
// send the powerup states and the spectate states
|
||||
for( i = 0; i < gameLocal.numClients; i++ ) {
|
||||
|
@ -3373,7 +3373,7 @@ void idMultiplayerGame::ServerWriteInitialReliableMessages( int clientNum ) {
|
|||
if ( gameState == COUNTDOWN ) {
|
||||
outMsg.BeginWriting();
|
||||
outMsg.WriteByte( GAME_RELIABLE_MESSAGE_WARMUPTIME );
|
||||
outMsg.WriteLong( warmupEndTime );
|
||||
outMsg.WriteInt( warmupEndTime );
|
||||
networkSystem->ServerSendReliableMessage( clientNum, outMsg );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8165,7 +8165,7 @@ void idPlayer::WritePlayerStateToSnapshot( idBitMsgDelta &msg ) const {
|
|||
int i;
|
||||
|
||||
msg.WriteByte( bobCycle );
|
||||
msg.WriteLong( stepUpTime );
|
||||
msg.WriteInt( stepUpTime );
|
||||
msg.WriteFloat( stepUpDelta );
|
||||
msg.WriteShort( inventory.weapons );
|
||||
msg.WriteByte( inventory.armor );
|
||||
|
|
|
@ -672,7 +672,7 @@ void idProjectile::AddDefaultDamageEffect( const trace_t &collision, const idVec
|
|||
msg.WriteFloat( collision.c.point[1] );
|
||||
msg.WriteFloat( collision.c.point[2] );
|
||||
msg.WriteDir( collision.c.normal, 24 );
|
||||
msg.WriteLong( ( collision.c.material != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) : -1 );
|
||||
msg.WriteInt( ( collision.c.material != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_MATERIAL, collision.c.material->Index() ) : -1 );
|
||||
msg.WriteFloat( velocity[0], 5, 10 );
|
||||
msg.WriteFloat( velocity[1], 5, 10 );
|
||||
msg.WriteFloat( velocity[2], 5, 10 );
|
||||
|
|
|
@ -2705,7 +2705,7 @@ void idWeapon::Event_SetSkin( const char *skinname ) {
|
|||
byte msgBuf[MAX_EVENT_PARAM_SIZE];
|
||||
|
||||
msg.Init( msgBuf, sizeof( msgBuf ) );
|
||||
msg.WriteLong( ( skinDecl != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_SKIN, skinDecl->Index() ) : -1 );
|
||||
msg.WriteInt( ( skinDecl != NULL ) ? gameLocal.ServerRemapDecl( -1, DECL_SKIN, skinDecl->Index() ) : -1 );
|
||||
ServerSendEvent( EVENT_CHANGESKIN, &msg, false, -1 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7924,7 +7924,7 @@ void idPhysics_AF::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
int i;
|
||||
idCQuat quat;
|
||||
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteFloat( current.noMoveTime );
|
||||
msg.WriteFloat( current.activateTime );
|
||||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[0], AF_VELOCITY_EXPONENT_BITS, AF_VELOCITY_MANTISSA_BITS );
|
||||
|
|
|
@ -780,7 +780,7 @@ void idPhysics_Monster::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[0], MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[1], MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
msg.WriteDeltaFloat( 0.0f, current.pushVelocity[2], MONSTER_VELOCITY_EXPONENT_BITS, MONSTER_VELOCITY_MANTISSA_BITS );
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteBits( current.onGround, 1 );
|
||||
}
|
||||
|
||||
|
|
|
@ -1031,8 +1031,8 @@ idPhysics_Parametric::WriteToSnapshot
|
|||
================
|
||||
*/
|
||||
void idPhysics_Parametric::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
||||
msg.WriteLong( current.time );
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.time );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteFloat( current.origin[0] );
|
||||
msg.WriteFloat( current.origin[1] );
|
||||
msg.WriteFloat( current.origin[2] );
|
||||
|
|
|
@ -1466,7 +1466,7 @@ void idPhysics_RigidBody::WriteToSnapshot( idBitMsgDelta &msg ) const {
|
|||
quat = current.i.orientation.ToCQuat();
|
||||
localQuat = current.localAxis.ToCQuat();
|
||||
|
||||
msg.WriteLong( current.atRest );
|
||||
msg.WriteInt( current.atRest );
|
||||
msg.WriteFloat( current.i.position[0] );
|
||||
msg.WriteFloat( current.i.position[1] );
|
||||
msg.WriteFloat( current.i.position[2] );
|
||||
|
|
|
@ -84,7 +84,7 @@ public:
|
|||
void WriteByte( int c );
|
||||
void WriteShort( int c );
|
||||
void WriteUShort( int c );
|
||||
void WriteLong( int c );
|
||||
void WriteInt( int c );
|
||||
void WriteFloat( float f );
|
||||
void WriteFloat( float f, int exponentBits, int mantissaBits );
|
||||
void WriteAngle8( float f );
|
||||
|
@ -296,7 +296,7 @@ ID_INLINE void idBitMsg::WriteUShort( int c ) {
|
|||
WriteBits( c, 16 );
|
||||
}
|
||||
|
||||
ID_INLINE void idBitMsg::WriteLong( int c ) {
|
||||
ID_INLINE void idBitMsg::WriteInt( int c ) {
|
||||
WriteBits( c, 32 );
|
||||
}
|
||||
|
||||
|
@ -454,7 +454,7 @@ public:
|
|||
void WriteByte( int c );
|
||||
void WriteShort( int c );
|
||||
void WriteUShort( int c );
|
||||
void WriteLong( int c );
|
||||
void WriteInt( int c );
|
||||
void WriteFloat( float f );
|
||||
void WriteFloat( float f, int exponentBits, int mantissaBits );
|
||||
void WriteAngle8( float f );
|
||||
|
@ -555,7 +555,7 @@ ID_INLINE void idBitMsgDelta::WriteUShort( int c ) {
|
|||
WriteBits( c, 16 );
|
||||
}
|
||||
|
||||
ID_INLINE void idBitMsgDelta::WriteLong( int c ) {
|
||||
ID_INLINE void idBitMsgDelta::WriteInt( int c ) {
|
||||
WriteBits( c, 32 );
|
||||
}
|
||||
|
||||
|
|
|
@ -515,8 +515,8 @@ void rvDebuggerClient::SendAddBreakpoint ( rvDebuggerBreakpoint& bp, bool onceOn
|
|||
MSG_Init( &msg, buffer, sizeof( buffer ) );
|
||||
MSG_WriteShort ( &msg, (int)DBMSG_ADDBREAKPOINT );
|
||||
MSG_WriteBits ( &msg, onceOnly?1:0, 1 );
|
||||
MSG_WriteLong ( &msg, (unsigned long) bp.GetLineNumber ( ) );
|
||||
MSG_WriteLong ( &msg, bp.GetID ( ) );
|
||||
MSG_WriteInt ( &msg, (unsigned long) bp.GetLineNumber ( ) );
|
||||
MSG_WriteInt ( &msg, bp.GetID ( ) );
|
||||
MSG_WriteString ( &msg, bp.GetFilename() );
|
||||
|
||||
SendPacket ( msg.data, msg.cursize );
|
||||
|
@ -541,7 +541,7 @@ void rvDebuggerClient::SendRemoveBreakpoint ( rvDebuggerBreakpoint& bp )
|
|||
|
||||
MSG_Init( &msg, buffer, sizeof( buffer ) );
|
||||
MSG_WriteShort ( &msg, (int)DBMSG_REMOVEBREAKPOINT );
|
||||
MSG_WriteLong ( &msg, bp.GetID() );
|
||||
MSG_WriteInt ( &msg, bp.GetID() );
|
||||
|
||||
SendPacket ( msg.data, msg.cursize );
|
||||
}
|
||||
|
|
|
@ -334,7 +334,7 @@ void rvDebuggerServer::MSG_WriteCallstackFunc ( msg_t* msg, const prstack_t* sta
|
|||
{
|
||||
MSG_WriteString ( msg, "<UNKNOWN>" );
|
||||
MSG_WriteString ( msg, "<UNKNOWN>" );
|
||||
MSG_WriteLong ( msg, 0 );
|
||||
MSG_WriteInt ( msg, 0 );
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -351,12 +351,12 @@ void rvDebuggerServer::MSG_WriteCallstackFunc ( msg_t* msg, const prstack_t* sta
|
|||
OSPathToRelativePath(mBreakProgram->GetFilename( st->file ), qpath);
|
||||
qpath.BackSlashesToSlashes ( );
|
||||
MSG_WriteString ( msg, qpath );
|
||||
MSG_WriteLong ( msg, st->linenumber );
|
||||
MSG_WriteInt ( msg, st->linenumber );
|
||||
}
|
||||
else
|
||||
{
|
||||
MSG_WriteString ( msg, "<UNKNOWN>" );
|
||||
MSG_WriteLong ( msg, 0 );
|
||||
MSG_WriteInt ( msg, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -421,7 +421,7 @@ void rvDebuggerServer::HandleInspectThreads ( msg_t* in_msg )
|
|||
idThread* thread = idThread::GetThreads()[i];
|
||||
|
||||
MSG_WriteString ( &msg, thread->GetThreadName ( ) );
|
||||
MSG_WriteLong ( &msg, thread->GetThreadNum ( ) );
|
||||
MSG_WriteInt ( &msg, thread->GetThreadNum ( ) );
|
||||
|
||||
MSG_WriteBits ( &msg, (int)(thread == mBreakInterpreter->GetThread ( )), 1 );
|
||||
MSG_WriteBits ( &msg, (int)thread->IsDoneProcessing(), 1 );
|
||||
|
@ -619,7 +619,7 @@ void rvDebuggerServer::Break ( idInterpreter* interpreter, idProgram* program, i
|
|||
// Inform the debugger of the breakpoint hit
|
||||
MSG_Init( &msg, buffer, sizeof( buffer ) );
|
||||
MSG_WriteShort ( &msg, (int)DBMSG_BREAK );
|
||||
MSG_WriteLong ( &msg, st->linenumber );
|
||||
MSG_WriteInt ( &msg, st->linenumber );
|
||||
MSG_WriteString ( &msg, qpath );
|
||||
SendPacket ( msg.data, msg.cursize );
|
||||
|
||||
|
|
Loading…
Reference in a new issue