X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fview.qc;h=381ead7869362d94bc98025544a1af291efccaab;hp=d4eb7ba22deef925bd9b7d8fb74cf276ae77adaf;hb=9ae63d858415772fdb60bd549758825103c0ba17;hpb=ec9c61b50671bede8fb5fba2c6c217d7bb49aedc diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index d4eb7ba22d..381ead7869 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -12,7 +12,7 @@ #include "../common/constants.qh" #include "../common/mapinfo.qh" -#include "../common/nades.qh" +#include "../common/nades/all.qh" #include "../common/stats.qh" #include "../common/triggers/target/music.qh" #include "../common/teams.qh" @@ -27,7 +27,7 @@ entity porto; vector polyline[16]; -void Porto_Draw() +void Porto_Draw(entity this) { vector p, dir, ang, q, nextdir; float portal_number, portal1_idx; @@ -518,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; @@ -528,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; } } @@ -1468,7 +1468,7 @@ void CSQC_UpdateView(float w, float h) */ for(entity e = NULL; (e = nextent(e)); ) if (e.draw) { - WITH(entity, self, e, e.draw()); + WITH(entity, self, e, e.draw(e)); } addentities(MASK_NORMAL | MASK_ENGINE | MASK_ENGINEVIEWMODELS); @@ -1532,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 @@ -1541,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; } @@ -1805,7 +1806,7 @@ void CSQC_UpdateView(float w, float h) // draw 2D entities for (entity e = NULL; (e = nextent(e)); ) if (e.draw2d) { - WITH(entity, self, e, e.draw2d()); + WITH(entity, self, e, e.draw2d(e)); } Draw_ShowNames_All(); @@ -1860,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();