• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-c誰得cocoaqtpythonrubywindowsphpgameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwitterdombtronvb.nettestarduinodirectxpreviewerゲームエンジン

This is a fork of Zandronum Beta for TSPG.


Commit MetaInfo

Revisiondbf5f7cecf61c9b2e98fa44c7bb0a692c72c38ae (tree)
Time2021-11-01 23:12:10
AuthorAdam 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.

Change Summary

Incremental Difference

diff -r b6c0700568a4 -r dbf5f7cecf61 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 )