mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Fixes several minor initialization issues that were causing problems with deletion/management of components and entities.
Also makes the ThirdPersonPlayer game object editor selectable again by removing an erroneously set field.
This commit is contained in:
parent
bbf7865a77
commit
2464b620ba
7 changed files with 46 additions and 9 deletions
|
|
@ -92,6 +92,32 @@ void CameraOrbiterComponent::onComponentRemove()
|
|||
Parent::onComponentRemove();
|
||||
}
|
||||
|
||||
void CameraOrbiterComponent::componentAddedToOwner(Component *comp)
|
||||
{
|
||||
if (comp->getId() == getId())
|
||||
return;
|
||||
|
||||
//test if this is a shape component!
|
||||
CameraComponent *camComponent = dynamic_cast<CameraComponent*>(comp);
|
||||
if (camComponent)
|
||||
{
|
||||
mCamera = camComponent;
|
||||
}
|
||||
}
|
||||
|
||||
void CameraOrbiterComponent::componentRemovedFromOwner(Component *comp)
|
||||
{
|
||||
if (comp->getId() == getId()) //?????????
|
||||
return;
|
||||
|
||||
//test if this is a shape component!
|
||||
CameraComponent *camComponent = dynamic_cast<CameraComponent*>(comp);
|
||||
if (camComponent)
|
||||
{
|
||||
mCamera = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
U32 CameraOrbiterComponent::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
|
||||
{
|
||||
U32 retMask = Parent::packUpdate(con, mask, stream);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue