]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Delay triggering with the created trigger, to reduce the spam a little
authorMario <mario@smbclan.net>
Mon, 13 Mar 2017 05:15:31 +0000 (15:15 +1000)
committerMario <mario@smbclan.net>
Mon, 13 Mar 2017 05:15:31 +0000 (15:15 +1000)
qcsrc/common/monsters/sv_spawner.qc

index 7e7f135613a27476e7a915eda437dc362c3370f8..91d221c5b9851e927f252e4cfa65b2b25b5512a9 100644 (file)
@@ -45,6 +45,9 @@ void spawner_trigger_touch(entity this, entity toucher)
 {
        if(!toucher.iscreature || IS_DEAD(toucher) || toucher.health < 1)
                return; // only players
+       if(time < this.door_finished)
+               return;
+       this.door_finished = time + 1;
 
        spawner_use(this.owner, toucher, this);
 }