]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Call setup hook before setting vehicle location
authorMario <mario@smbclan.net>
Sat, 9 Jul 2016 04:55:24 +0000 (14:55 +1000)
committerMario <mario@smbclan.net>
Sat, 9 Jul 2016 04:55:24 +0000 (14:55 +1000)
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/raptor.qc

index 4c3737379038a99e5c2c5a08eddf8f44bf8c69f8..efec3d52b85948e52de661668971f7765018067f 100644 (file)
@@ -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)
index eb64943c8e737b677d5f1511699522d0491666cb..562f522f3e111bdcbc368731f7c1e722ae5e9d58 100644 (file)
@@ -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