• R/O
  • SSH

zandronum-sandbox-stable: Commit


Commit MetaInfo

Revision192e43bb063394b853ad8d925f58d4e82dc19d16 (tree)
Time2022-02-13 23:02:04
AuthorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

Added ACS function: "GetCurrentMapPosition".

Change Summary

Incremental Difference

diff -r c6b5c7e3c658 -r 192e43bb0633 src/p_acs.cpp
--- a/src/p_acs.cpp Thu Feb 10 11:15:19 2022 -0500
+++ b/src/p_acs.cpp Sun Feb 13 09:02:04 2022 -0500
@@ -5366,6 +5366,7 @@
53665366 ACSF_GetChatMessage,
53675367 ACSF_GetMapRotationSize,
53685368 ACSF_GetMapRotationInfo,
5369+ ACSF_GetCurrentMapPosition,
53695370
53705371 // ZDaemon
53715372 ACSF_GetTeamScore = 19620, // (int team)
@@ -7697,6 +7698,22 @@
76977698 return 0;
76987699 }
76997700
7701+ case ACSF_GetCurrentMapPosition:
7702+ {
7703+ // [AK] If there's no maplist, return zero.
7704+ if ( MAPROTATION_GetNumEntries() == 0 )
7705+ return 0;
7706+
7707+ ULONG ulPosition = MAPROTATION_GetCurrentPosition();
7708+ level_info_t *rotationMap = MAPROTATION_GetMap( ulPosition );
7709+
7710+ // [AK] Make sure that the current map position is the current level being played.
7711+ if (( rotationMap == NULL ) || ( stricmp( level.mapname, rotationMap->mapname ) != 0 ))
7712+ return 0;
7713+
7714+ return ulPosition + 1;
7715+ }
7716+
77007717 case ACSF_GetActorFloorTexture:
77017718 {
77027719 auto a = SingleActorFromTID(args[0], activator);
Show on old repository browser