From da67ff746f9a8eed3fc51c88989623cc23448fb6 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Mon, 29 Dec 2025 08:06:45 -0600 Subject: [PATCH] Revert "Merge pull request #1640 from Azaezel/alpha41/ExtraOnAdds" This reverts commit 7cad8615362bfc1fe086ccd90e1afb47aac137db, reversing changes made to 52462023577b807570a22d89c75b30f042276e90. --- Engine/source/T3D/gameBase/gameBase.cpp | 6 ------ Engine/source/T3D/gameBase/gameBase.h | 2 -- Engine/source/console/simObject.cpp | 14 -------------- Engine/source/console/simObject.h | 3 --- 4 files changed, 25 deletions(-) diff --git a/Engine/source/T3D/gameBase/gameBase.cpp b/Engine/source/T3D/gameBase/gameBase.cpp index e603549a6..9e5a770b7 100644 --- a/Engine/source/T3D/gameBase/gameBase.cpp +++ b/Engine/source/T3D/gameBase/gameBase.cpp @@ -125,11 +125,6 @@ IMPLEMENT_CALLBACK( GameBase, setControl, void, ( bool controlled ), ( controlle "client controls this object.\n" ); -IMPLEMENT_CALLBACK(GameBase, onAdd, void, (SimObjectId ID), (ID), - "Called when this ScriptObject is added to the system.\n" - "@param ID Unique object ID assigned when created (%this in script).\n" -); - GameBaseData::GameBaseData() { mCategory = StringTable->EmptyString(); @@ -523,7 +518,6 @@ void GameBase::scriptOnAdd() // everything is ready. if (mDataBlock && !isGhost()) mDataBlock->onAdd_callback( this ); - onAdd_callback(getId()); } void GameBase::scriptOnNewDataBlock(bool reload) diff --git a/Engine/source/T3D/gameBase/gameBase.h b/Engine/source/T3D/gameBase/gameBase.h index 7d13b79b2..cfdc10bf4 100644 --- a/Engine/source/T3D/gameBase/gameBase.h +++ b/Engine/source/T3D/gameBase/gameBase.h @@ -469,8 +469,6 @@ private: void _onDatablockModified(); protected: void onScopeIdChange() override { setMaskBits(ScopeIdMask); } - - DECLARE_CALLBACK(void, onAdd, (SimObjectId ID)); }; diff --git a/Engine/source/console/simObject.cpp b/Engine/source/console/simObject.cpp index 8eff6f01d..cfcbbd72b 100644 --- a/Engine/source/console/simObject.cpp +++ b/Engine/source/console/simObject.cpp @@ -88,16 +88,6 @@ EndImplementBitfieldType; IMPLEMENT_CONOBJECT( SimObject ); -IMPLEMENT_CALLBACK(SimObject, onAdd, void, (SimObjectId ID), (ID), - "Called when this SimObject is added to the system, if the className is set to something\n" - "@param ID Unique object ID assigned when created (%this in script).\n" -); - -IMPLEMENT_CALLBACK(SimObject, onRemove, void, (SimObjectId ID), (ID), - "Called when this SimObject is removed from the system, if the className is set to something\n" - "@param ID Unique object ID assigned when created (%this in script).\n" -); - // See full description in the new CHM manual ConsoleDocClass( SimObject, "@brief Base class for almost all objects involved in the simulation.\n\n" @@ -1699,8 +1689,6 @@ bool SimObject::onAdd() linkNamespaces(); - onAdd_callback(getId()); - return true; } @@ -1710,8 +1698,6 @@ void SimObject::onRemove() { mFlags.clear(Added); - onRemove_callback(getId()); - unlinkNamespaces(); } diff --git a/Engine/source/console/simObject.h b/Engine/source/console/simObject.h index 5885e16e6..4868a4585 100644 --- a/Engine/source/console/simObject.h +++ b/Engine/source/console/simObject.h @@ -987,9 +987,6 @@ class SimObject: public ConsoleObject, public TamlCallbacks DECLARE_CALLBACK(void, onInspectPostApply, (SimObject* obj)); DECLARE_CALLBACK(void, onSelected, (SimObject* obj)); DECLARE_CALLBACK(void, onUnselected, (SimObject* obj)); - - DECLARE_CALLBACK(void, onAdd, (SimObjectId ID)); - DECLARE_CALLBACK(void, onRemove, (SimObjectId ID)); static SimObject* __findObject( const char* id ) { return Sim::findObject( id ); } static const char* __getObjectId( ConsoleObject* object )