From 8fc951e3dd3ad1bc353fd381c1f8c7313ce44702 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 9 Jul 2016 14:55:24 +1000 Subject: [PATCH] Call setup hook before setting vehicle location --- qcsrc/common/vehicles/sv_vehicles.qc | 4 ++-- qcsrc/common/vehicles/vehicle/raptor.qc | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 4c3737379..efec3d52b 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -1165,6 +1165,8 @@ bool vehicle_initialize(entity this, Vehicle info, bool nodrop) setsize(this, info.mins, info.maxs); + info.vr_setup(info, this); + if(!nodrop) { setorigin(this, this.origin); @@ -1176,8 +1178,6 @@ bool vehicle_initialize(entity this, Vehicle info, bool nodrop) this.pos2 = this.angles; this.tur_head.team = this.team; - info.vr_setup(info, this); - if(this.active == ACTIVE_NOT) this.nextthink = 0; // wait until activated else if(autocvar_g_vehicles_delayspawn) diff --git a/qcsrc/common/vehicles/vehicle/raptor.qc b/qcsrc/common/vehicles/vehicle/raptor.qc index eb64943c8..562f522f3 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qc +++ b/qcsrc/common/vehicles/vehicle/raptor.qc @@ -763,6 +763,9 @@ METHOD(Raptor, vr_setup, void(Raptor thisveh, entity instance)) instance.vehicle_health = autocvar_g_vehicle_raptor_health; instance.vehicle_shield = autocvar_g_vehicle_raptor_shield; instance.max_health = instance.vehicle_health; + + if(!autocvar_g_vehicle_raptor_swim) + instance.dphitcontentsmask |= DPCONTENTS_LIQUIDSMASK; } #endif -- 2.39.2