@@ -663,6 +663,18 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData )
663663 Object* source = findObjectByID (sourceID);
664664 if (source != nullptr )
665665 {
666+ #if !RETAIL_COMPATIBLE_CRC
667+ // TheSuperHackers @fix stephanmeesters 01/03/2026 Validate the origin of the source object
668+ if ( source->getControllingPlayer () != thisPlayer )
669+ {
670+ DEBUG_CRASH ( (" MSG_DO_SPECIAL_POWER: Player '%ls' attempted to control the object '%s' owned by player '%ls'." ,
671+ thisPlayer->getPlayerDisplayName ().str (),
672+ source->getTemplate ()->getName ().str (),
673+ source->getControllingPlayer ()->getPlayerDisplayName ().str ()) );
674+ break ;
675+ }
676+ #endif
677+
666678 AIGroupPtr theGroup = TheAI->createGroup ();
667679 theGroup->add (source);
668680 theGroup->groupDoSpecialPower ( specialPowerID, options );
@@ -705,6 +717,18 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData )
705717 Object* source = findObjectByID (sourceID);
706718 if (source != nullptr )
707719 {
720+ #if !RETAIL_COMPATIBLE_CRC
721+ // TheSuperHackers @fix stephanmeesters 01/03/2026 Validate the origin of the source object
722+ if ( source->getControllingPlayer () != thisPlayer )
723+ {
724+ DEBUG_CRASH ( (" MSG_DO_SPECIAL_POWER_AT_LOCATION: Player '%ls' attempted to control the object '%s' owned by player '%ls'." ,
725+ thisPlayer->getPlayerDisplayName ().str (),
726+ source->getTemplate ()->getName ().str (),
727+ source->getControllingPlayer ()->getPlayerDisplayName ().str ()) );
728+ break ;
729+ }
730+ #endif
731+
708732 AIGroupPtr theGroup = TheAI->createGroup ();
709733 theGroup->add (source);
710734 theGroup->groupDoSpecialPowerAtLocation ( specialPowerID, &targetCoord, INVALID_ANGLE , objectInWay, options );
@@ -748,6 +772,18 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData )
748772 Object* source = findObjectByID (sourceID);
749773 if (source != nullptr )
750774 {
775+ #if !RETAIL_COMPATIBLE_CRC
776+ // TheSuperHackers @fix stephanmeesters 01/03/2026 Validate the origin of the source object
777+ if ( source->getControllingPlayer () != thisPlayer )
778+ {
779+ DEBUG_CRASH ( (" MSG_DO_SPECIAL_POWER_AT_OBJECT: Player '%ls' attempted to control the object '%s' owned by player '%ls'." ,
780+ thisPlayer->getPlayerDisplayName ().str (),
781+ source->getTemplate ()->getName ().str (),
782+ source->getControllingPlayer ()->getPlayerDisplayName ().str ()) );
783+ break ;
784+ }
785+ #endif
786+
751787 AIGroupPtr theGroup = TheAI->createGroup ();
752788 theGroup->add (source);
753789 theGroup->groupDoSpecialPowerAtObject ( specialPowerID, target, options );
@@ -1189,6 +1225,18 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData )
11891225 Object* source = findObjectByID (sourceID);
11901226 if (source != nullptr )
11911227 {
1228+ #if !RETAIL_COMPATIBLE_CRC
1229+ // TheSuperHackers @fix stephanmeesters 01/03/2026 Validate the origin of the source object
1230+ if ( source->getControllingPlayer () != thisPlayer )
1231+ {
1232+ DEBUG_CRASH ( (" MSG_DO_SPECIAL_POWER_OVERRIDE_DESTINATION: Player '%ls' attempted to control the object '%s' owned by player '%ls'." ,
1233+ thisPlayer->getPlayerDisplayName ().str (),
1234+ source->getTemplate ()->getName ().str (),
1235+ source->getControllingPlayer ()->getPlayerDisplayName ().str ()) );
1236+ break ;
1237+ }
1238+ #endif
1239+
11921240 AIGroupPtr theGroup = TheAI->createGroup ();
11931241 theGroup->add (source);
11941242 theGroup->groupOverrideSpecialPowerDestination ( spType, loc, CMD_FROM_PLAYER );
0 commit comments