From: Mircea Kitsune Date: Sat, 30 Oct 2010 14:50:47 +0000 (+0300) Subject: Final touches and cleanups. Code is now go! X-Git-Tag: xonotic-v0.1.0preview~224^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=090965e8e5f726740e7df8a6fc0b3c9f62828d7a;p=xonotic%2Fxonotic-data.pk3dir.git Final touches and cleanups. Code is now go! --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 42786cc43..af27e5d9c 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -96,10 +96,8 @@ seta crosshair_size 0.35 seta crosshair_dot 1 seta crosshair_dot_alpha 1 seta crosshair_dot_size 1 - -seta crosshair_pickup 0.5 +seta crosshair_pickup 0.25 seta crosshair_pickup_speed 4 - seta crosshair_per_weapon 0 "when 1, each gun will display a different crosshair" seta crosshair_color_override 0 "when 1, crosshair_color_* overrides the per-weapon color" seta crosshair_effect_speed -1 "how fast (in seconds) some crosshair effects should take place, 0 = instant, -1 = 2x weapon switch time" diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index ee9b9e3ad..43de98187 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -349,7 +349,7 @@ void CSQC_RAPTOR_HUD(); vector freeze_pmove_org, freeze_input_angles; entity nightvision_noise, nightvision_noise2; -float pickup_crosshair_time, pickup_crosshair_fade; +float pickup_crosshair_time, pickup_crosshair_size; void CSQC_UpdateView(float w, float h) { @@ -775,14 +775,16 @@ void CSQC_UpdateView(float w, float h) { if(pickup_crosshair_time < getstatf(STAT_PICKUP_CROSSHAIR)) { - pickup_crosshair_fade = 1; + pickup_crosshair_size = 1; pickup_crosshair_time = getstatf(STAT_PICKUP_CROSSHAIR); } - if(pickup_crosshair_fade > 0) - pickup_crosshair_fade -= cvar("crosshair_pickup_speed") * frametime; + + if(pickup_crosshair_size > 0) + pickup_crosshair_size -= cvar("crosshair_pickup_speed") * frametime; else - pickup_crosshair_fade = 0; - wcross_scale += sin(pickup_crosshair_fade) * cvar("crosshair_pickup"); + pickup_crosshair_size = 0; + + wcross_scale += sin(pickup_crosshair_size) * cvar("crosshair_pickup"); } if(shottype == SHOTTYPE_HITENEMY)