]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'origin/master' into tzork/vehicles-2
authorJakob MG <jakob_mg@hotmail.com>
Wed, 1 Jun 2011 16:40:20 +0000 (18:40 +0200)
committerJakob MG <jakob_mg@hotmail.com>
Wed, 1 Jun 2011 16:40:20 +0000 (18:40 +0200)
Conflicts:
qcsrc/client/View.qc

1  2 
qcsrc/client/View.qc
qcsrc/client/hud.qc
qcsrc/server/cl_client.qc
qcsrc/server/vehicles/raptor.qc

index 6e4354b4b45ca0d2dfeb67d8e95ba773f342d2b1,82a18f2437561a9fa4a117f7d0835c3babdeb5c0..f0bfb3d91163bc23aebd6a5cde1714d64c3d2316
@@@ -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)
+       
+       if(autocvar_hud_damage && !autocvar_chase_active)
 +
        {
                splash_size_x = max(vid_conwidth, vid_conheight);
                splash_size_y = max(vid_conwidth, vid_conheight);
Simple merge
Simple merge
index 2541acbe357e52e50df4b592fe121d3cb46c1914,38ebad04275078262cfc5d9bbdf3c6613ad50557..4293d2c2302e6e98b2f1b6a4a990229d1482486f
@@@ -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)
      {