From: Mario Date: Sun, 5 Nov 2017 15:28:02 +0000 (+1000) Subject: Add support for target_relay and weapon_railgun in target_give X-Git-Tag: xonotic-v0.8.5~2441 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8ddb07fc53abfac1eb67c03964594af963e8732e;p=xonotic%2Fxonotic-data.pk3dir.git Add support for target_relay and weapon_railgun in target_give --- diff --git a/qcsrc/common/triggers/trigger/relay.qc b/qcsrc/common/triggers/trigger/relay.qc index 794f4dc11..a82034edc 100644 --- a/qcsrc/common/triggers/trigger/relay.qc +++ b/qcsrc/common/triggers/trigger/relay.qc @@ -8,4 +8,6 @@ spawnfunc(trigger_relay) this.use = SUB_UseTargets; this.reset = spawnfunc_trigger_relay; // this spawnfunc resets fully } + +spawnfunc(target_relay) { spawnfunc_trigger_relay(this); } #endif diff --git a/qcsrc/server/compat/quake3.qc b/qcsrc/server/compat/quake3.qc index 2e2301d0b..d6c7bbb2e 100644 --- a/qcsrc/server/compat/quake3.qc +++ b/qcsrc/server/compat/quake3.qc @@ -120,6 +120,10 @@ void target_give_init(entity this) this.ammo_rockets += it.count * WEP_CVAR(devastator, ammo); this.netname = cons(this.netname, "devastator"); } + else if (it.classname == "weapon_railgun") { + this.ammo_cells += it.count * WEP_CVAR_PRI(vortex, ammo); // WEAPONTODO + this.netname = cons(this.netname, "vortex"); + } else if (it.classname == "weapon_lightning") { this.ammo_cells += it.count * WEP_CVAR_PRI(electro, ammo); // WEAPONTODO this.netname = cons(this.netname, "electro");