]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Release vehicle on spectate, blow up vehicle on 'kill'
authorJakob MG <jakob_mg@hotmail.com>
Sun, 12 Jun 2011 11:09:39 +0000 (13:09 +0200)
committerJakob MG <jakob_mg@hotmail.com>
Sun, 12 Jun 2011 11:09:39 +0000 (13:09 +0200)
qcsrc/client/hud.qc
qcsrc/server/cl_client.qc

index 7a33cf07d6385756a4422a14b7d8f89e7aa6ccc7..7189cbd79230c0735a09b1aeea887d36c3dff2d9 100644 (file)
@@ -1786,7 +1786,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
                } else if(type == DEATH_RAPTOR_CANNON) {
                        HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
-                               print (sprintf(_("^1%s^1 nailed to hell %s\n"), s2, s1));
+                               print (sprintf(_("^1%s^1 nailed to hell by %s\n"), s2, s1));
                } else if(type == DEATH_RAPTOR_BOMB) {
                        HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
index 8bffe778306cec30e1603642765bf24ea0a82d9d..e0bdec8f1ee572482fd757c6f1268194a8346d28 100644 (file)
@@ -622,6 +622,15 @@ void PutObserverInServer (void)
                self.alivetime = 0;
        }
 
+       if(self.vehicle)
+       {
+           entity oldself;
+           oldself = self;
+           self = self.vehicle;
+           vehicles_exit(VHEF_RELESE);
+           self = oldself;
+       }
+
        if(self.flagcarried)
                DropFlag(self.flagcarried, world, world);
 
@@ -1260,6 +1269,17 @@ void ClientKill_Now_TeamChange()
 
 void ClientKill_Now()
 {
+       if(self.vehicle)
+       {
+           entity oldself;
+           oldself = self;
+           self = self.vehicle;
+           vehicles_exit(VHEF_RELESE);
+           self.vehicle_health = -1;
+           Damage(self, self, self, 1 , DEATH_KILL, self.origin, '0 0 0');
+           self = oldself;
+       }
+       
        remove(self.killindicator);
        self.killindicator = world;