Revision | 5091af981f0d741663cb1525d60359c885bac11a (tree) |
---|---|
Time | 2022-02-21 03:40:26 |
Author | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
Added ACS function: "GetActorSectorLocation".
@@ -5368,6 +5368,7 @@ | ||
5368 | 5368 | ACSF_GetMapRotationInfo, |
5369 | 5369 | ACSF_GetCurrentMapPosition, |
5370 | 5370 | ACSF_GetEventResult, |
5371 | + ACSF_GetActorSectorLocation, | |
5371 | 5372 | |
5372 | 5373 | // ZDaemon |
5373 | 5374 | ACSF_GetTeamScore = 19620, // (int team) |
@@ -7732,6 +7733,24 @@ | ||
7732 | 7733 | return GAMEMODE_GetEventResult(); |
7733 | 7734 | } |
7734 | 7735 | |
7736 | + case ACSF_GetActorSectorLocation: | |
7737 | + { | |
7738 | + const TArray<FString *> *sectorInfoNames = &level.info->SectorInfo.Names; | |
7739 | + const AActor *pActor = SingleActorFromTID( args[0], activator ); | |
7740 | + | |
7741 | + // [AK] Make sure that the actor is valid. | |
7742 | + if ( pActor != NULL ) | |
7743 | + { | |
7744 | + ULONG ulSectorNum = pActor->Sector->sectornum; | |
7745 | + | |
7746 | + // [AK] Check if the sector that the actor is in has a designated name. | |
7747 | + if (( sectorInfoNames->Size( ) > ulSectorNum ) && (( *sectorInfoNames )[ulSectorNum] != NULL )) | |
7748 | + return GlobalACSStrings.AddString( *( *sectorInfoNames )[ulSectorNum] ); | |
7749 | + } | |
7750 | + | |
7751 | + return GlobalACSStrings.AddString( "" ); | |
7752 | + } | |
7753 | + | |
7735 | 7754 | case ACSF_GetActorFloorTexture: |
7736 | 7755 | { |
7737 | 7756 | auto a = SingleActorFromTID(args[0], activator); |