| 3446 | } |
| 3447 | |
| 3448 | void MAI_Cleaver(int i) |
| 3449 | { |
| 3450 | MonsterStruct *Monst; |
| 3451 | int x, y, mx, my, md; |
| 3452 | |
| 3453 | if ((DWORD)i >= MAXMONSTERS) |
| 3454 | app_fatal("MAI_Cleaver: Invalid monster %d", i); |
| 3455 | |
| 3456 | Monst = &monster[i]; |
| 3457 | if (Monst->_mmode != MM_STAND || Monst->_msquelch == 0) { |
| 3458 | return; |
| 3459 | } |
| 3460 | |
| 3461 | mx = Monst->_mx; |
| 3462 | my = Monst->_my; |
| 3463 | x = mx - Monst->_menemyx; |
| 3464 | y = my - Monst->_menemyy; |
| 3465 | |
| 3466 | md = GetDirection(mx, my, Monst->_lastx, Monst->_lasty); |
| 3467 | Monst->_mdir = md; |
| 3468 | |
| 3469 | if (abs(x) >= 2 || abs(y) >= 2) |
| 3470 | M_CallWalk(i, md); |
| 3471 | else |
| 3472 | M_StartAttack(i); |
| 3473 | |
| 3474 | if (Monst->_mmode == MM_STAND) |
| 3475 | Monst->_mAnimData = Monst->MType->Anims[MA_STAND].Data[md]; |
| 3476 | } |
| 3477 | |
| 3478 | void MAI_Round(int i, BOOL special) |
| 3479 | { |
nothing calls this directly
no test coverage detected