Revision | 192e43bb063394b853ad8d925f58d4e82dc19d16 (tree) |
---|---|
Time | 2022-02-13 23:02:04 |
Author | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
Added ACS function: "GetCurrentMapPosition".
@@ -5366,6 +5366,7 @@ | ||
5366 | 5366 | ACSF_GetChatMessage, |
5367 | 5367 | ACSF_GetMapRotationSize, |
5368 | 5368 | ACSF_GetMapRotationInfo, |
5369 | + ACSF_GetCurrentMapPosition, | |
5369 | 5370 | |
5370 | 5371 | // ZDaemon |
5371 | 5372 | ACSF_GetTeamScore = 19620, // (int team) |
@@ -7697,6 +7698,22 @@ | ||
7697 | 7698 | return 0; |
7698 | 7699 | } |
7699 | 7700 | |
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 | + | |
7700 | 7717 | case ACSF_GetActorFloorTexture: |
7701 | 7718 | { |
7702 | 7719 | auto a = SingleActorFromTID(args[0], activator); |