Skip to content

Commit

Permalink
galak mech uses old nav functions
Browse files Browse the repository at this point in the history
  • Loading branch information
TwelveEyes committed Jun 24, 2024
1 parent b19840e commit 4b88084
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
34 changes: 17 additions & 17 deletions code/game/AI_GalakBoss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,24 +387,24 @@ static qboolean GM_Move( void )
NPCInfo->combatMove = qtrue;//always move straight toward our goal

qboolean moved = NPC_MoveToGoal( qtrue );
// navInfo_t info;

// //Get the move info
// NAV_GetLastMove( info );

// //FIXME: if we bump into another one of our guys and can't get around him, just stop!
// //If we hit our target, then stop and fire!
// if ( info.flags & NIF_COLLISION )
// {
// if ( info.blocker == NPC->enemy )
// {
// GM_HoldPosition();
// }
// }
if (NPCInfo->blockedEntity && NPCInfo->blockedEntity == NPC->enemy)
navInfo_t info;

//Get the move info
NAV_GetLastMove( info );

//FIXME: if we bump into another one of our guys and can't get around him, just stop!
//If we hit our target, then stop and fire!
if ( info.flags & NIF_COLLISION )
{
GM_HoldPosition();
if ( info.blocker == NPC->enemy )
{
GM_HoldPosition();
}
}
/* if (NPCInfo->blockedEntity && NPCInfo->blockedEntity == NPC->enemy)
{
GM_HoldPosition();
} */

//If our move failed, then reset
if ( moved == qfalse )
Expand Down Expand Up @@ -459,7 +459,7 @@ static void GM_CheckMoveState( void )
if ( ( NPCInfo->goalEntity != NPC->enemy ) && ( NPCInfo->goalEntity != NULL ) )
{
//Did we make it?
if ( STEER::Reached(NPC, NPCInfo->goalEntity, 16, qfalse) ||
if ( /* STEER::Reached(NPC, NPCInfo->goalEntity, 16, qfalse) */ NAV_HitNavGoal( NPC->currentOrigin, NPC->mins, NPC->maxs, NPCInfo->goalEntity->currentOrigin, 16, qfalse ) ||
( !Q3_TaskIDPending( NPC, TID_MOVE_NAV ) && enemyLOS && enemyDist <= 10000 ) )
{//either hit our navgoal or our navgoal was not a crucial (scripted) one (maybe a combat point) and we're scouting and found our enemy
NPC_ReachedGoal();
Expand Down
3 changes: 2 additions & 1 deletion code/game/b_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ extern int NPC_FindSquadPoint( vec3_t position );
extern void ClearPlayerAlertEvents( void );

extern qboolean G_BoundsOverlap(const vec3_t mins1, const vec3_t maxs1, const vec3_t mins2, const vec3_t maxs2);
extern qboolean NAV_HitNavGoal( vec3_t point, vec3_t mins, vec3_t maxs, vec3_t dest, int radius, qboolean flying );

extern void NPC_SetMoveGoal( gentity_t *ent, vec3_t point, int radius, qboolean isNavGoal = qfalse, int combatPoint = -1, gentity_t *targetEnt = NULL );

Expand Down Expand Up @@ -359,7 +360,7 @@ typedef struct navInfo_s
int flags;
} navInfo_t;


extern void NAV_GetLastMove( navInfo_t &info );


#endif

0 comments on commit 4b88084

Please sign in to comment.