X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fclient%2Fview.qc;h=60fb4b0c58fc960b6886140238859fca6bda076d;hb=7bd8f8562a392fda3ac881b1fbe2a35a5ef0f5c8;hp=1e4d666e9cb64c28f2399fb52ebdb5da05d2cf18;hpb=1c758278958da8f2baf1f39cd0f298d5bda097a2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 1e4d666e9..60fb4b0c5 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -321,6 +321,7 @@ float TrueAimCheck() { case WEP_TUBA.m_id: // no aim case WEP_PORTO.m_id: // shoots from eye + case WEP_NEXBALL.m_id: // shoots from eye case WEP_HOOK.m_id: // no trueaim case WEP_MORTAR.m_id: // toss curve return SHOTTYPE_HITWORLD; @@ -440,7 +441,7 @@ bool WantEventchase() return true; if(MUTATOR_CALLHOOK(WantEventchase, self)) return true; - if(autocvar_cl_eventchase_nexball && gametype == MAPINFO_TYPE_NEXBALL && !(WepSet_GetFromStat() & WepSet_FromWeapon(WEP_PORTO.m_id))) + if(autocvar_cl_eventchase_nexball && gametype == MAPINFO_TYPE_NEXBALL && !(WepSet_GetFromStat() & WepSet_FromWeapon(WEP_NEXBALL.m_id))) return true; if(autocvar_cl_eventchase_death && (getstati(STAT_HEALTH) <= 0)) { @@ -517,7 +518,7 @@ void UpdateHitsound() // todo: avoid very long and very short sounds from wave stretching using different sound files? seems unnecessary // todo: normalize sound pressure levels? seems unnecessary - sound7(world, CH_INFO, "misc/hit.wav", VOL_BASE, ATTN_NONE, pitch_shift * 100, 0); + sound7(world, CH_INFO, SND(HIT), VOL_BASE, ATTN_NONE, pitch_shift * 100, 0); } unaccounted_damage = 0; hitsound_time_prev = time; @@ -527,7 +528,7 @@ void UpdateHitsound() float typehit_time = getstatf(STAT_TYPEHIT_TIME); if (COMPARE_INCREASING(typehit_time, typehit_time_prev) > autocvar_cl_hitsound_antispam_time) { - sound(world, CH_INFO, "misc/typehit.wav", VOL_BASE, ATTN_NONE); + sound(world, CH_INFO, SND_TYPEHIT, VOL_BASE, ATTN_NONE); typehit_time_prev = typehit_time; } } @@ -560,7 +561,7 @@ void UpdateCrosshair() CSQC_common_hud(); // crosshair goes VERY LAST - if(!scoreboard_active && !camera_active && intermission != 2 && + if(!scoreboard_active && !camera_active && intermission != 2 && spectatee_status != -1 && hud == HUD_NORMAL && !csqcplayer.viewloc && !HUD_MinigameMenu_IsOpened() ) { @@ -1531,6 +1532,7 @@ void CSQC_UpdateView(float w, float h) if(autocvar_cl_reticle) { + Weapon wep = get_weaponinfo(activeweapon); // Draw the aiming reticle for weapons that use it // reticle_type is changed to the item we are zooming / aiming with, to decide which reticle to use // It must be a persisted float for fading out to work properly (you let go of the zoom button for @@ -1540,7 +1542,7 @@ void CSQC_UpdateView(float w, float h) // no zoom reticle while dead reticle_type = 0; } - else if(WEP_ACTION(activeweapon, WR_ZOOMRETICLE) && autocvar_cl_reticle_weapon) + else if(wep.wr_zoomreticle(wep) && autocvar_cl_reticle_weapon) { if(reticle_image != "") { reticle_type = 2; } else { reticle_type = 0; } @@ -1859,8 +1861,10 @@ void CSQC_UpdateView(float w, float h) if(hud && !intermission) if(hud == HUD_BUMBLEBEE_GUN) CSQC_BUMBLE_GUN_HUD(); - else - VEH_ACTION(hud, VR_HUD); + else { + Vehicle info = get_vehicleinfo(hud); + info.vr_hud(info); + } cl_notice_run();