mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 04:15:36 +00:00
Merge pull request #1546 from Azaezel/alpha41/spawnPosSorted
lock in spawnLocation at client controllable creation
This commit is contained in:
commit
be54d24269
1 changed files with 3 additions and 1 deletions
|
|
@ -192,8 +192,10 @@ function GameConnectionListener::onSetSpawnPointComplete( %this, %client )
|
|||
%client.GetEventManager().remove( %client.listener, "setSpawnPointFailed" );
|
||||
%client.GetEventManager().subscribe( %client.listener, "postSpawnComplete" );
|
||||
|
||||
%client.spawnProperties = "position =\""@ getWords(%client.spawnLocation,0,2) @"\";" @ %client.spawnProperties;
|
||||
|
||||
// Spawn with the engine's Sim::spawnObject() function
|
||||
%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))
|
||||
error("Failed to spawn player object!");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue