X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fminelayer.qc;h=463f5109b918187ed45bfe6b41e66f1eb440af76;hb=3e8e73d5c867c2833409e33782d91c45fa0769eb;hp=00f729b113e14f7bf87dc02eb1e006c1dc7a2f65;hpb=cd4892b9fcd32bd4887f0b3bc2503894520945c7;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/minelayer.qc b/qcsrc/common/weapons/weapon/minelayer.qc index 00f729b11..463f5109b 100644 --- a/qcsrc/common/weapons/weapon/minelayer.qc +++ b/qcsrc/common/weapons/weapon/minelayer.qc @@ -1,72 +1,11 @@ #include "minelayer.qh" -#ifndef IMPLEMENTATION -CLASS(MineLayer, Weapon) -/* ammotype */ ATTRIB(MineLayer, ammo_field, .int, ammo_rockets); -/* impulse */ ATTRIB(MineLayer, impulse, int, 4); -/* flags */ ATTRIB(MineLayer, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH); -/* rating */ ATTRIB(MineLayer, bot_pickupbasevalue, float, BOT_PICKUP_RATING_HIGH); -/* color */ ATTRIB(MineLayer, wpcolor, vector, '0.75 1 0'); -/* modelname */ ATTRIB(MineLayer, mdl, string, "minelayer"); -#ifdef GAMEQC -/* model */ ATTRIB(MineLayer, m_model, Model, MDL_MINELAYER_ITEM); -#endif -/* crosshair */ ATTRIB(MineLayer, w_crosshair, string, "gfx/crosshairminelayer"); -/* crosshair */ ATTRIB(MineLayer, w_crosshair_size, float, 0.9); -/* wepimg */ ATTRIB(MineLayer, model2, string, "weaponminelayer"); -/* refname */ ATTRIB(MineLayer, netname, string, "minelayer"); -/* wepname */ ATTRIB(MineLayer, m_name, string, _("Mine Layer")); - -#define X(BEGIN, P, END, class, prefix) \ - BEGIN(class) \ - P(class, prefix, ammo, float, NONE) \ - P(class, prefix, animtime, float, NONE) \ - P(class, prefix, damageforcescale, float, NONE) \ - P(class, prefix, damage, float, NONE) \ - P(class, prefix, detonatedelay, float, NONE) \ - P(class, prefix, edgedamage, float, NONE) \ - P(class, prefix, force, float, NONE) \ - P(class, prefix, health, float, NONE) \ - P(class, prefix, lifetime, float, NONE) \ - P(class, prefix, lifetime_countdown, float, NONE) \ - P(class, prefix, limit, float, NONE) \ - P(class, prefix, protection, float, NONE) \ - P(class, prefix, proximityradius, float, NONE) \ - P(class, prefix, radius, float, NONE) \ - P(class, prefix, refire, float, NONE) \ - P(class, prefix, reload_ammo, float, NONE) \ - P(class, prefix, reload_time, float, NONE) \ - P(class, prefix, remote_damage, float, NONE) \ - P(class, prefix, remote_edgedamage, float, NONE) \ - P(class, prefix, remote_force, float, NONE) \ - P(class, prefix, remote_radius, float, NONE) \ - P(class, prefix, speed, float, NONE) \ - P(class, prefix, switchdelay_drop, float, NONE) \ - P(class, prefix, switchdelay_raise, float, NONE) \ - P(class, prefix, time, float, NONE) \ - P(class, prefix, weaponreplace, string, NONE) \ - P(class, prefix, weaponstartoverride, float, NONE) \ - P(class, prefix, weaponstart, float, NONE) \ - P(class, prefix, weaponthrowable, float, NONE) \ - END() - W_PROPS(X, MineLayer, minelayer) -#undef X -ENDCLASS(MineLayer) -REGISTER_WEAPON(MINE_LAYER, minelayer, NEW(MineLayer)); -#ifdef SVQC -void W_MineLayer_Think(entity this); -.float minelayer_detonate, mine_explodeanyway; -.float mine_time; -.vector mine_orientation; -#endif -#endif -#ifdef IMPLEMENTATION #ifdef SVQC spawnfunc(weapon_minelayer) { weapon_defaultspawnfunc(this, WEP_MINE_LAYER); } void W_MineLayer_Stick(entity this, entity to) { - spamsound(this, CH_SHOTS, SND(MINE_STICK), VOL_BASE, ATTN_NORM); + spamsound(this, CH_SHOTS, SND_MINE_STICK, VOL_BASE, ATTN_NORM); // in order for mines to face properly when sticking to the ground, they must be a server side entity rather than a csqc projectile @@ -239,7 +178,7 @@ void W_MineLayer_Think(entity this) if((time > this.cnt) && (!this.mine_time) && (this.cnt > 0)) { if(WEP_CVAR(minelayer, lifetime_countdown) > 0) - spamsound(this, CH_SHOTS, SND(MINE_TRIGGER), VOL_BASE, ATTN_NORM); + spamsound(this, CH_SHOTS, SND_MINE_TRIGGER, VOL_BASE, ATTN_NORM); this.mine_time = time + WEP_CVAR(minelayer, lifetime_countdown); this.mine_explodeanyway = 1; // make the mine super aggressive -- Samual: Rather, make it not care if a team mate is near. } @@ -261,7 +200,7 @@ void W_MineLayer_Think(entity this) if(head != this.realowner && DIFF_TEAM(head, this.realowner)) // don't trigger for team mates if(!this.mine_time) { - spamsound(this, CH_SHOTS, SND(MINE_TRIGGER), VOL_BASE, ATTN_NORM); + spamsound(this, CH_SHOTS, SND_MINE_TRIGGER, VOL_BASE, ATTN_NORM); this.mine_time = time + WEP_CVAR(minelayer, time); } head = head.chain; @@ -587,4 +526,3 @@ METHOD(MineLayer, wr_impacteffect, void(entity thiswep, entity actor)) } #endif -#endif