mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-27 07:15:37 +00:00
more safeties. simplified reverse steering calc
This commit is contained in:
parent
712404c9b4
commit
d36cf31707
4 changed files with 14 additions and 20 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue