diff --git a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameLogic/W3DGhostObject.cpp b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameLogic/W3DGhostObject.cpp index b4f35ec360..736dc2b2b0 100644 --- a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameLogic/W3DGhostObject.cpp +++ b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameLogic/W3DGhostObject.cpp @@ -725,22 +725,10 @@ void W3DGhostObject::xfer( Xfer *xfer ) // xfer data xfer->xferSnapshot( objectSnapshot ); - - // add snapshot to the scene - objectSnapshot->addToScene(); } } } - // - // since there is a snapshot for this object, there cannot be a regular object/drawable - // in the world, we need to remove it - // - if( m_parentObject && - m_parentSnapshots[TheGhostObjectManager->getLocalPlayerIndex()] != nullptr && - xfer->getXferMode() == XFER_LOAD ) - removeParentObject(); - // count of partition shroudedness info to follow UnsignedByte shroudednessCount = 0; UnsignedByte playerIndex; @@ -801,6 +789,17 @@ void W3DGhostObject::loadPostProcess( void ) { // extend base class GhostObject::loadPostProcess(); + + const Int playerIndex = TheGhostObjectManager->getLocalPlayerIndex(); + + // add snapshot to the scene + // TheSuperHackers @bugfix But only for the local player + if (addToScene(playerIndex)) + { + // since there is a snapshot for this object, there cannot be a regular object/drawable + // in the world, we need to remove it + removeParentObject(); + } } // ------------------------------------------------------------------------------------------------ diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameLogic/W3DGhostObject.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameLogic/W3DGhostObject.cpp index 8224425dbe..4e8a78c549 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameLogic/W3DGhostObject.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameLogic/W3DGhostObject.cpp @@ -729,22 +729,10 @@ void W3DGhostObject::xfer( Xfer *xfer ) // xfer data xfer->xferSnapshot( objectSnapshot ); - - // add snapshot to the scene - objectSnapshot->addToScene(); } } } - // - // since there is a snapshot for this object, there cannot be a regular object/drawable - // in the world, we need to remove it - // - if( m_parentObject && - m_parentSnapshots[TheGhostObjectManager->getLocalPlayerIndex()] != nullptr && - xfer->getXferMode() == XFER_LOAD ) - removeParentObject(); - // count of partition shroudedness info to follow UnsignedByte shroudednessCount = 0; UnsignedByte playerIndex; @@ -805,6 +793,17 @@ void W3DGhostObject::loadPostProcess( void ) { // extend base class GhostObject::loadPostProcess(); + + const Int playerIndex = TheGhostObjectManager->getLocalPlayerIndex(); + + // add snapshot to the scene + // TheSuperHackers @bugfix But only for the local player + if (addToScene(playerIndex)) + { + // since there is a snapshot for this object, there cannot be a regular object/drawable + // in the world, we need to remove it + removeParentObject(); + } } // ------------------------------------------------------------------------------------------------