mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
by ensureing if the players is a camrea, then %conection.camera knows it's the same thing
This commit is contained in:
parent
475142b847
commit
aacb41ce0b
1 changed files with 6 additions and 1 deletions
|
|
@ -199,8 +199,13 @@ function GameConnectionListener::onSetSpawnPointComplete( %this, %client )
|
||||||
%client.player = spawnObject(%client.spawnClass, %client.spawnDataBlock, "", %client.spawnProperties, %client.spawnScript);
|
%client.player = spawnObject(%client.spawnClass, %client.spawnDataBlock, "", %client.spawnProperties, %client.spawnScript);
|
||||||
|
|
||||||
if(!isObject(%client.player))
|
if(!isObject(%client.player))
|
||||||
|
{
|
||||||
error("Failed to spawn player object!");
|
error("Failed to spawn player object!");
|
||||||
|
}
|
||||||
|
else if (%client.player.isMemberOfClass("Camera"))
|
||||||
|
{
|
||||||
|
%client.camera = %client.player;
|
||||||
|
}
|
||||||
if (!%client.player.isMemberOfClass(%client.spawnClass))
|
if (!%client.player.isMemberOfClass(%client.spawnClass))
|
||||||
warn("Trying to spawn a class that does not derive from "@ %client.spawnClass);
|
warn("Trying to spawn a class that does not derive from "@ %client.spawnClass);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue