Removed legacy AAS from Doom, cleaned up naming.

This commit is contained in:
Justin Marshall
2026-05-22 22:26:19 -07:00
parent b0788b922e
commit 164a6e1f48
53 changed files with 912 additions and 613 deletions
+23 -23
View File
@@ -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
}