From: bones_was_here Date: Wed, 12 Aug 2020 06:28:49 +0000 (+1000) Subject: target_give: support shield and strength powerups X-Git-Tag: xonotic-v0.8.5~352^2~47 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=1758e185f4fdf82f079c649f78d9e22770eacc50 target_give: support shield and strength powerups --- diff --git a/qcsrc/server/compat/quake3.qc b/qcsrc/server/compat/quake3.qc index 7e1829c9cf..a68cc8a339 100644 --- a/qcsrc/server/compat/quake3.qc +++ b/qcsrc/server/compat/quake3.qc @@ -241,10 +241,18 @@ void target_give_init(entity this) this.netname = cons(this.netname, buff.netname); STAT(BUFF_TIME, this) = it.count; } + else if (it.classname == "item_shield") { + this.invincible_finished = it.count; + this.netname = cons(this.netname, "invincible"); + } + else if (it.classname == "item_strength") { + this.strength_finished = it.count; + this.netname = cons(this.netname, "strength"); + } //remove(it); // removing ents in init functions causes havoc, workaround: - setthink(it, SUB_Remove); - it.nextthink = time; + setthink(it, SUB_Remove); + it.nextthink = time; }); this.spawnflags = 2; this.spawnfunc_checked = true;