]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Call the new hook after everything else has been done, otherwise physics might get...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 4 Apr 2012 12:55:20 +0000 (15:55 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 4 Apr 2012 12:55:20 +0000 (15:55 +0300)
qcsrc/server/t_items.qc

index 1870dddf00c6be94c9db164f57efb93d998def12..e1d405da5caeaddb9540b74a4063e7be4211ca98 100644 (file)
@@ -751,13 +751,6 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
        self.weapons = weaponid;
        self.flags = FL_ITEM | itemflags;
 
-       if(MUTATOR_CALLHOOK(Item_Spawn))
-       {
-               startitem_failed = TRUE;
-               remove(self);
-               return;
-       }
-
        // is it a dropped weapon?
        if (self.classname == "droppedweapon")
        {
@@ -931,6 +924,14 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
        }
        else
                Item_Reset();
+
+       // call this hook after everything else has been done
+       if(MUTATOR_CALLHOOK(Item_Spawn))
+       {
+               startitem_failed = TRUE;
+               remove(self);
+               return;
+       }
 }
 
 /* replace items in minstagib