コミットメタ情報

リビジョン70919e31790ea77cc133e05856d36b9d04d6c528 (tree)
日時2022-05-14 22:51:33
作者Adam Kaminski <kaminskiadam9@gmai...>
コミッターAdam Kaminski

ログメッセージ

Call PLAYER_SetKills any time a player's kill count increments. This removes some minor duplicate code, and also refreshes the HUD (this already happens when clients receive the SetPlayerKillCount server command).

変更サマリ

差分

diff -r 20bc5cb7085e -r 70919e31790e src/p_interaction.cpp
--- a/src/p_interaction.cpp Sat May 14 09:45:41 2022 -0400
+++ b/src/p_interaction.cpp Sat May 14 09:51:33 2022 -0400
@@ -541,17 +541,9 @@
541541 if ((CountsAsKill()) &&
542542 ( NETWORK_InClientMode() == false ))
543543 { // count for intermission
544- source->player->killcount++;
545-
546- // Update the clients with this player's updated killcount.
547- if ( NETWORK_GetState( ) == NETSTATE_SERVER )
548- {
549- SERVERCOMMANDS_SetPlayerKillCount( ULONG( source->player - players ) );
550-
551- // Also, update the scoreboard.
552- SERVERCONSOLE_UpdatePlayerInfo( ULONG( source->player - players ), UDF_FRAGS );
553- SERVERCONSOLE_UpdateScoreboard( );
554- }
544+ // [AK] Call PLAYER_SetKills to increment the kill count instead.
545+ PLAYER_SetKills( source->player, source->player->killcount + 1 );
546+ //source->player->killcount++;
555547 }
556548
557549 // Don't count any frags at level start, because they're just telefrags
@@ -679,7 +671,11 @@
679671 // Why give player 0 credit? :P
680672 // Meh, just do it in single player.
681673 if ( NETWORK_GetState( ) == NETSTATE_SINGLE )
682- players[0].killcount++;
674+ {
675+ // [AK] Call PLAYER_SetKills to increment the kill count instead.
676+ PLAYER_SetKills( &players[0], players[0].killcount + 1 );
677+ // players[0].killcount++;
678+ }
683679
684680 if ( NETWORK_GetState( ) == NETSTATE_SERVER )
685681 {
旧リポジトリブラウザで表示