Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
}

// ------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
}

// ------------------------------------------------------------------------------------------------
Expand Down
Loading