Merge branch 'development' of https://github.com/TorqueGameEngines/Torque3D into aiSubsystem

# Conflicts:
#	Engine/source/T3D/player.cpp
This commit is contained in:
AzaezelX 2025-04-28 14:28:54 -05:00
commit 618ddbc9ba
60 changed files with 1751 additions and 38 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)

View file

@ -78,17 +78,15 @@ function spawnGameObject(%name, %addToScene)
return 0;
}
function GameBaseData::onNewDataBlock(%this, %obj)
function GameBaseData::onNewDataBlock(%this, %obj, %reload)
{
if (%obj.firstDataCheck)
if (%reload)
{
if(%this.isMethod("onRemove"))
%this.onRemove(%obj);
if(%this.isMethod("onAdd"))
%this.onAdd(%obj);
}
else
%obj.firstDataCheck = true;
}
function saveGameObject(%name, %tamlPath, %scriptPath)