| 1784 | } |
| 1785 | |
| 1786 | S32 zNPCGoalAlertTarTar::NPCMessage(NPCMsg* mail) |
| 1787 | { |
| 1788 | S32 snarfed = 1; |
| 1789 | zNPCRobot* npc = (zNPCRobot*)(psyche->clt_owner); |
| 1790 | xPsyche* psy = GetPsyche(); |
| 1791 | switch (mail->msgid) |
| 1792 | { |
| 1793 | case NPC_MID_DAMAGE: |
| 1794 | if ((psy->GIDInStack(NPC_GOAL_WOUND) != NULL) || (psy->GIDOfPending() == NPC_GOAL_WOUND)) |
| 1795 | { |
| 1796 | break; |
| 1797 | } |
| 1798 | |
| 1799 | if ((npc->hitpoints > 1) && (mail->infotype == NPC_MDAT_DAMAGE)) |
| 1800 | { |
| 1801 | if ((mail->dmgdata.dmg_type == DMGTYP_SIDE) || |
| 1802 | (mail->dmgdata.dmg_type == DMGTYP_HITBYTOSS)) |
| 1803 | { |
| 1804 | alerttart = TARTAR_ALERT_READY; |
| 1805 | flg_info |= 2; |
| 1806 | psy->GoalPush(NPC_GOAL_WOUND, 0); |
| 1807 | break; |
| 1808 | } |
| 1809 | } |
| 1810 | |
| 1811 | snarfed = 0; |
| 1812 | break; |
| 1813 | default: |
| 1814 | snarfed = 0; |
| 1815 | break; |
| 1816 | } |
| 1817 | return snarfed; |
| 1818 | } |
| 1819 | |
| 1820 | void zNPCGoalAlertTarTar::GetInArena(F32 dt) |
| 1821 | { |
nothing calls this directly
no test coverage detected