Mercurial > mm7
diff mm7_5.cpp @ 1060:b79139c3b5c8
some AI cleaning
author | zipi |
---|---|
date | Thu, 23 May 2013 20:51:27 +0100 |
parents | 37498d2cceed |
children | 9c7eb4037567 |
line wrap: on
line diff
--- a/mm7_5.cpp Fri May 24 00:53:48 2013 +0600 +++ b/mm7_5.cpp Thu May 23 20:51:27 2013 +0100 @@ -4672,7 +4672,7 @@ } if ( pMonster->sCurrentHP > 0 ) { - Actor::Stun(uActorID_Monster_, a1, 0); + Actor::AI_Stun(uActorID_Monster_, a1, 0); Actor::AggroSurroundingPeasants(uActorID_Monster_, 1); if ( bShowDamage ) { @@ -5007,7 +5007,7 @@ { if ( v7->sCurrentHP >= 1 ) { - Actor::Stun(uActorID, PID(OBJECT_Player,a4), 0); + Actor::AI_Stun(uActorID, PID(OBJECT_Player,a4), 0); Actor::AggroSurroundingPeasants(uActorID, 1); } else @@ -5193,7 +5193,7 @@ { if ( v44->sCurrentHP >= 1 ) { - Actor::Stun(uActorID, PID(OBJECT_Player,a4), 0); + Actor::AI_Stun(uActorID, PID(OBJECT_Player,a4), 0); Actor::AggroSurroundingPeasants(uActorID, 1); } else @@ -5459,7 +5459,7 @@ if ( v7 ) { if ( pActor->sCurrentHP > 0 ) - Actor::Stun(uActorIDa, a2, 0); + Actor::AI_Stun(uActorIDa, a2, 0); else Actor::Die(uActorIDa); a2a = 20 * v7 / (signed int)pActor->pMonsterInfo.uHP; @@ -5478,7 +5478,7 @@ } else { - Actor::Stun(uActorIDa, a2, 0); + Actor::AI_Stun(uActorIDa, a2, 0); } } } @@ -5567,7 +5567,7 @@ if ( v14 ) { if ( v7->sCurrentHP > 0 ) - Actor::Stun(uActorID, v17, 0); + Actor::AI_Stun(uActorID, v17, 0); else Actor::Die(uActorID); Actor::AggroSurroundingPeasants(uActorID, 0); @@ -5587,7 +5587,7 @@ } else { - Actor::Stun(uActorID, v17, 0); + Actor::AI_Stun(uActorID, v17, 0); } return; } @@ -6884,7 +6884,7 @@ v22 = 2; v17 = v5->pMonsterInfo.uSpell1ID; } - Actor::SpellAttack(v4, &a4, v17, v22, v24); + Actor::AI_SpellAttack(v4, &a4, v17, v22, v24); LABEL_25: v16 = a2a; v23 = &a4; @@ -6900,7 +6900,7 @@ v18 = v5->pMonsterInfo.uMissleAttack1Type; v25 = 0; } - Actor::RangedAttack(v4, &a4, v18, v25); + Actor::AI_RangedAttack(v4, &a4, v18, v25); goto LABEL_25; } } @@ -7015,7 +7015,7 @@ { if ( v5->pMonsterInfo.uMissleAttack2Type ) { - Actor::MissileAttack2(v13, v22, &v18); + Actor::AI_MissileAttack2(v13, v22, &v18); goto LABEL_43; } } @@ -7030,16 +7030,16 @@ if ( v15 ) { if ( v14 == 2 ) - Actor::SpellAttack1(v13, v22, &v18); + Actor::AI_SpellAttack1(v13, v22, &v18); else - Actor::SpellAttack2(v13, v22, &v18); + Actor::AI_SpellAttack2(v13, v22, &v18); goto LABEL_43; } goto LABEL_44; } if ( v5->pMonsterInfo.uMissleAttack1Type ) { - Actor::MissileAttack1(v13, v22, &v18); + Actor::AI_MissileAttack1(v13, v22, &v18); LABEL_43: //v3 = v21; v21->field_C = 1; @@ -7052,7 +7052,7 @@ LABEL_44: if ( (double)(signed int)v20 < 307.2 ) { - Actor::MeleeAttack(v13, v22, &v18); + Actor::AI_MeleeAttack(v13, v22, &v18); //v3 = v21; v21->field_C = 3; goto LABEL_48; @@ -7331,12 +7331,12 @@ { if ( (signed int)v11 < 10240 ) { - Actor::Flee(uActorID, a2a, 0, &pDir); + Actor::AI_Flee(uActorID, a2a, 0, &pDir); v29->field_C = 4; v29->uActionLength = actor->uCurrentActionLength; return 1; } - Actor::_4032B2(uActorID, a2a, 1024, 0); + Actor::AI_4032B2(uActorID, a2a, 1024, 0); v29->field_C = 2; v29->uActionLength = actor->uCurrentActionLength; return 1; @@ -7354,7 +7354,7 @@ v29->uActionLength = actor->uCurrentActionLength; return 1; } - Actor::Flee(uActorID, a2a, 32, 0); + Actor::AI_Flee(uActorID, a2a, 32, 0); v29->field_C = 4; v29->uActionLength = actor->uCurrentActionLength; return 1; @@ -7373,7 +7373,7 @@ v29->uActionLength = actor->uCurrentActionLength; return 1; } - Actor::Flee(uActorID, a2a, 32, 0); + Actor::AI_Flee(uActorID, a2a, 32, 0); v29->field_C = 4; v29->uActionLength = actor->uCurrentActionLength; return 1; @@ -7394,7 +7394,7 @@ v29->uActionLength = actor->uCurrentActionLength; return 1; } - Actor::Flee(uActorID, a2a, 32, 0); + Actor::AI_Flee(uActorID, a2a, 32, 0); v29->field_C = 4; v29->uActionLength = actor->uCurrentActionLength; return 1; @@ -7408,9 +7408,9 @@ if ( (signed int)v11 < 5120 ) { if ( actor->pMonsterInfo.uMissleAttack1Type && (signed int)v11 < 1024 ) - Actor::Pursue1(uActorID, a2a, uActorID, 32, &pDir); + Actor::AI_Pursue1(uActorID, a2a, uActorID, 32, &pDir); else - Actor::Pursue2(uActorID, a2a, 32, &pDir, 307); + Actor::AI_Pursue2(uActorID, a2a, 32, &pDir, 307); v29->field_C = 2; v29->uActionLength = actor->uCurrentActionLength; return 1; @@ -7418,28 +7418,28 @@ LABEL_46: if ( !actor->pMonsterInfo.uMovementType ) { - Actor::_4032B2(uActorID, a2a, 1024, 32); + Actor::AI_4032B2(uActorID, a2a, 1024, 32); v29->field_C = 2; v29->uActionLength = actor->uCurrentActionLength; return 1; } if ( actor->pMonsterInfo.uMovementType == 1 ) { - Actor::_4032B2(uActorID, a2a, 2560, 32); + Actor::AI_4032B2(uActorID, a2a, 2560, 32); v29->field_C = 2; v29->uActionLength = actor->uCurrentActionLength; return 1; } if ( actor->pMonsterInfo.uMovementType == 2 ) { - Actor::_4032B2(uActorID, a2a, 5120, 32); + Actor::AI_4032B2(uActorID, a2a, 5120, 32); v29->field_C = 2; v29->uActionLength = actor->uCurrentActionLength; return 1; } if ( actor->pMonsterInfo.uMovementType == 4 ) { - Actor::_4032B2(uActorID, a2a, 10240, 32); + Actor::AI_4032B2(uActorID, a2a, 10240, 32); v29->field_C = 2; v29->uActionLength = actor->uCurrentActionLength; return 1;