PROPERTY(multiplier*1, ReadByte, WriteByte, skin) \
PROPERTY(multiplier*2, ReadShort, WriteShort, colormap) \
PROPERTY(multiplier*4, ReadInt24_t, WriteInt24_t, effects) \
- PROPERTY_SCALED(multiplier*8, ReadByte, WriteByte, alpha, 255, 0, 255) \
- PROPERTY_SCALED(multiplier*16, ReadByte, WriteByte, glowmod_x, 32, 0, 255) \
- PROPERTY_SCALED(multiplier*16, ReadByte, WriteByte, glowmod_y, 32, 0, 255) \
- PROPERTY_SCALED(multiplier*16, ReadByte, WriteByte, glowmod_z, 32, 0, 255)
+ PROPERTY_SCALED(multiplier*8, ReadByte, WriteByte, alpha, 255, 0, 255)
// add hook function calls here
#define CSQCMODELS_HOOK_PREUPDATE
#define CSQCMODELS_HOOK_POSTUPDATE
-#define CSQCMODELS_HOOK_PREDRAW
+#define CSQCMODELS_HOOK_PREDRAW \
+ self.glowmod = colormapPaletteColor(((self.colormap >= 1024) ? (self.colormap & 0xFF) : stof(getplayerkey(self.entnum, "colors"))), TRUE) * 2;
// mod must define:
//vector PL_MIN = ...;
if(frametime)
{
- if(self.health <= 0 && autocvar_g_deathglow)
+ if(self.weapon == WEP_NEX && autocvar_g_balance_nex_charge)
{
- if(self.glowmod_x > 0)
- self.glowmod_x -= autocvar_g_deathglow * frametime;
- else
- self.glowmod_x = -1;
- if(self.glowmod_y > 0)
- self.glowmod_y -= autocvar_g_deathglow * frametime;
- else
- self.glowmod_y = -1;
- if(self.glowmod_z > 0)
- self.glowmod_z -= autocvar_g_deathglow * frametime;
- else
- self.glowmod_z = -1;
- }
- else
- {
- // set weapon and player glowmod
- self.glowmod = colormapPaletteColor(self.clientcolors & 0x0F, TRUE) * 2;
+ self.weaponentity_glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
+ self.weaponentity_glowmod_y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
+ self.weaponentity_glowmod_z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
- if(self.weapon == WEP_NEX && autocvar_g_balance_nex_charge)
+ if(self.nex_charge > autocvar_g_balance_nex_charge_animlimit)
{
- self.weaponentity_glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
- self.weaponentity_glowmod_y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
- self.weaponentity_glowmod_z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
-
- if(self.nex_charge > autocvar_g_balance_nex_charge_animlimit)
- {
- self.weaponentity_glowmod_x = self.weaponentity_glowmod_x + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
- self.weaponentity_glowmod_y = self.weaponentity_glowmod_y + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
- self.weaponentity_glowmod_z = self.weaponentity_glowmod_z + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
- }
+ self.weaponentity_glowmod_x = self.weaponentity_glowmod_x + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
+ self.weaponentity_glowmod_y = self.weaponentity_glowmod_y + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
+ self.weaponentity_glowmod_z = self.weaponentity_glowmod_z + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
}
- else
- self.weaponentity_glowmod = self.glowmod;
}
+ else
+ self.glowmod = colormapPaletteColor(self.clientcolors & 0x0F, TRUE) * 2;
+
player_powerups();
}