| 1462 | } |
| 1463 | |
| 1464 | void StartAttack(int pnum, int d) |
| 1465 | { |
| 1466 | if ((DWORD)pnum >= MAX_PLRS) { |
| 1467 | app_fatal("StartAttack: illegal player %d", pnum); |
| 1468 | } |
| 1469 | |
| 1470 | if (plr[pnum]._pInvincible && !plr[pnum]._pHitPoints && pnum == myplr) { |
| 1471 | SyncPlrKill(pnum, -1); |
| 1472 | return; |
| 1473 | } |
| 1474 | |
| 1475 | if (!(plr[pnum]._pGFXLoad & PFILE_ATTACK)) { |
| 1476 | LoadPlrGFX(pnum, PFILE_ATTACK); |
| 1477 | } |
| 1478 | |
| 1479 | NewPlrAnim(pnum, plr[pnum]._pAAnim[d], plr[pnum]._pAFrames, 0, plr[pnum]._pAWidth); |
| 1480 | plr[pnum]._pmode = PM_ATTACK; |
| 1481 | FixPlayerLocation(pnum, d); |
| 1482 | SetPlayerOld(pnum); |
| 1483 | } |
| 1484 | |
| 1485 | void StartRangeAttack(int pnum, int d, int cx, int cy) |
| 1486 | { |
no test coverage detected