X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fview.qc;h=b022ce2d45d42bef1a1b251b4209d75bb24630ef;hb=e97de604c9a9a8e86f9aa5851a5c24ecff86cc35;hp=2c10ae9ff281b327480095f096b67d2b5d9c110c;hpb=4edcb7a00a4d9b606182011b9351460baf5f6bbd;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 2c10ae9ff..b022ce2d4 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -669,6 +670,7 @@ float TrueAimCheck(entity wepent) case WEP_MORTAR: // toss curve return SHOTTYPE_HITWORLD; case WEP_VORTEX: + case WEP_OVERKILL_NEX: case WEP_VAPORIZER: mv = MOVE_NORMAL; break; @@ -1199,6 +1201,10 @@ void HUD_Crosshair(entity this) vortex_charge = STAT(VORTEX_CHARGE); vortex_chargepool = STAT(VORTEX_CHARGEPOOL); + float oknex_charge, oknex_chargepool; + oknex_charge = STAT(OVERKILL_NEX_CHARGE); + oknex_chargepool = STAT(OVERKILL_NEX_CHARGEPOOL); + float arc_heat = STAT(ARC_HEAT); if(vortex_charge_movingavg == 0) // this should only happen if we have just loaded up the game @@ -1227,6 +1233,26 @@ void HUD_Crosshair(entity this) ring_rgb = wcross_color; ring_image = "gfx/crosshair_ring_nexgun.tga"; } + else if (autocvar_crosshair_ring && (wepent.activeweapon == WEP_OVERKILL_NEX) && oknex_charge && autocvar_crosshair_ring_vortex) + { + if (oknex_chargepool || use_vortex_chargepool) { + use_vortex_chargepool = 1; + ring_inner_value = oknex_chargepool; + } else { + vortex_charge_movingavg = (1 - autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate) * vortex_charge_movingavg + autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate * oknex_charge; + ring_inner_value = bound(0, autocvar_crosshair_ring_vortex_currentcharge_scale * (oknex_charge - vortex_charge_movingavg), 1); + } + + ring_inner_alpha = autocvar_crosshair_ring_vortex_inner_alpha; + ring_inner_rgb = eX * autocvar_crosshair_ring_vortex_inner_color_red + eY * autocvar_crosshair_ring_vortex_inner_color_green + eZ * autocvar_crosshair_ring_vortex_inner_color_blue; + ring_inner_image = "gfx/crosshair_ring_inner.tga"; + + // draw the outer ring to show the current charge of the weapon + ring_value = oknex_charge; + ring_alpha = autocvar_crosshair_ring_vortex_alpha; + ring_rgb = wcross_color; + ring_image = "gfx/crosshair_ring_nexgun.tga"; + } else if (autocvar_crosshair_ring && wepent.activeweapon == WEP_MINE_LAYER && WEP_CVAR(minelayer, limit) && autocvar_crosshair_ring_minelayer) { ring_value = bound(0, STAT(LAYED_MINES) / WEP_CVAR(minelayer, limit), 1); // if you later need to use the count of bullets in another place, then add a float for it. For now, no need to.