Clean-up ActNpc169

This commit is contained in:
Clownacy 2019-11-17 17:53:58 +00:00
parent dabf04f8ab
commit 87f74bcb6b

View file

@ -609,7 +609,7 @@ void ActNpc169(NPCHAR *npc)
npc->direct = 2; npc->direct = 2;
// Fallthrough // Fallthrough
case 1: case 1:
if (--npc->act_wait) if (--npc->act_wait != 0)
break; break;
npc->act_no = 2; npc->act_no = 2;
@ -623,7 +623,9 @@ void ActNpc169(NPCHAR *npc)
npc->ani_wait = 0; npc->ani_wait = 0;
// Fallthrough // Fallthrough
case 3: case 3:
if (++npc->ani_wait > 3) ++npc->ani_wait;
if (npc->ani_wait > 3)
{ {
npc->ani_wait = 0; npc->ani_wait = 0;
++npc->ani_no; ++npc->ani_no;
@ -648,16 +650,16 @@ void ActNpc169(NPCHAR *npc)
DamageMyChar(5); DamageMyChar(5);
break; break;
} }
else
{ ++npc->act_wait;
if (++npc->act_wait > 75)
if (npc->act_wait > 75)
{ {
npc->act_no = 9; npc->act_no = 9;
npc->ani_no = 0; npc->ani_no = 0;
break; break;
} }
else
{
if (npc->flag & 5) if (npc->flag & 5)
{ {
if (npc->count2 < 5) if (npc->count2 < 5)
@ -686,10 +688,6 @@ void ActNpc169(NPCHAR *npc)
break; break;
} }
break;
}
}
break; break;
case 4: case 4:
@ -752,7 +750,9 @@ void ActNpc169(NPCHAR *npc)
gMC.x = npc->x; gMC.x = npc->x;
gMC.y = npc->y; gMC.y = npc->y;
if (++npc->ani_wait > 2) ++npc->ani_wait;
if (npc->ani_wait > 2)
{ {
npc->ani_wait = 0; npc->ani_wait = 0;
++npc->ani_no; ++npc->ani_no;
@ -761,7 +761,9 @@ void ActNpc169(NPCHAR *npc)
if (npc->ani_no > 6) if (npc->ani_no > 6)
npc->ani_no = 5; npc->ani_no = 5;
if (++npc->act_wait > 100) ++npc->act_wait;
if (npc->act_wait > 100)
npc->act_no = 20; npc->act_no = 20;
break; break;
@ -794,7 +796,9 @@ void ActNpc169(NPCHAR *npc)
npc->ani_no = 7; npc->ani_no = 7;
// Fallthrough // Fallthrough
case 21: case 21:
if (++npc->act_wait < 50) ++npc->act_wait;
if (npc->act_wait < 50)
break; break;
npc->act_no = 0; npc->act_no = 0;