| 62 | } |
| 63 | |
| 64 | S32 zNPCGoalPlayerNear::Enter(F32 dt, void* updCtxt) |
| 65 | { |
| 66 | zNPCVillager* npc = (zNPCVillager*)(psyche->clt_owner); |
| 67 | flg_plyrnear = 0; |
| 68 | npc->FindMyConverse(); |
| 69 | if (npc->converse != NULL) |
| 70 | { |
| 71 | flg_plyrnear |= 2; |
| 72 | talk_glyph = GLYF_Acquire(NPC_GLYPH_TALK); |
| 73 | if (talk_glyph != NULL) |
| 74 | { |
| 75 | talk_glyph->Enable(1); |
| 76 | xVec3 ang_delta = { 0.052359881f, 0.0f, 0.0f }; // DEG2RAD(3) |
| 77 | talk_glyph->RotSet(&ang_delta, 0); |
| 78 | } |
| 79 | talk_font = NPCWidget_Find(NPC_WIDGE_TALK); |
| 80 | } |
| 81 | else if ((npc->npcass->taskWidgetPrime != 0) || (npc->npcass->taskWidgetSecond != 0)) |
| 82 | { |
| 83 | talk_glyph = GLYF_Acquire(NPC_GLYPH_TALKOTHER); |
| 84 | |
| 85 | if (talk_glyph != NULL) |
| 86 | { |
| 87 | talk_glyph->Enable(1); |
| 88 | xVec3 ang_delta = { -0.052359881f, 0.0f, 0.0f }; // DEG2RAD(-3) |
| 89 | talk_glyph->RotSet(&ang_delta, 0); |
| 90 | } |
| 91 | flg_plyrnear |= 4; |
| 92 | } |
| 93 | |
| 94 | npc->pflags &= 0xfb; |
| 95 | npc->VelStop(); |
| 96 | tmr_actBored = ((xurand() - 0.5f) * 0.25f) * 4.0f + 4.0f; |
| 97 | |
| 98 | S32 cheats = zGameExtras_CheatFlags(); |
| 99 | if (cheats & 0x20000) |
| 100 | { |
| 101 | ChkCheatMedic(); |
| 102 | } |
| 103 | |
| 104 | return zNPCGoalCommon::Enter(dt, updCtxt); |
| 105 | } |
| 106 | |
| 107 | S32 zNPCGoalPlayerNear::Exit(F32 dt, void* updCtxt) |
| 108 | { |
nothing calls this directly
no test coverage detected