Merge remote-tracking branch 'upstream/development' into imageAsset_refactor_rev3

This commit is contained in:
marauder2k7 2025-05-12 14:45:41 +01:00
commit e1c01cd49a
152 changed files with 7312 additions and 4132 deletions

View file

@ -111,8 +111,12 @@ function handleConnectionErrorMessage(%msgType, %msgString, %msgError)
//-----------------------------------------------------------------------------
// Disconnect
//-----------------------------------------------------------------------------
function disconnect()
{
callOnModules("disconnect");
}
function Core_ClientServer::disconnect(%this)
{
// We need to stop the client side simulation
// else physics resources will not cleanup properly.
@ -158,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

@ -169,3 +169,20 @@ datablock LightAnimData( SpinLightAnim )
rotKeys[2] = "az";
rotSmooth[2] = true;
};
datablock AIPlayerControllerData( aiPlayerControl )
{
moveTolerance = 0.25; followTolerance = 1.0; mAttackRadius = 2;
};
datablock AIWheeledVehicleControllerData( aiCarControl )
{
moveTolerance = 1.0; followTolerance = 2.0; mAttackRadius = 5.0;
};
datablock AIFlyingVehicleControllerData( aiPlaneControl )
{
moveTolerance = 2.0; followTolerance = 5.0; mAttackRadius = 10.0;
FlightFloor = 15; FlightCeiling = 150;
};

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)