MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / obj_setEnemyLogic

Function obj_setEnemyLogic

TheForceEngine/TFE_DarkForces/logic.cpp:220–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218 }
219
220 Logic* obj_setEnemyLogic(SecObject* obj, KEYWORD logicId)
221 {
222 obj->flags |= OBJ_FLAG_AIM;
223 LogicSetupFunc* setupFunc = nullptr;
224
225 switch (logicId)
226 {
227 case KW_TROOP:
228 case KW_STORM1:
229 {
230 obj->entityFlags = ETFLAG_AI_ACTOR | ETFLAG_HAS_GRAVITY;
231 return trooper_setup(obj, setupFunc);
232 } break;
233 case KW_INT_DROID:
234 {
235 obj->entityFlags = (ETFLAG_AI_ACTOR | ETFLAG_FLYING);
236 return intDroid_setup(obj, setupFunc);
237 } break;
238 case KW_PROBE_DROID:
239 {
240 obj->entityFlags = (ETFLAG_AI_ACTOR | ETFLAG_FLYING);
241 return probeDroid_setup(obj, setupFunc);
242 } break;
243 case KW_D_TROOP1:
244 {
245 return phaseOne_setup(obj, setupFunc);
246 } break;
247 case KW_D_TROOP2:
248 {
249 return phaseTwo_setup(obj, setupFunc);
250 } break;
251 case KW_D_TROOP3:
252 {
253 return phaseThree_setup(obj, setupFunc);
254 } break;
255 case KW_BOBA_FETT:
256 {
257 return bobaFett_setup(obj, setupFunc);
258 } break;
259 case KW_COMMANDO:
260 {
261 obj->entityFlags = ETFLAG_AI_ACTOR | ETFLAG_HAS_GRAVITY;
262 return commando_setup(obj, setupFunc);
263 } break;
264 case KW_I_OFFICER:
265 case KW_I_OFFICER1:
266 case KW_I_OFFICER2:
267 case KW_I_OFFICER3:
268 case KW_I_OFFICER4:
269 case KW_I_OFFICER5:
270 case KW_I_OFFICER6:
271 case KW_I_OFFICER7:
272 case KW_I_OFFICER8:
273 case KW_I_OFFICER9:
274 case KW_I_OFFICERR:
275 case KW_I_OFFICERY:
276 case KW_I_OFFICERB:
277 {

Callers 4

generatorTaskFuncFunction · 0.85
object_parseSeqFunction · 0.85
logic_spawnEnemyFunction · 0.85
addLogicToObjectFunction · 0.85

Calls 15

trooper_setupFunction · 0.85
intDroid_setupFunction · 0.85
probeDroid_setupFunction · 0.85
phaseOne_setupFunction · 0.85
phaseTwo_setupFunction · 0.85
phaseThree_setupFunction · 0.85
bobaFett_setupFunction · 0.85
commando_setupFunction · 0.85
officer_setupFunction · 0.85
gamor_setupFunction · 0.85
reeyees_setupFunction · 0.85
reeyees2_setupFunction · 0.85

Tested by

no test coverage detected