From: Jakob MG Date: Wed, 1 Jun 2011 16:40:20 +0000 (+0200) Subject: Merge remote branch 'origin/master' into tzork/vehicles-2 X-Git-Tag: xonotic-v0.5.0~199^2~11^2~42 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d1ae740c1d4fb251c89164056373b5d86888c1b7;p=xonotic%2Fxonotic-data.pk3dir.git Merge remote branch 'origin/master' into tzork/vehicles-2 Conflicts: qcsrc/client/View.qc --- d1ae740c1d4fb251c89164056373b5d86888c1b7 diff --cc qcsrc/client/View.qc index 6e4354b4b,82a18f243..f0bfb3d91 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@@ -783,8 -765,8 +758,9 @@@ void CSQC_UpdateView(float w, float h if(contentavgalpha) drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, liquidcolor_prev, contentavgalpha * liquidalpha_prev, DRAWFLAG_NORMAL); } + + if(autocvar_hud_damage && !autocvar_chase_active) + - if(autocvar_hud_damage) { splash_size_x = max(vid_conwidth, vid_conheight); splash_size_y = max(vid_conwidth, vid_conheight); diff --cc qcsrc/server/vehicles/raptor.qc index 2541acbe3,38ebad042..4293d2c23 --- a/qcsrc/server/vehicles/raptor.qc +++ b/qcsrc/server/vehicles/raptor.qc @@@ -349,79 -445,43 +349,79 @@@ float raptor_frame( player.BUTTON_ATCK = player.BUTTON_ATCK2 = 0; return 1; } + crosshair_trace(player); - vhic.angles_x *= -1; - // Rotate Body - ftmp = raptor_turnspeed * sys_frametime; +#if VEHICLES_VIEWROTATE_CROSSHAIR + df = vectoangles(normalize(trace_endpos - self.origin + '0 0 32')); + if(df_x > 180) df_x -= 360; - if(df_x < -180) df_x += 360; ++ if(df_x < -180) df_x += 360;-- + if(df_y > 180) df_y -= 360; + if(df_y < -180) df_y += 360; - ftmp = bound(-ftmp, shortangle_f(player.v_angle_y - vhic.angles_y, vhic.angles_y), ftmp); - - // Roll - //ftmp = bound(-90,shortangle_f(player.v_angle_z + ((vhic.angles_y - ftmp2) * raptor_turnroll), vhic.angles_z),90); - //ftmp = safeangle(vhic.angles_z + ftmp); - //vhic.angles_z = ftmp; + // Rotate Body + ftmp = autocvar_g_vehicle_raptor_turnspeed * sys_frametime; + ftmp = bound(-ftmp, shortangle_f(df_y - raptor.angles_y, raptor.angles_y), ftmp); // Turn - vhic.angles_y = anglemods(vhic.angles_y + ftmp); + //raptor.angles_y = anglemods(raptor.angles_y + ftmp); + raptor.avelocity_y = anglemods(raptor.angles_y + ftmp); // Pitch Body - ftmp = raptor_pitchspeed * sys_frametime; - - ftmp = bound(-ftmp, shortangle_f(player.v_angle_x - vhic.angles_x,vhic.angles_x), ftmp); + ftmp = autocvar_g_vehicle_raptor_pitchspeed * sys_frametime; + ftmp = bound(-ftmp, shortangle_f(df_x - raptor.angles_x, raptor.angles_x), ftmp); + + //raptor.angles_x = bound(-autocvar_g_vehicle_raptor_pitchlimit, anglemods(raptor.angles_x + ftmp), autocvar_g_vehicle_raptor_pitchlimit); + raptor.avelocity_x = bound(-autocvar_g_vehicle_raptor_pitchlimit, anglemods(raptor.angles_x + ftmp), autocvar_g_vehicle_raptor_pitchlimit); +#else + vector vang; + vang = raptor.angles; + df = vectoangles(normalize(trace_endpos - self.origin + '0 0 32')); + vang_x *= -1; + df_x *= -1; + if(df_x > 180) df_x -= 360; + if(df_x < -180) df_x += 360; + if(df_y > 180) df_y -= 360; + if(df_y < -180) df_y += 360; + + ftmp = shortangle_f(player.v_angle_y - vang_y, vang_y); + if(ftmp > 180) ftmp -= 360; if(ftmp < -180) ftmp += 360; + raptor.avelocity_y = bound(-autocvar_g_vehicle_raptor_turnspeed, ftmp + raptor.avelocity_y * 0.9, autocvar_g_vehicle_raptor_turnspeed); + + // Pitch + ftmp = 0; + if(player.movement_x > 0 && vang_x < autocvar_g_vehicle_raptor_pitchlimit) ftmp = 5; + else if(player.movement_x < 0 && vang_x > -autocvar_g_vehicle_raptor_pitchlimit) ftmp = -20; + + df_x = bound(-autocvar_g_vehicle_raptor_pitchlimit, df_x , autocvar_g_vehicle_raptor_pitchlimit); + ftmp = vang_x - bound(-autocvar_g_vehicle_raptor_pitchlimit, df_x + ftmp, autocvar_g_vehicle_raptor_pitchlimit); + raptor.avelocity_x = bound(-autocvar_g_vehicle_raptor_pitchspeed, ftmp + raptor.avelocity_x * 0.9, autocvar_g_vehicle_raptor_pitchspeed); + + raptor.angles_x = anglemods(raptor.angles_x); + raptor.angles_y = anglemods(raptor.angles_y); + raptor.angles_z = anglemods(raptor.angles_z); + +#endif + + if(autocvar_g_vehicle_raptor_movestyle == 1) + makevectors('0 1 0' * raptor.angles_y); + else + makevectors(player.v_angle); - vhic.angles_x = bound(-60,anglemods(vhic.angles_x + ftmp),60); - vhic.angles_x *= -1; +#ifdef RAPTOR_RETARDCAMERA + float spd, back, up; + spd = vlen(self.velocity) + 0.01; + back = spd / autocvar_g_vehicle_raptor_speed_forward; + up = 1 - back; + back = back; + back = back * 1250; + back += 150; + up = up * 200; + up = up + 100; - if(raptor_movestyle == 1) - { - ftmp = vhic.angles_z; - vhic.angles_z = 0; - ftmp2 = vhic.angles_x; - vhic.angles_x = 0; - fixedmakevectors(vhic.angles); - vhic.angles_z = ftmp; - vhic.angles_x = ftmp2; - } - else - fixedmakevectors(vhic.angles); + setorigin(self.vehicle_viewport, self.origin + (v_up * up) + (v_forward * -back)); +#endif - df = vhic.velocity * -1; + df = raptor.velocity * -autocvar_g_vehicle_raptor_friction; if(player.movement_x != 0) {