MCPcopy Create free account
hub / github.com/demoth/jake2 / M_SetEffects

Method M_SetEffects

game/src/main/java/jake2/game/M.java:389–409  ·  view source on GitHub ↗
(SubgameEntity ent, float time)

Source from the content-addressed store, hash-verified

387 };
388
389 public static void M_SetEffects(SubgameEntity ent, float time) {
390 ent.s.effects &= ~(Defines.EF_COLOR_SHELL | Defines.EF_POWERSCREEN);
391 ent.s.renderfx &= ~(Defines.RF_SHELL_RED | Defines.RF_SHELL_GREEN | Defines.RF_SHELL_BLUE);
392
393 if ((ent.monsterinfo.aiflags & GameDefines.AI_RESURRECTING) != 0) {
394 ent.s.effects |= Defines.EF_COLOR_SHELL;
395 ent.s.renderfx |= Defines.RF_SHELL_RED;
396 }
397
398 if (ent.health <= 0)
399 return;
400
401 if (ent.powerarmor_time > time) {
402 if (ent.monsterinfo.power_armor_type == GameDefines.POWER_ARMOR_SCREEN) {
403 ent.s.effects |= Defines.EF_POWERSCREEN;
404 } else if (ent.monsterinfo.power_armor_type == GameDefines.POWER_ARMOR_SHIELD) {
405 ent.s.effects |= Defines.EF_COLOR_SHELL;
406 ent.s.renderfx |= Defines.RF_SHELL_GREEN;
407 }
408 }
409 };
410
411 //ok
412 public static void M_MoveFrame(SubgameEntity self, GameExportsImpl gameExports) {

Callers 1

thinkMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected