mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-17 11:00:38 +02:00
Removed legacy AAS from Doom, cleaned up naming.
This commit is contained in:
@@ -166,10 +166,10 @@ void rvmBot::Spawn( void )
|
||||
|
||||
botName = "dark";// spawnArgs.GetString("botname");
|
||||
|
||||
aas = gameLocal.GetBotAAS();
|
||||
aas = gameLocal.GetBotNAV();
|
||||
if( aas == NULL )
|
||||
{
|
||||
gameLocal.Error( "Missing AAS\n" );
|
||||
gameLocal.Error( "Missing NAV\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ void rvmBot::ServerThink( void )
|
||||
}
|
||||
|
||||
// If the selected route is not producing movement, invalidate the current path
|
||||
// and choose a small local AAS point. This prevents repeatedly pushing into the
|
||||
// and choose a small local NAV point. This prevents repeatedly pushing into the
|
||||
// same wall or corner when the item/chase goal is stale.
|
||||
if( haveMoveGoal )
|
||||
{
|
||||
@@ -535,7 +535,7 @@ void rvmBot::PresenceTypeBoundingBox( int presencetype, idVec3& mins, idVec3& ma
|
||||
}
|
||||
else
|
||||
{
|
||||
//botimport.Print(PRT_FATAL, "AAS_PresenceTypeBoundingBox: unknown presence type\n");
|
||||
//botimport.Print(PRT_FATAL, "NAV_PresenceTypeBoundingBox: unknown presence type\n");
|
||||
index = 2;
|
||||
}
|
||||
mins = boxmins[index];
|
||||
|
||||
@@ -142,11 +142,11 @@ class rvmBotAIBotActionBase;
|
||||
#define BLERR_NOERROR 0 //no error
|
||||
#define BLERR_LIBRARYNOTSETUP 1 //library not setup
|
||||
#define BLERR_INVALIDENTITYNUMBER 2 //invalid entity number
|
||||
#define BLERR_NOAASFILE 3 //no AAS file available
|
||||
#define BLERR_CANNOTOPENAASFILE 4 //cannot open AAS file
|
||||
#define BLERR_WRONGAASFILEID 5 //incorrect AAS file id
|
||||
#define BLERR_WRONGAASFILEVERSION 6 //incorrect AAS file version
|
||||
#define BLERR_CANNOTREADAASLUMP 7 //cannot read AAS file lump
|
||||
#define BLERR_NONAVFILE 3 //no NAV file available
|
||||
#define BLERR_CANNOTOPENNAVFILE 4 //cannot open NAV file
|
||||
#define BLERR_WRONGNAVFILEID 5 //incorrect NAV file id
|
||||
#define BLERR_WRONGNAVFILEVERSION 6 //incorrect NAV file version
|
||||
#define BLERR_CANNOTREADNAVLUMP 7 //cannot read NAV file lump
|
||||
#define BLERR_CANNOTLOADICHAT 8 //cannot load initial chats
|
||||
#define BLERR_CANNOTLOADITEMWEIGHTS 9 //cannot load item weights
|
||||
#define BLERR_CANNOTLOADITEMCONFIG 10 //cannot load item config
|
||||
@@ -688,7 +688,7 @@ void BotInitLevelItems( void );
|
||||
|
||||
void BotChooseWeapon( bot_state_t* bs );
|
||||
|
||||
inline float AAS_Time()
|
||||
inline float NAV_Time()
|
||||
{
|
||||
return floattime;
|
||||
}
|
||||
@@ -928,7 +928,7 @@ private:
|
||||
stateResult_t state_SeekLTG(stateParms_t* parms);
|
||||
stateResult_t state_Attacked(stateParms_t* parms);
|
||||
private:
|
||||
idAAS* aas;
|
||||
idNAV* aas;
|
||||
};
|
||||
|
||||
extern idCVar bot_skill;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#pragma hdrstop
|
||||
#include "precompiled.h"
|
||||
#include "../Game_local.h"
|
||||
#include "../ai/AASCallback_FindCoverArea.h"
|
||||
#include "../ai/NAVCallback_FindCoverArea.h"
|
||||
|
||||
#define IDEAL_ATTACKDIST 140
|
||||
|
||||
@@ -1106,7 +1106,7 @@ rvmBot::BotGetRandomPointNearPosition
|
||||
void rvmBot::BotGetRandomPointNearPosition(const idVec3 point, idVec3& randomPoint, float radius) {
|
||||
randomPoint = point;
|
||||
|
||||
idAAS* aas = this->aas;
|
||||
idNAV* aas = this->aas;
|
||||
if (!aas) {
|
||||
return;
|
||||
}
|
||||
@@ -1207,7 +1207,7 @@ void rvmBot::MoveToCoverPoint(void)
|
||||
aasGoal_t goal;
|
||||
aasObstacle_t obstacles[10];
|
||||
idVec3 origin = GetOrigin();
|
||||
idAAS* aas = gameLocal.GetBotAAS();
|
||||
idNAV* aas = gameLocal.GetBotNAV();
|
||||
if (aas == NULL)
|
||||
{
|
||||
return;
|
||||
@@ -1234,7 +1234,7 @@ void rvmBot::MoveToCoverPoint(void)
|
||||
obstacles[0].absBounds = idBounds(target).Expand(16);
|
||||
numObstacles = 1;
|
||||
|
||||
idAASCallback_FindCoverArea findCover(target);
|
||||
idNAVCallback_FindCoverArea findCover(target);
|
||||
if (aas->FindNearestGoal(goal, areaNum, origin, target, TFL_WALK | TFL_AIR, obstacles, numObstacles, findCover))
|
||||
{
|
||||
bs.currentGoal.origin = goal.origin;
|
||||
|
||||
@@ -725,7 +725,7 @@ void idBotGoalManager::InitLevelItems( void )
|
||||
// }
|
||||
//}
|
||||
|
||||
//for (ent = AAS_NextBSPEntity(0); ent; ent = AAS_NextBSPEntity(ent))
|
||||
//for (ent = NAV_NextBSPEntity(0); ent; ent = NAV_NextBSPEntity(ent))
|
||||
for( int idx = 0; idx < gameLocal.num_entities; idx++ )
|
||||
{
|
||||
if( gameLocal.entities[idx] == NULL )
|
||||
@@ -764,16 +764,16 @@ void idBotGoalManager::InitLevelItems( void )
|
||||
//if (spawnflags & 1)
|
||||
//{
|
||||
// //if the item is not floating in water
|
||||
// if (!(AAS_PointContents(origin) & CONTENTS_WATER))
|
||||
// if (!(NAV_PointContents(origin) & CONTENTS_WATER))
|
||||
// {
|
||||
// VectorCopy(origin, end);
|
||||
// end[2] -= 32;
|
||||
// trace = AAS_Trace(origin, ic->iteminfo[i].mins, ic->iteminfo[i].maxs, end, -1, CONTENTS_SOLID | CONTENTS_PLAYERCLIP);
|
||||
// trace = NAV_Trace(origin, ic->iteminfo[i].mins, ic->iteminfo[i].maxs, end, -1, CONTENTS_SOLID | CONTENTS_PLAYERCLIP);
|
||||
// //if the item not near the ground
|
||||
// if (trace.fraction >= 1)
|
||||
// {
|
||||
// //if the item is not reachable from a jumppad
|
||||
// goalareanum = AAS_BestReachableFromJumpPadArea(origin, ic->iteminfo[i].mins, ic->iteminfo[i].maxs);
|
||||
// goalareanum = NAV_BestReachableFromJumpPadArea(origin, ic->iteminfo[i].mins, ic->iteminfo[i].maxs);
|
||||
// Log_Write("item %s reachable from jumppad area %d\r\n", ic->iteminfo[i].classname, goalareanum);
|
||||
// //G_Printf( "item %s reachable from jumppad area %d\r\n", ic->iteminfo[i].classname, goalareanum);
|
||||
// if (!goalareanum) continue;
|
||||
@@ -814,14 +814,14 @@ void idBotGoalManager::InitLevelItems( void )
|
||||
if( classname == "item_botroam" )
|
||||
{
|
||||
li->flags |= IFL_ROAM;
|
||||
//AAS_FloatForBSPEpairKey(ent, "weight", &li->weight);
|
||||
//NAV_FloatForBSPEpairKey(ent, "weight", &li->weight);
|
||||
li->weight = ent->GetFloat( "weight" );
|
||||
}
|
||||
|
||||
////if not a stationary item
|
||||
//if (!(spawnflags & 1))
|
||||
//{
|
||||
// if (!AAS_DropToFloor(origin, ic->iteminfo[i].mins, ic->iteminfo[i].maxs))
|
||||
// if (!NAV_DropToFloor(origin, ic->iteminfo[i].mins, ic->iteminfo[i].maxs))
|
||||
// {
|
||||
// G_Printf( "%s in solid at (%1.1f %1.1f %1.1f)\n",
|
||||
// classname, origin[0], origin[1], origin[2]);
|
||||
@@ -910,7 +910,7 @@ void idBotGoalManager::BotDumpAvoidGoals( int goalstate )
|
||||
{
|
||||
BotGoalName( gs->avoidgoals[i], name, 32 );
|
||||
//Log_Write("avoid goal %s, number %d for %f seconds", name,
|
||||
// gs->avoidgoals[i], gs->avoidgoaltimes[i] - AAS_Time());
|
||||
// gs->avoidgoals[i], gs->avoidgoaltimes[i] - NAV_Time());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1223,7 +1223,7 @@ void idBotGoalManager::BotFindEntityForLevelItem( levelitem_t* li )
|
||||
|
||||
// jmarshall - eval moving objects
|
||||
//get info about the entity
|
||||
//AAS_EntityInfo(ent, &entinfo);
|
||||
//NAV_EntityInfo(ent, &entinfo);
|
||||
//if the entity is still moving
|
||||
//if (entinfo.origin[0] != entinfo.lastvisorigin[0] ||
|
||||
// entinfo.origin[1] != entinfo.lastvisorigin[1] ||
|
||||
@@ -1306,7 +1306,7 @@ void idBotGoalManager::UpdateEntityItems( void )
|
||||
}
|
||||
// jmarshall - eval floating items.
|
||||
////get info about the entity
|
||||
//AAS_EntityInfo(ent, &entinfo);
|
||||
//NAV_EntityInfo(ent, &entinfo);
|
||||
////FIXME: don't do this
|
||||
////skip all floating items for now
|
||||
////if (entinfo.groundent != ENTITYNUM_WORLD) continue;
|
||||
@@ -1339,7 +1339,7 @@ void idBotGoalManager::UpdateEntityItems( void )
|
||||
//{
|
||||
// VectorCopy(entinfo.origin, li->origin);
|
||||
// //also update the goal area number
|
||||
// li->goalareanum = AAS_BestReachableArea(li->origin,
|
||||
// li->goalareanum = NAV_BestReachableArea(li->origin,
|
||||
// ic->iteminfo[li->iteminfo].mins, ic->iteminfo[li->iteminfo].maxs,
|
||||
// li->goalorigin);
|
||||
//} //end if
|
||||
@@ -1401,7 +1401,7 @@ void idBotGoalManager::UpdateEntityItems( void )
|
||||
// //update the level item origin
|
||||
// VectorCopy(ent->r.currentOrigin, li->origin);
|
||||
// //also update the goal area number
|
||||
// li->goalareanum = AAS_BestReachableArea(li->origin,
|
||||
// li->goalareanum = NAV_BestReachableArea(li->origin,
|
||||
// ic->iteminfo[li->iteminfo].mins, ic->iteminfo[li->iteminfo].maxs,
|
||||
// li->goalorigin);
|
||||
//} //end if
|
||||
@@ -1455,11 +1455,11 @@ void idBotGoalManager::UpdateEntityItems( void )
|
||||
|
||||
// jmarshall - fix this, bots, jump pads, and droppable items, bad combo.
|
||||
//get the item goal area and goal origin
|
||||
//li->goalareanum = AAS_BestReachableArea(li->origin,
|
||||
//li->goalareanum = NAV_BestReachableArea(li->origin,
|
||||
// ic->iteminfo[i].mins, ic->iteminfo[i].maxs,
|
||||
// li->goalorigin);
|
||||
////never go for items dropped into jumppads
|
||||
//if (AAS_AreaJumpPad(li->goalareanum))
|
||||
//if (NAV_AreaJumpPad(li->goalareanum))
|
||||
//{
|
||||
// FreeLevelItem(li);
|
||||
// continue;
|
||||
@@ -1635,7 +1635,7 @@ int idBotGoalManager::BotChooseLTGItem( int goalstate, idVec3 origin, int* inven
|
||||
//get the area the bot is in
|
||||
//areanum = BotReachabilityArea(origin, gs->client);
|
||||
//if the bot is in solid or if the area the bot is in has no reachability links
|
||||
//if (!areanum || !AAS_AreaReachability(areanum))
|
||||
//if (!areanum || !NAV_AreaReachability(areanum))
|
||||
//{
|
||||
// //use the last valid area the bot was in
|
||||
// areanum = gs->lastreachabilityarea;
|
||||
@@ -1729,7 +1729,7 @@ int idBotGoalManager::BotChooseLTGItem( int goalstate, idVec3 origin, int* inven
|
||||
{
|
||||
//get the travel time towards the goal area
|
||||
// jmarshall
|
||||
//t = AAS_AreaTravelTimeToGoalArea(areanum, origin, li->goalareanum, travelflags);
|
||||
//t = NAV_AreaTravelTimeToGoalArea(areanum, origin, li->goalareanum, travelflags);
|
||||
t = gameLocal.TravelTimeToGoal( origin, li->goalorigin );
|
||||
// jmarshall end
|
||||
|
||||
@@ -1759,9 +1759,9 @@ int idBotGoalManager::BotChooseLTGItem( int goalstate, idVec3 origin, int* inven
|
||||
{
|
||||
/*
|
||||
//if not in lava or slime
|
||||
if (!AAS_AreaLava(areanum) && !AAS_AreaSlime(areanum))
|
||||
if (!NAV_AreaLava(areanum) && !NAV_AreaSlime(areanum))
|
||||
{
|
||||
if (AAS_RandomGoalArea(areanum, travelflags, &goal.areanum, goal.origin))
|
||||
if (NAV_RandomGoalArea(areanum, travelflags, &goal.areanum, goal.origin))
|
||||
{
|
||||
VectorSet(goal.mins, -15, -15, -15);
|
||||
VectorSet(goal.maxs, 15, 15, 15);
|
||||
@@ -1856,7 +1856,7 @@ int idBotGoalManager::BotChooseNBGItem( int goalstate, idVec3 origin, int* inven
|
||||
areanum = 1; // BotReachabilityArea(origin, gs->client);
|
||||
// jmarshall end
|
||||
//if the bot is in solid or if the area the bot is in has no reachability links
|
||||
//if (!areanum || !AAS_AreaReachability(areanum))
|
||||
//if (!areanum || !NAV_AreaReachability(areanum))
|
||||
//{
|
||||
// //use the last valid area the bot was in
|
||||
// areanum = gs->lastreachabilityarea;
|
||||
@@ -1871,7 +1871,7 @@ int idBotGoalManager::BotChooseNBGItem( int goalstate, idVec3 origin, int* inven
|
||||
// jmarshall
|
||||
if( ltg )
|
||||
{
|
||||
//ltg_time = AAS_AreaTravelTimeToGoalArea(areanum, origin, ltg->areanum, travelflags);
|
||||
//ltg_time = NAV_AreaTravelTimeToGoalArea(areanum, origin, ltg->areanum, travelflags);
|
||||
ltg_time = gameLocal.TravelTimeToGoal( origin, ltg->origin );
|
||||
}
|
||||
else
|
||||
@@ -1962,7 +1962,7 @@ int idBotGoalManager::BotChooseNBGItem( int goalstate, idVec3 origin, int* inven
|
||||
if( weight > 0 )
|
||||
{
|
||||
//get the travel time towards the goal area
|
||||
//t = AAS_AreaTravelTimeToGoalArea(areanum, origin, li->goalareanum, travelflags);
|
||||
//t = NAV_AreaTravelTimeToGoalArea(areanum, origin, li->goalareanum, travelflags);
|
||||
t = gameLocal.TravelTimeToGoal( origin, li->goalorigin );
|
||||
|
||||
//if the goal is reachable
|
||||
@@ -1984,7 +1984,7 @@ int idBotGoalManager::BotChooseNBGItem( int goalstate, idVec3 origin, int* inven
|
||||
{
|
||||
//get the travel time from the goal to the long term goal
|
||||
// jmarshall
|
||||
//t = AAS_AreaTravelTimeToGoalArea(li->goalareanum, li->goalorigin, ltg->areanum, travelflags);
|
||||
//t = NAV_AreaTravelTimeToGoalArea(li->goalareanum, li->goalorigin, ltg->areanum, travelflags);
|
||||
t = gameLocal.TravelTimeToGoal( li->goalorigin, ltg->origin );
|
||||
// jmarshall end
|
||||
} //end if
|
||||
@@ -2121,11 +2121,11 @@ int idBotGoalManager::BotItemGoalInVisButNotVisible( int viewer, idVec3 eye, idA
|
||||
// jmarshall - time delay thing here?
|
||||
//
|
||||
//if the entity data isn't valid
|
||||
//AAS_EntityInfo(goal->entitynum, &entinfo);
|
||||
//NAV_EntityInfo(goal->entitynum, &entinfo);
|
||||
//NOTE: for some wacko reason entities are sometimes
|
||||
// not updated
|
||||
//if (!entinfo.valid) return qtrue;
|
||||
//if (entinfo.ltime < AAS_Time() - 0.5)
|
||||
//if (entinfo.ltime < NAV_Time() - 0.5)
|
||||
// return qtrue;
|
||||
// jmarshall end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user