X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Foverkill%2Foknex.qc;h=ea45e4bb4d95f21bb240435858d2ce3ad4009a86;hb=80998959a66f519759ef42bf27da2060afa4c491;hp=aefc7234692f4e606075d2493dd785ea492dff30;hpb=8f32d4d703daa4950de06cbea755fa5efd6503ba;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mutators/mutator/overkill/oknex.qc b/qcsrc/common/mutators/mutator/overkill/oknex.qc index aefc72346..ea45e4bb4 100644 --- a/qcsrc/common/mutators/mutator/overkill/oknex.qc +++ b/qcsrc/common/mutators/mutator/overkill/oknex.qc @@ -7,22 +7,18 @@ #if defined(GAMEQC) -METHOD(OverkillNex, wr_glow, vector(OverkillNex this, entity actor, entity wepent)) +METHOD(OverkillNex, wr_glow, vector(OverkillNex this, int actor_colors, entity wepent)) { if (!WEP_CVAR(oknex, charge)) return '0 0 0'; - float charge = wepent.oknex_charge; + float charge = max(0.25, wepent.oknex_charge); float animlimit = WEP_CVAR(oknex, charge_animlimit); - float f = autocvar_g_weapon_charge_colormod_hdrmultiplier * min(1, charge / animlimit); - vector g; - g.x = f * autocvar_g_weapon_charge_colormod_red_half; - g.y = f * autocvar_g_weapon_charge_colormod_green_half; - g.z = f * autocvar_g_weapon_charge_colormod_blue_half; + float f = min(1, charge / animlimit); + vector mycolors = colormapPaletteColor(actor_colors & 0x0F, true); + vector g = f * (mycolors * 0.3); if (charge > animlimit) { - f = autocvar_g_weapon_charge_colormod_hdrmultiplier * (charge - animlimit) / (1 - animlimit); - g.x += f * autocvar_g_weapon_charge_colormod_red_full; - g.y += f * autocvar_g_weapon_charge_colormod_green_full; - g.z += f * autocvar_g_weapon_charge_colormod_blue_full; + f = (charge - animlimit) / (1 - animlimit); + g += f * (mycolors * 0.7); } // transition color can't be '0 0 0' as it defaults to player model glow color if (g == '0 0 0') @@ -97,11 +93,13 @@ void W_OverkillNex_Attack(Weapon thiswep, entity actor, .entity weaponentity, fl impressive_hits = 0; FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, mydmg, true, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, thiswep.m_id); - if(yoda && flying) - Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA); + if(yoda && flying) { + Give_Medal(actor, YODA); + } + if(impressive_hits && actor.oknex_lasthit) { - Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE); + Give_Medal(actor, IMPRESSIVE); impressive_hits = 0; // only every second time } @@ -117,7 +115,7 @@ void W_OverkillNex_Attack(Weapon thiswep, entity actor, .entity weaponentity, fl METHOD(OverkillNex, wr_aim, void(entity thiswep, entity actor, .entity weaponentity)) { - if(bot_aim(actor, weaponentity, 1000000, 0, 1, false)) + if(bot_aim(actor, weaponentity, 1000000, 0, 1, false, true)) PHYS_INPUT_BUTTON_ATCK(actor) = true; else { @@ -265,7 +263,7 @@ METHOD(OverkillNex, wr_think, void(entity thiswep, entity actor, .entity weapone METHOD(OverkillNex, wr_setup, void(entity thiswep, entity actor, .entity weaponentity)) { - actor.oknex_lasthit = 0; + //actor.oknex_lasthit = 0; } METHOD(OverkillNex, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))