MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / NPCMessage

Method NPCMessage

src/SB/Game/zNPCGoalDuplotron.cpp:119–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119S32 zNPCGoalDuploLive::NPCMessage(NPCMsg* mail)
120{
121 S32 handled = 1;
122 zNPCDuplotron* npc = (zNPCDuplotron*)psyche->clt_owner;
123
124 switch (mail->msgid)
125 {
126 case NPC_MID_DAMAGE:
127 {
128 if (psyche->GIDOfPending() != NPC_GOAL_DUPLODEAD)
129 {
130 SDS_BigRedButton();
131 handled = 1;
132 }
133
134 break;
135 }
136 case NPC_MID_SYSEVENT:
137 {
138 switch (mail->sysevent.toEvent)
139 {
140 case eEventDuploNPCBorn:
141 {
142 if (livestat == LIVESTAT_NORMAL && g_hash_dupoanim[2] != npc->AnimCurStateID())
143 {
144 DoAutoAnim(NPC_GSPOT_ALTA, 0);
145 }
146 break;
147 }
148 default:
149 {
150 handled = 0;
151 break;
152 }
153 }
154
155 break;
156 }
157 default:
158 {
159 handled = 0;
160 break;
161 }
162 }
163
164 return handled;
165}
166
167void zNPCGoalDuploLive::SDS_BigRedButton()
168{

Callers

nothing calls this directly

Calls 3

DoAutoAnimFunction · 0.85
GIDOfPendingMethod · 0.80
AnimCurStateIDMethod · 0.80

Tested by

no test coverage detected