mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-19 11:49:09 +00:00
Allow PXPhysicals to change scene nodes (cherry picked from H'uru 1b6f315186
)
If this isn't done, the client will crash on exit when markers have been loaded at some point in the game
This commit is contained in:
@ -999,7 +999,18 @@ plKey plPXPhysical::GetSceneNode() const
|
||||
|
||||
void plPXPhysical::SetSceneNode(plKey newNode)
|
||||
{
|
||||
// Not Supported
|
||||
plKey oldNode = GetSceneNode();
|
||||
if (oldNode == newNode)
|
||||
return;
|
||||
|
||||
// If we don't do this, we get leaked keys and a crash on exit with certain clones
|
||||
// Note this has nothing do to with the world that the physical is in
|
||||
if (newNode) {
|
||||
plNodeRefMsg* refMsg = new plNodeRefMsg(newNode, plNodeRefMsg::kOnRequest, -1, plNodeRefMsg::kPhysical);
|
||||
hsgResMgr::ResMgr()->SendRef(GetKey(), refMsg, plRefFlags::kActiveRef);
|
||||
}
|
||||
if (oldNode)
|
||||
oldNode->Release(GetKey());
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user