• 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 for Mac Os (Silicon and Intel)


Commit MetaInfo

Revisioncce7b44c33e748da6fcf9dd49df09e8722f0b73b (tree)
Time2021-12-03 08:42:30
AuthorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

Added a sanity check to ensure that a team's carrier is still a valid player.

Change Summary

Incremental Difference

diff -r bdd2490c09ae -r cce7b44c33e7 src/team.cpp
--- a/src/team.cpp Wed Dec 01 18:38:26 2021 -0500
+++ b/src/team.cpp Thu Dec 02 18:42:30 2021 -0500
@@ -1243,7 +1243,8 @@
12431243 //
12441244 player_t *TEAM_GetCarrier( ULONG ulTeamIdx )
12451245 {
1246- if ( TEAM_CheckIfValid( ulTeamIdx ))
1246+ // [AK] Also make sure that this team's carrier is still valid.
1247+ if (( TEAM_CheckIfValid( ulTeamIdx )) && ( PLAYER_IsValidPlayerWithMo( teams[ulTeamIdx].g_pCarrier - players )))
12471248 return ( teams[ulTeamIdx].g_pCarrier );
12481249
12491250 return ( NULL );