aiInfo getPosition now optionally takes a doCastray bool (off by default)

AIFlyingVehicleControllerData add flightfloor and cieling
resolvepitch from (portions of) the old aiflyingvehicle resource
no reversing for flyingvehicles, so bottom out resolvespeed at 0
This commit is contained in:
AzaezelX 2025-04-21 19:13:31 -05:00
parent 6200a6f1fb
commit 584093f48d
5 changed files with 96 additions and 21 deletions

View file

@ -134,11 +134,11 @@ void AINavigation::repath()
else
{
// If we're following, get their position.
mPathData.path->mTo = getCtrl()->getGoal()->getPosition();
mPathData.path->mTo = getCtrl()->getGoal()->getPosition(true);
}
// Update from position and replan.
mPathData.path->mFrom = getCtrl()->getAIInfo()->getPosition();
mPathData.path->mFrom = getCtrl()->getAIInfo()->getPosition(true);
mPathData.path->plan();
// Move to first node (skip start pos).
@ -215,8 +215,8 @@ bool AINavigation::setPathDestination(const Point3F& pos, bool replace)
NavPath* path = new NavPath();
path->mMesh = mNavMesh;
path->mFrom = getCtrl()->getAIInfo()->getPosition();
path->mTo = getCtrl()->getGoal()->getPosition();
path->mFrom = getCtrl()->getAIInfo()->getPosition(true);
path->mTo = getCtrl()->getGoal()->getPosition(true);
path->mFromSet = path->mToSet = true;
path->mAlwaysRender = true;
path->mLinkTypes = getCtrl()->mControllerData->mLinkTypes;
@ -257,7 +257,7 @@ void AINavigation::followObject()
if (getCtrl()->getGoal()->getDist() < getCtrl()->mControllerData->mMoveTolerance)
return;
if (setPathDestination(getCtrl()->getGoal()->getPosition()))
if (setPathDestination(getCtrl()->getGoal()->getPosition(true)))
{
getCtrl()->clearCover();
}