From: Mario Date: Wed, 29 Jun 2016 01:04:38 +0000 (+1000) Subject: Allow raptor to land on water (prevents diving underwater with the raptor) X-Git-Tag: xonotic-v0.8.2~700^2~115 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=47bb613bdb4eb2ca68c51542d32660569e2e88ec;p=xonotic%2Fxonotic-data.pk3dir.git Allow raptor to land on water (prevents diving underwater with the raptor) --- diff --git a/qcsrc/common/vehicles/vehicle/raptor.qc b/qcsrc/common/vehicles/vehicle/raptor.qc index ab69c3c0d..eedadfceb 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qc +++ b/qcsrc/common/vehicles/vehicle/raptor.qc @@ -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;