mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-20 23:23:47 +00:00
Fixes the inspector/component editor to display the components attached to an entity correctly in the inspector.
This commit is contained in:
parent
4f78143dc8
commit
b5277e0f08
10 changed files with 513 additions and 44 deletions
|
|
@ -132,6 +132,23 @@ function isNameUnique(%name)
|
|||
//
|
||||
function GameConnection::onDrop(%client, %reason)
|
||||
{
|
||||
%entityIds = parseMissionGroupForIds("Entity", "");
|
||||
%entityCount = getWordCount(%entityIds);
|
||||
|
||||
for(%i=0; %i < %entityCount; %i++)
|
||||
{
|
||||
%entity = getWord(%entityIds, %i);
|
||||
|
||||
for(%e=0; %e < %entity.getCount(); %e++)
|
||||
{
|
||||
%child = %entity.getObject(%e);
|
||||
if(%child.getClassName() $= "Entity")
|
||||
%entityIds = %entityIds SPC %child.getID();
|
||||
}
|
||||
|
||||
%entity.notify("onClientDisconnect", %client);
|
||||
}
|
||||
|
||||
if($missionRunning)
|
||||
theLevelInfo.onClientLeaveGame();
|
||||
|
||||
|
|
|
|||
|
|
@ -131,6 +131,22 @@ function serverCmdMissionStartPhase3Ack(%client, %seq)
|
|||
%client.currentPhase = 3;
|
||||
|
||||
// Server is ready to drop into the game
|
||||
%entityIds = parseMissionGroupForIds("Entity", "");
|
||||
%entityCount = getWordCount(%entityIds);
|
||||
|
||||
for(%i=0; %i < %entityCount; %i++)
|
||||
{
|
||||
%entity = getWord(%entityIds, %i);
|
||||
|
||||
for(%e=0; %e < %entity.getCount(); %e++)
|
||||
{
|
||||
%child = %entity.getObject(%e);
|
||||
if(%child.getCLassName() $= "Entity")
|
||||
%entityIds = %entityIds SPC %child.getID();
|
||||
}
|
||||
|
||||
%entity.notify("onClientConnect", %client);
|
||||
}
|
||||
|
||||
//Have any special game-play handling here
|
||||
if(theLevelInfo.isMethod("onClientEnterGame"))
|
||||
|
|
@ -151,7 +167,7 @@ function serverCmdMissionStartPhase3Ack(%client, %seq)
|
|||
};
|
||||
}
|
||||
|
||||
if (isDefined("$Game::DefaultCameraClass"))
|
||||
//if (isDefined("$Game::DefaultCameraClass"))
|
||||
%client.camera = spawnObject("Camera", Observer);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue