X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Foverkill%2Frpc.qc;h=f901d11593d2951ccf0e542002be2d4230886f85;hb=7f6f1dc979173320c7ffe7dfe647a52686f447c2;hp=62f517da642433892657b69e26b49f103d7df5a1;hpb=62b183277ee958dbf27d096f6a9bfb322d392bbe;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mutators/mutator/overkill/rpc.qc b/qcsrc/common/mutators/mutator/overkill/rpc.qc index 62f517da6..f901d1159 100644 --- a/qcsrc/common/mutators/mutator/overkill/rpc.qc +++ b/qcsrc/common/mutators/mutator/overkill/rpc.qc @@ -10,7 +10,7 @@ void W_RocketPropelledChainsaw_Explode(entity this, entity directhitentity) RadiusDamage (this, this.realowner, WEP_CVAR(rpc, damage), WEP_CVAR(rpc, edgedamage), WEP_CVAR(rpc, radius), NULL, NULL, WEP_CVAR(rpc, force), this.projectiledeathtype, directhitentity); - delete (this); + delete(this); } void W_RocketPropelledChainsaw_Explode_think(entity this) @@ -55,7 +55,7 @@ void W_RocketPropelledChainsaw_Think(entity this) tracebox(this.origin, this.mins, this.maxs, this.origin + this.pos1 * (2 * this.wait), MOVE_NORMAL, this); if(IS_PLAYER(trace_ent)) - Damage (trace_ent, this, this.realowner, WEP_CVAR(rpc, damage2), this.projectiledeathtype, this.origin, normalize(this.origin - other.origin) * WEP_CVAR(rpc, force)); + Damage (trace_ent, this, this.realowner, WEP_CVAR(rpc, damage2), this.projectiledeathtype, this.origin, normalize(this.origin - trace_ent.origin) * WEP_CVAR(rpc, force)); this.velocity = this.pos1 * (this.cnt + (WEP_CVAR(rpc, speedaccel) * sys_frametime)); @@ -82,6 +82,7 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep, entity actor, .entity wea missile.health = WEP_CVAR(rpc, health); missile.event_damage = W_RocketPropelledChainsaw_Damage; missile.damagedbycontents = true; + IL_PUSH(g_damagedbycontents, missile); set_movetype(missile, MOVETYPE_FLY); missile.projectiledeathtype = WEP_RPC.m_id; @@ -139,7 +140,7 @@ METHOD(RocketPropelledChainsaw, wr_think, void(entity thiswep, entity actor, .en METHOD(RocketPropelledChainsaw, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity)) { - float ammo_amount = actor.(thiswep.ammo_field) >= WEP_CVAR(rpc, ammo); + float ammo_amount = GetResourceAmount(actor, thiswep.ammo_type) >= WEP_CVAR(rpc, ammo); ammo_amount += actor.(weaponentity).(weapon_load[WEP_RPC.m_id]) >= WEP_CVAR(rpc, ammo); return ammo_amount; }