more safeties. simplified reverse steering calc

This commit is contained in:
AzaezelX 2025-04-18 18:27:39 -05:00
parent 712404c9b4
commit d36cf31707
4 changed files with 14 additions and 20 deletions

View file

@ -147,6 +147,7 @@ VehicleData::VehicleData()
collDamageThresholdVel = 20;
collDamageMultiplier = 0.05f;
enablePhysicsRep = true;
mControlMap = StringTable->EmptyString();
mAIControllData = NULL;
}
@ -505,16 +506,17 @@ void Vehicle::processTick(const Move* move)
{
PROFILE_SCOPE( Vehicle_ProcessTick );
ShapeBase::processTick(move);
if ( isMounted() )
return;
// If we're not being controlled by a client, let the
// AI sub-module get a chance at producing a move.
Move aiMove;
if (!move && isServerObject() && getAIMove(&aiMove))
move = &aiMove;
ShapeBase::processTick(move);
if ( isMounted() )
return;
// Warp to catch up to server
if (mDelta.warpCount < mDelta.warpTicks)
{
@ -1249,6 +1251,7 @@ bool Vehicle::setAIController(SimObjectId controller)
bool Vehicle::getAIMove(Move* move)
{
if (!isServerObject()) return false;
if (mAIController)
{
mAIController->getAIMove(move); //actual result