Actually fix it (we apparently still need owner for the trace)
authorMario <mario@smbclan.net>
Wed, 25 Jan 2017 07:20:34 +0000 (17:20 +1000)
committerMario <mario@smbclan.net>
Wed, 25 Jan 2017 07:20:34 +0000 (17:20 +1000)
qcsrc/common/vehicles/vehicle/raptor.qc
qcsrc/common/vehicles/vehicle/spiderbot.qc

index 7bbc39e..b05dd98 100644 (file)
@@ -84,7 +84,6 @@ void raptor_land(entity this)
 void raptor_exit(entity this, int eject)
 {
        entity player = this.owner;
-       this.owner = NULL;
 
        this.tur_head.exteriormodeltoclient = NULL;
 
@@ -127,6 +126,7 @@ void raptor_exit(entity this, int eject)
                setorigin(player, spot);
        }
 
+       this.owner = NULL;
        antilag_clear(player, CS(player));
 }
 
index 7634e76..a5411e8 100644 (file)
@@ -319,7 +319,6 @@ bool spiderbot_frame(entity this, float dt)
 void spiderbot_exit(entity this, int eject)
 {
        entity player = this.owner;
-       this.owner = NULL;
 
        IL_EACH(g_projectiles, it.owner == player && it.classname == "spiderbot_rocket",
        {
@@ -333,7 +332,10 @@ void spiderbot_exit(entity this, int eject)
        set_movetype(this, MOVETYPE_WALK);
 
        if(!player)
+       {
+               this.owner = NULL; // reset owner anyway?
                return;
+       }
 
        makevectors(this.angles);
        vector spot;
@@ -366,6 +368,7 @@ void spiderbot_exit(entity this, int eject)
        }
 
        antilag_clear(player, CS(player));
+       this.owner = NULL;
 }
 
 void spiderbot_headfade(entity this)