(SubgameEntity ent, GameExportsImpl gameExports)
| 773 | * =============== |
| 774 | */ |
| 775 | private static void G_SetClientEffects(SubgameEntity ent, GameExportsImpl gameExports) { |
| 776 | int pa_type; |
| 777 | int remaining; |
| 778 | |
| 779 | ent.s.effects = 0; |
| 780 | ent.s.renderfx = 0; |
| 781 | |
| 782 | if (ent.health <= 0 || gameExports.level.intermissiontime != 0) |
| 783 | return; |
| 784 | |
| 785 | if (ent.powerarmor_time > gameExports.level.time) { |
| 786 | pa_type = GameItems.PowerArmorType(ent, gameExports); |
| 787 | if (pa_type == GameDefines.POWER_ARMOR_SCREEN) { |
| 788 | ent.s.effects |= Defines.EF_POWERSCREEN; |
| 789 | } else if (pa_type == GameDefines.POWER_ARMOR_SHIELD) { |
| 790 | ent.s.effects |= Defines.EF_COLOR_SHELL; |
| 791 | ent.s.renderfx |= Defines.RF_SHELL_GREEN; |
| 792 | } |
| 793 | } |
| 794 | |
| 795 | gclient_t client = ent.getClient(); |
| 796 | if (client.quad_framenum > gameExports.level.framenum) { |
| 797 | remaining = (int) client.quad_framenum |
| 798 | - gameExports.level.framenum; |
| 799 | if (remaining > 30 || 0 != (remaining & 4)) |
| 800 | ent.s.effects |= Defines.EF_QUAD; |
| 801 | } |
| 802 | |
| 803 | if (client.invincible_framenum > gameExports.level.framenum) { |
| 804 | remaining = (int) client.invincible_framenum |
| 805 | - gameExports.level.framenum; |
| 806 | if (remaining > 30 || 0 != (remaining & 4)) |
| 807 | ent.s.effects |= Defines.EF_PENT; |
| 808 | } |
| 809 | |
| 810 | // show cheaters!!! |
| 811 | if ((ent.flags & GameDefines.FL_GODMODE) != 0) { |
| 812 | ent.s.effects |= Defines.EF_COLOR_SHELL; |
| 813 | ent.s.renderfx |= (Defines.RF_SHELL_RED | Defines.RF_SHELL_GREEN | Defines.RF_SHELL_BLUE); |
| 814 | } |
| 815 | } |
| 816 | |
| 817 | /* |
| 818 | * =============== |
no test coverage detected