• R/O
  • SSH

zandronum-sandbox-stable: Commit


Commit MetaInfo

Revision5091af981f0d741663cb1525d60359c885bac11a (tree)
Time2022-02-21 03:40:26
AuthorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

Added ACS function: "GetActorSectorLocation".

Change Summary

Incremental Difference

diff -r 9f1fb012a629 -r 5091af981f0d src/p_acs.cpp
--- a/src/p_acs.cpp Fri Feb 18 10:11:20 2022 -0500
+++ b/src/p_acs.cpp Sun Feb 20 13:40:26 2022 -0500
@@ -5368,6 +5368,7 @@
53685368 ACSF_GetMapRotationInfo,
53695369 ACSF_GetCurrentMapPosition,
53705370 ACSF_GetEventResult,
5371+ ACSF_GetActorSectorLocation,
53715372
53725373 // ZDaemon
53735374 ACSF_GetTeamScore = 19620, // (int team)
@@ -7732,6 +7733,24 @@
77327733 return GAMEMODE_GetEventResult();
77337734 }
77347735
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+
77357754 case ACSF_GetActorFloorTexture:
77367755 {
77377756 auto a = SingleActorFromTID(args[0], activator);
Show on old repository browser