]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Allow func_breakable entities to respawn, using the respawntime key. Tested and works
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 22 Apr 2011 17:29:03 +0000 (20:29 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 22 Apr 2011 17:29:03 +0000 (20:29 +0300)
qcsrc/server/func_breakable.qc

index 51a1edf1c8d488ef6a8dd1d2781a7928ac04e5db..436fde3f4c8b6069623db5722bccad47e9453af8 100644 (file)
@@ -169,6 +169,12 @@ void func_breakable_destroy() {
        if(self.cnt)
                pointparticles(self.cnt, self.absmin * 0.5 + self.absmax * 0.5, '0 0 0', self.count);
 
+       if(self.respawntime)
+       {
+               self.think = func_breakable_restore;
+               self.nextthink = time + self.respawntime;
+       }
+
        oldmsg = self.message;
        self.message = "";
        SUB_UseTargets();