| 89 | } |
| 90 | |
| 91 | void zNPCGoalDuploLive::CheckPlayer() |
| 92 | { |
| 93 | zNPCDuplotron* npc = (zNPCDuplotron*)psyche->clt_owner; |
| 94 | |
| 95 | tmr_chkPlyrDist = 0.25f * (xurand() - 0.5f) + 1.0f; |
| 96 | |
| 97 | U32 curid = npc->AnimCurStateID(); |
| 98 | |
| 99 | if (curid == g_hash_dupoanim[2]) |
| 100 | { |
| 101 | return; |
| 102 | } |
| 103 | |
| 104 | xVec3 v; |
| 105 | xVec3Sub(&v, xEntGetPos(&globals.player.ent), xEntGetPos(npc)); |
| 106 | |
| 107 | F32 len = xVec3Length2(&v); |
| 108 | |
| 109 | if (len > SQ(npc->cfg_npc->rad_detect)) |
| 110 | { |
| 111 | DoAutoAnim(NPC_GSPOT_RESUME, 0); |
| 112 | } |
| 113 | else |
| 114 | { |
| 115 | DoAutoAnim(NPC_GSPOT_STARTALT, 0); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | S32 zNPCGoalDuploLive::NPCMessage(NPCMsg* mail) |
| 120 | { |
nothing calls this directly
no test coverage detected