mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-05-09 20:18:17 +03:00
Make sure to prevent to transition to curious if curious isn't enabled (moh 2.30 feature)
This commit is contained in:
parent
cf61ae0332
commit
e850dd1963
1 changed files with 21 additions and 14 deletions
|
@ -4951,7 +4951,8 @@ void Actor::HandlePain(Event *ev)
|
|||
//FIXME: macro
|
||||
SetCuriousAnimHint(7);
|
||||
|
||||
if (m_bEnableEnemy && m_ThinkStates[THINKLEVEL_IDLE] == THINKSTATE_IDLE) {
|
||||
// m_bIsCurious check: Added in 2.30
|
||||
if (m_bEnableEnemy && m_ThinkStates[THINKLEVEL_IDLE] == THINKSTATE_IDLE && m_bIsCurious) {
|
||||
SetEnemyPos(attacker->origin);
|
||||
m_pszDebugState = "from_pain";
|
||||
SetThinkState(THINKSTATE_CURIOUS, THINKLEVEL_IDLE);
|
||||
|
@ -8213,6 +8214,11 @@ Should actor transition think state to grenade ?
|
|||
*/
|
||||
bool Actor::PassesTransitionConditions_Grenade(void)
|
||||
{
|
||||
if (!m_bIsCurious) {
|
||||
// Added in 2.30
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_bLockThinkState || !m_bEnableEnemy) {
|
||||
return false;
|
||||
}
|
||||
|
@ -9848,6 +9854,7 @@ void Actor::Grenade_EventFire(Event *ev)
|
|||
speed = dir.normalize();
|
||||
|
||||
if (g_protocol >= PROTOCOL_MOHTA_MIN) {
|
||||
// Added in 2.30
|
||||
switch (m_iNationality) {
|
||||
case ACTOR_NATIONALITY_ITALIAN:
|
||||
strGrenade = "models/projectiles/Bomba_ai.tik";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue