mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 00:05:40 +00:00
Merge pull request #1443 from Azaezel/alpha41/controlModel
add a controlmap entry
This commit is contained in:
commit
2ac15f74f2
8 changed files with 32 additions and 3 deletions
|
|
@ -162,3 +162,16 @@ function disconnectedCleanup()
|
|||
|
||||
moduleExec("onDestroyClientConnection", "Game");
|
||||
}
|
||||
|
||||
function clientCmdsetMoveMap(%movemap)
|
||||
{
|
||||
if (!isObject(%movemap)) return;
|
||||
if(isObject(ServerConnection) && isObject(ServerConnection.curMoveMap))
|
||||
ServerConnection.curMoveMap.pop();
|
||||
|
||||
// clear movement
|
||||
$mvForwardAction = 0;
|
||||
$mvBackwardAction = 0;
|
||||
%movemap.push();
|
||||
ServerConnection.curMoveMap = %movemap;
|
||||
}
|
||||
|
|
@ -275,7 +275,9 @@ function GameConnection::onPostSpawn( %this )
|
|||
if (%this.numModsNeedingLoaded)
|
||||
callOnObjectList("onPostSpawn", %modulesIdList, %this);
|
||||
else
|
||||
%this.listener.onPostSpawnComplete(%this);
|
||||
%this.listener.onPostSpawnComplete(%this);
|
||||
if (isObject(%this.player.getDatablock().controlMap))
|
||||
commandToClient(%this, 'setMoveMap', %this.player.getDatablock().controlMap);
|
||||
}
|
||||
|
||||
function GameConnectionListener::onPostSpawnComplete(%this, %client)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue