mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
add a controlmap entry
for players, vehicles, and turret datablocks add a client command to setMovemap(%object.getDatablock().controlMap)
This commit is contained in:
parent
a996c09b04
commit
5b2c0c7703
8 changed files with 32 additions and 3 deletions
|
|
@ -158,3 +158,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