• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

This is a fork of Zandronum Beta for Mac Os (Silicon and Intel)


Commit MetaInfo

Revisãocca76668e470b1756b59739dcf90c870898370a6 (tree)
Hora2022-12-16 05:59:08
AutorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Mensagem de Log

Refactored TEAM_DoWinSequence and replaced C-style char arrays with FString. This also fixes an inconsistency in the fadeout times if whether or not the server prints the message.

Mudança Sumário

Diff

diff -r 51750a5f66fc -r cca76668e470 src/team.cpp
--- a/src/team.cpp Fri Dec 16 10:33:49 2022 -0500
+++ b/src/team.cpp Thu Dec 15 15:59:08 2022 -0500
@@ -731,34 +731,22 @@
731731 //
732732 void TEAM_DoWinSequence( ULONG ulTeamIdx )
733733 {
734- char szString[32];
735- DHUDMessageFadeOut *pMsg;
734+ FString message;
735+ EColorRange color;
736736
737737 // Display "%s WINS!" HUD message.
738- if ( ulTeamIdx < teams.Size( ) )
739- sprintf( szString, "\\c%s%s WINS!", TEAM_GetTextColorName( ulTeamIdx ), TEAM_GetName( ulTeamIdx ) );
740- else
741- sprintf( szString, "DRAW GAME!\n" );
742-
743- V_ColorizeString( szString );
744-
745- if ( NETWORK_GetState( ) != NETSTATE_SERVER )
738+ if ( ulTeamIdx < teams.Size( ))
746739 {
747- pMsg = new DHUDMessageFadeOut( BigFont, szString,
748- 160.4f,
749- 75.0f,
750- 320,
751- 200,
752- CR_UNTRANSLATED,
753- 3.0f,
754- 2.0f );
755-
756- StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') );
740+ message.AppendFormat( "%s WINS!", TEAM_GetName( ulTeamIdx ));
741+ color = static_cast<EColorRange>( TEAM_GetTextColor( ulTeamIdx ));
757742 }
758743 else
759744 {
760- SERVERCOMMANDS_PrintHUDMessage( szString, 160.4f, 75.0f, 320, 200, HUDMESSAGETYPE_FADEOUT, CR_RED, 3.0f, 0.0f, 0.25f, "BigFont", MAKE_ID( 'C', 'N', 'T', 'R' ) );
745+ message = "DRAW GAME!";
746+ color = CR_RED;
761747 }
748+
749+ HUD_DrawStandardMessage( message.GetChars( ), color, false, 3.0f, 2.0f, true );
762750 }
763751
764752 //*****************************************************************************