mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 15:15:39 +03:00
Fixed m_looseBombArea assertion
This commit is contained in:
parent
b34d564e3c
commit
aec3ba2579
@ -1452,7 +1452,7 @@ void CCSBotManager::SetLooseBomb(CBaseEntity *bomb)
|
||||
if (bomb)
|
||||
{
|
||||
m_looseBombArea = TheNavAreaGrid.GetNearestNavArea(&bomb->pev->origin);
|
||||
DbgAssert(m_looseBombArea); // TODO: Need investigation and find out why it cannot find nearest area for a lost bomb, just catch it
|
||||
DbgAssert(!TheNavAreaGrid.IsValid() || m_looseBombArea); // TODO: Need investigation and find out why it cannot find nearest area for a lost bomb, just catch it
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4674,6 +4674,11 @@ void CNavAreaGrid::RemoveNavArea(CNavArea *area)
|
||||
m_areaCount--;
|
||||
}
|
||||
|
||||
bool CNavAreaGrid::IsValid() const
|
||||
{
|
||||
return m_grid && m_areaCount > 0;
|
||||
}
|
||||
|
||||
// Given a position, return the nav area that IsOverlapping and is *immediately* beneath it
|
||||
CNavArea *CNavAreaGrid::GetNavArea(const Vector *pos, float beneathLimit) const
|
||||
{
|
||||
|
@ -503,6 +503,7 @@ public:
|
||||
CNavArea *GetNavAreaByID(unsigned int id) const;
|
||||
CNavArea *GetNearestNavArea(const Vector *pos, bool anyZ = false) const;
|
||||
|
||||
bool IsValid() const;
|
||||
Place GetPlace(const Vector *pos) const; // return radio chatter place for given coordinate
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user