X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2FView.qc;h=9ffe5a738c67634732ac4716a6fc8e7ccace8106;hb=55a4c54757ace30c9d82a63b73e8b6bce32b4643;hp=0dd898aad6039407543f36e1e20c11d00024a2dd;hpb=7e024612ee60433f89ac84f735c6e8e9e880363e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 0dd898aad..9ffe5a738 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -442,7 +442,7 @@ void CSQC_UpdateView(float w, float h) { // make special vector since we can't use view_origin (It is one frame old as of this code, it gets set later with the results this code makes.) vector current_view_origin = getpropertyvec(VF_ORIGIN); - + // We must enable chase_active to get a third person view (weapon viewmodel hidden and own player model showing). // Ideally, there should be another way to enable third person cameras, such as through setproperty() if(!autocvar_chase_active) @@ -473,9 +473,16 @@ void CSQC_UpdateView(float w, float h) eventchase_current_distance = 0; // start from 0 next time } } - + // workaround for camera stuck between player's legs when using chase_active 1 + // because the engine stops updating the chase_active camera when the game ends + else if(intermission) + { + cvar_settemp("chase_active", "-1"); + eventchase_current_distance = 0; + } + // do lockview after event chase camera so that it still applies whenever necessary. - if(autocvar_cl_lockview || (autocvar__hud_configure && spectatee_status <= 0) || intermission > 1) + if(autocvar_cl_lockview || (!autocvar_hud_cursormode && (autocvar__hud_configure && spectatee_status <= 0 || intermission > 1))) { setproperty(VF_ORIGIN, freeze_org); setproperty(VF_ANGLES, freeze_ang); @@ -539,8 +546,8 @@ void CSQC_UpdateView(float w, float h) calledhooks |= HOOK_END; } } - - Announcer(); + + Announcer(); fov = autocvar_fov; if(fov <= 59.5) @@ -1183,7 +1190,8 @@ void CSQC_UpdateView(float w, float h) if(autocvar_crosshair_hitindication) { - vector hitindication_color = stov(autocvar_crosshair_hitindication_color); + vector hitindication_color = ((autocvar_crosshair_color_per_weapon) ? stov(autocvar_crosshair_hitindication_per_weapon_color) : stov(autocvar_crosshair_hitindication_color)); + if(hitindication_crosshair_time < hit_time) { if(time - hit_time < MAX_TIME_DIFF) // don't trigger the animation if it's too old