Commit MetaInfo

Revisiona6135a2f1c8ea458d4320b28962d12e2ba4e37cf (tree)
Time2012-05-27 16:38:26
AuthorBenjamin Berkels <torr.samaho@quan...>
CommiterBenjamin Berkels

Log Message

updated SERVERCOMMANDS_SetThingFrame to use NetCommand (part of Dusk's wound state / custom damagetype fix patch)

Change Summary

Incremental Difference

diff -r 93e21c90ab5a -r a6135a2f1c8e src/sv_commands.cpp
--- a/src/sv_commands.cpp Sun May 27 09:31:53 2012 +0200
+++ b/src/sv_commands.cpp Sun May 27 09:38:26 2012 +0200
@@ -2702,26 +2702,12 @@
27022702 stateLabel = ":S";
27032703 }
27042704
2705- for ( ulIdx = 0; ulIdx < MAXPLAYERS; ulIdx++ )
2706- {
2707- if ( SERVER_IsValidClient( ulIdx ) == false )
2708- continue;
2709-
2710- if ((( ulFlags & SVCF_SKIPTHISCLIENT ) && ( ulPlayerExtra == ulIdx )) ||
2711- (( ulFlags & SVCF_ONLYTHISCLIENT ) && ( ulPlayerExtra != ulIdx )))
2712- {
2713- continue;
2714- }
2715-
2716- SERVER_CheckClientBuffer( ulIdx, 4 + static_cast<ULONG>( stateLabel.Len() ), true );
2717- if ( bCallStateFunction )
2718- NETWORK_WriteHeader( &SERVER_GetClient( ulIdx )->PacketBuffer.ByteStream, SVC_SETTHINGFRAME );
2719- else
2720- NETWORK_WriteHeader( &SERVER_GetClient( ulIdx )->PacketBuffer.ByteStream, SVC_SETTHINGFRAMENF );
2721- NETWORK_WriteShort( &SERVER_GetClient( ulIdx )->PacketBuffer.ByteStream, pActor->lNetID );
2722- NETWORK_WriteString( &SERVER_GetClient( ulIdx )->PacketBuffer.ByteStream, stateLabel.GetChars() );
2723- NETWORK_WriteByte( &SERVER_GetClient( ulIdx )->PacketBuffer.ByteStream, lOffset );
2724- }
2705+ // [Dusk] Use NetCommand
2706+ NetCommand command( bCallStateFunction ? SVC_SETTHINGFRAME : SVC_SETTHINGFRAMENF );
2707+ command.addShort( pActor->lNetID );
2708+ command.addString( stateLabel.GetChars( ) );
2709+ command.addByte( lOffset );
2710+ command.sendCommandToClients( ulPlayerExtra, ulFlags );
27252711 }
27262712
27272713 //*****************************************************************************
Show on old repository browser