• 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

Commit MetaInfo

Revisión845474b7e3e7911da03a3e309563ce2d8a35203e (tree)
Tiempo2021-11-01 23:12:10
AutorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

SetDeadSpectator can now revive dead spectators while the game is waiting for players or in the countdown sequence.

Cambiar Resumen

Diferencia incremental

diff -r 366f5d10bc73 -r 845474b7e3e7 src/p_acs.cpp
--- a/src/p_acs.cpp Sat Oct 30 13:16:29 2021 -0400
+++ b/src/p_acs.cpp Mon Nov 01 10:12:10 2021 -0400
@@ -7219,6 +7219,7 @@
72197219 {
72207220 const ULONG ulPlayer = static_cast<ULONG> ( args[0] );
72217221 const bool bDeadSpectator = !!args[1];
7222+ const GAMESTATE_e gamestate = GAMEMODE_GetState( );
72227223
72237224 // [BB] Clients are not allowed to change the status of players.
72247225 if ( NETWORK_InClientMode() )
@@ -7228,8 +7229,11 @@
72287229 if ( ( GAMEMODE_GetCurrentFlags() & GMF_DEADSPECTATORS ) == false )
72297230 return 0;
72307231
7231- // [AK] This should only work while the game is in progress.
7232- if ( GAMEMODE_GetState( ) != GAMESTATE_INPROGRESS )
7232+ // [AK] This should never work while the game is in the result sequence. We also
7233+ // shouldn't turn players into dead spectators if the game isn't in progress,
7234+ // but we can still revive any dead spectators that might exist while the game
7235+ // is waiting for players or in the countdown sequence.
7236+ if (( gamestate != GAMESTATE_INPROGRESS ) && ( gamestate == GAMESTATE_INRESULTSEQUENCE || bDeadSpectator ))
72337237 return 0;
72347238
72357239 if ( PLAYER_IsValidPlayer ( ulPlayer ) == false )