Merge pull request #1443 from Azaezel/alpha41/controlModel

add a controlmap entry
This commit is contained in:
Brian Roberts 2025-04-28 10:50:02 -05:00 committed by GitHub
commit 2ac15f74f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 32 additions and 3 deletions

View file

@ -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;
}

View file

@ -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)