Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions sp/src/game/server/ai_basenpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13947,6 +13947,16 @@ bool CAI_BaseNPC::OnObstructingDoor( AILocalMoveGoal_t *pMoveGoal,
{
if ( distClear < 0.1 )
{
#ifdef MAPBASE
if ((CapabilitiesGet() & bits_CAP_AUTO_DOORS) && !pDoor->m_bLocked && !pDoor->HasSpawnFlags(SF_DOOR_NONPCS))
{
// Tell the door to open
m_flMoveWaitFinished = OpenDoorAndWait(pDoor);
*pResult = AIMR_OK;
GetNavigator()->NoteOpeningDoor();
}
else
#endif // MAPBASE
*pResult = AIMR_BLOCKED_ENTITY;
}
else
Expand Down
7 changes: 6 additions & 1 deletion sp/src/game/server/ai_navigator.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,12 @@ class CAI_Navigator : public CAI_Component,
// --------------------------------

virtual AIMoveResult_t MoveEnact( const AILocalMoveGoal_t &baseMove );


#ifdef MAPBASE
public:
void NoteOpeningDoor() { OnNewGoal(); }
#endif // MAPBASE

protected:
// made this virtual so strider can implement hover behavior with a navigator
virtual void MoveCalcBaseGoal( AILocalMoveGoal_t *pMoveGoal);
Expand Down