mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-04-16 06:22:27 +03:00
Bots: safe check for DoorActivator (#441)
This commit is contained in:
parent
49965644c3
commit
a9ba748eef
@ -510,10 +510,15 @@ void CBaseDoor::DoorGoUp()
|
|||||||
|
|
||||||
if (TheBots)
|
if (TheBots)
|
||||||
{
|
{
|
||||||
|
#ifdef REGAMEDLL_FIXES
|
||||||
|
if (m_hActivator && m_hActivator->IsPlayer())
|
||||||
|
#endif
|
||||||
|
{
|
||||||
TheBots->OnEvent(EVENT_DOOR, m_hActivator);
|
TheBots->OnEvent(EVENT_DOOR, m_hActivator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_toggle_state = TS_GOING_UP;
|
m_toggle_state = TS_GOING_UP;
|
||||||
|
|
||||||
@ -680,10 +685,15 @@ void CBaseDoor::DoorGoDown()
|
|||||||
|
|
||||||
if (TheBots)
|
if (TheBots)
|
||||||
{
|
{
|
||||||
|
#ifdef REGAMEDLL_FIXES
|
||||||
|
if (m_hActivator && m_hActivator->IsPlayer())
|
||||||
|
#endif
|
||||||
|
{
|
||||||
TheBots->OnEvent(EVENT_DOOR, m_hActivator);
|
TheBots->OnEvent(EVENT_DOOR, m_hActivator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DOOR_ASSERT
|
#ifdef DOOR_ASSERT
|
||||||
assert(m_toggle_state == TS_AT_TOP);
|
assert(m_toggle_state == TS_AT_TOP);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user