From: Mario Date: Tue, 22 Sep 2020 13:53:49 +0000 (+1000) Subject: Implement support for target_delay (compatibility spawn function for target_relay... X-Git-Tag: xonotic-v0.8.5~760 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4493eb4badbe8e970b003ffd2f084954c9a12c00;p=xonotic%2Fxonotic-data.pk3dir.git Implement support for target_delay (compatibility spawn function for target_relay with a default wait time of 1 second) --- diff --git a/qcsrc/common/mapobjects/trigger/relay.qc b/qcsrc/common/mapobjects/trigger/relay.qc index f99d364ae..da4664c9d 100644 --- a/qcsrc/common/mapobjects/trigger/relay.qc +++ b/qcsrc/common/mapobjects/trigger/relay.qc @@ -23,4 +23,13 @@ spawnfunc(target_relay) { spawnfunc_trigger_relay(this); } + +spawnfunc(target_delay) +{ + if(!this.wait) + this.wait = 1; + if(!this.delay) + this.delay = this.wait; // fall back to quake 3 field + spawnfunc_trigger_relay(this); +} #endif