]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Allow raptor to land on water (prevents diving underwater with the raptor)
authorMario <mario@smbclan.net>
Wed, 29 Jun 2016 01:04:38 +0000 (11:04 +1000)
committerMario <mario@smbclan.net>
Wed, 29 Jun 2016 01:04:38 +0000 (11:04 +1000)
qcsrc/common/vehicles/vehicle/raptor.qc

index ab69c3c0d54952bca6ad226a9739c299381bd676..eedadfcebb51a7b7f70849d733be80d38f75f216 100644 (file)
@@ -47,6 +47,8 @@ float autocvar_g_vehicle_raptor_speed_up = 1700;
 float autocvar_g_vehicle_raptor_speed_down = 1700;
 float autocvar_g_vehicle_raptor_friction = 2;
 
+bool autocvar_g_vehicle_raptor_swim = false;
+
 float autocvar_g_vehicle_raptor_cannon_turnspeed = 120;
 float autocvar_g_vehicle_raptor_cannon_turnlimit = 20;
 float autocvar_g_vehicle_raptor_cannon_pitchlimit_up = 12;
@@ -726,6 +728,9 @@ METHOD(Raptor, vr_spawn, void(Raptor thisveh, entity instance))
     instance.solid               = SOLID_SLIDEBOX;
     instance.vehicle_energy = 1;
 
+    if(!autocvar_g_vehicle_raptor_swim)
+       instance.dphitcontentsmask |= DPCONTENTS_LIQUIDSMASK;
+
     instance.PlayerPhysplug = raptor_frame;
 
     instance.bomb1.gun1.avelocity_y = 90;