This is a fork of Zandronum Beta for Mac Os (Silicon and Intel)
修訂 | 6d16ad10f91bcbf9248dc7e8ad2b9255a620e9a1 (tree) |
---|---|
時間 | 2022-12-16 05:59:50 |
作者 | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
Did some refactoring in TEAM_TimeExpired and replaced C-style char arrays with FString.
@@ -754,8 +754,6 @@ | ||
754 | 754 | void TEAM_TimeExpired( void ) |
755 | 755 | { |
756 | 756 | LONG lWinner = 0; |
757 | - DHUDMessageFadeOut *pMsg; | |
758 | - char szString[64]; | |
759 | 757 | ULONG lHighestScore; |
760 | 758 | ULONG ulLeadingTeamsCount = 0; |
761 | 759 |
@@ -792,33 +790,11 @@ | ||
792 | 790 | lWinner = teams.Size( ); |
793 | 791 | |
794 | 792 | // If there was a tie, then go into sudden death! |
795 | - if ( sv_suddendeath && ( (ULONG)lWinner == teams.Size( ) ) ) | |
793 | + if (( sv_suddendeath ) && ( static_cast<ULONG>( lWinner ) == teams.Size( ))) | |
796 | 794 | { |
797 | 795 | // Only print the message the instant we reach sudden death. |
798 | - if ( level.time == (int)( timelimit * TICRATE * 60 )) | |
799 | - { | |
800 | - sprintf( szString, "\\cdSUDDEN DEATH!" ); | |
801 | - V_ColorizeString( szString ); | |
802 | - | |
803 | - if ( NETWORK_GetState( ) != NETSTATE_SERVER ) | |
804 | - { | |
805 | - // Display the HUD message. | |
806 | - pMsg = new DHUDMessageFadeOut( BigFont, szString, | |
807 | - 160.4f, | |
808 | - 75.0f, | |
809 | - 320, | |
810 | - 200, | |
811 | - CR_UNTRANSLATED, | |
812 | - 3.0f, | |
813 | - 2.0f ); | |
814 | - | |
815 | - StatusBar->AttachMessage( pMsg, MAKE_ID('C','N','T','R') ); | |
816 | - } | |
817 | - else | |
818 | - { | |
819 | - SERVERCOMMANDS_PrintHUDMessage( szString, 160.4f, 75.0f, 320, 200, HUDMESSAGETYPE_FADEOUT, CR_RED, 3.0f, 0.0f, 2.0f, "BigFont", MAKE_ID( 'C', 'N', 'T', 'R' ) ); | |
820 | - } | |
821 | - } | |
796 | + if ( level.time == static_cast<int>( timelimit * TICRATE * 60 )) | |
797 | + HUD_DrawStandardMessage( "SUDDEN DEATH!", CR_GREEN, false, 3.0f, 2.0f, true ); | |
822 | 798 | |
823 | 799 | return; |
824 | 800 | } |