mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
Failed to get the Scene changes for the Full template rolled up. This corrects that.
This commit is contained in:
parent
582e4f0130
commit
5cefad72b3
31 changed files with 167 additions and 68 deletions
|
|
@ -134,12 +134,12 @@ package GameCore
|
|||
// to caching mission lighting.
|
||||
$missionCRC = getFileCRC( %file );
|
||||
|
||||
// Exec the mission. The MissionGroup (loaded components) is added to the ServerGroup
|
||||
// Exec the mission. The Scene (loaded components) is added to the ServerGroup
|
||||
exec(%file);
|
||||
|
||||
if( !isObject(MissionGroup) )
|
||||
if( !isObject(getRootScene()) )
|
||||
{
|
||||
$Server::LoadFailMsg = "No 'MissionGroup' found in mission \"" @ %file @ "\".";
|
||||
$Server::LoadFailMsg = "No Scene found in mission \"" @ %file @ "\".";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ function ItemData::onThrow(%this, %user, %amount)
|
|||
rotation = "0 0 1 "@ (getRandom() * 360);
|
||||
count = %amount;
|
||||
};
|
||||
MissionGroup.add(%obj);
|
||||
getRootScene().add(%obj);
|
||||
%obj.schedulePop();
|
||||
return %obj;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ function TurretShapeData::onRemove(%this, %obj)
|
|||
}
|
||||
|
||||
// This is on MissionGroup so it doesn't happen when the mission has ended
|
||||
function MissionGroup::respawnTurret(%this, %datablock, %className, %transform, %static, %respawn)
|
||||
function Scene::respawnTurret(%this, %datablock, %className, %transform, %static, %respawn)
|
||||
{
|
||||
%turret = new (%className)()
|
||||
{
|
||||
|
|
@ -97,7 +97,7 @@ function MissionGroup::respawnTurret(%this, %datablock, %className, %transform,
|
|||
};
|
||||
|
||||
%turret.setTransform(%transform);
|
||||
MissionGroup.add(%turret);
|
||||
getRootScene().add(%turret);
|
||||
return %turret;
|
||||
}
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ function TurretShapeData::onDestroyed(%this, %obj, %lastState)
|
|||
|
||||
if (%obj.doRespawn())
|
||||
{
|
||||
MissionGroup.schedule($TurretShape::RespawnTime, "respawnTurret", %this, %obj.getClassName(), %obj.getTransform(), true, true);
|
||||
getRootScene().schedule($TurretShape::RespawnTime, "respawnTurret", %this, %obj.getClassName(), %obj.getTransform(), true, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -331,7 +331,7 @@ function AITurretShapeData::onThrow(%this, %user, %amount)
|
|||
client = %user.client;
|
||||
isAiControlled = true;
|
||||
};
|
||||
MissionGroup.add(%obj);
|
||||
getRootScene().add(%obj);
|
||||
|
||||
// Let the turret know that we're a firend
|
||||
%obj.addToIgnoreList(%user);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue