X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Foverkill%2Frpc.qc;h=bd1386cd0a76b9cc67203d8323b39cc3884e31b0;hp=90c671a6094d36f39fa46d060972b44bcdf4879a;hb=0a980f57412cf2253cfd73c8c01a26fb04c87189;hpb=f6dd336135aa93ee4617df2389c3bfb28f0e1c58 diff --git a/qcsrc/common/mutators/mutator/overkill/rpc.qc b/qcsrc/common/mutators/mutator/overkill/rpc.qc index 90c671a60..bd1386cd0 100644 --- a/qcsrc/common/mutators/mutator/overkill/rpc.qc +++ b/qcsrc/common/mutators/mutator/overkill/rpc.qc @@ -50,23 +50,28 @@ REGISTER_WEAPON(RPC, rpc, NEW(RocketPropelledChainsaw)); #ifdef SVQC spawnfunc(weapon_rpc) { weapon_defaultspawnfunc(this, WEP_RPC); } -void W_RocketPropelledChainsaw_Explode(entity this) +void W_RocketPropelledChainsaw_Explode(entity this, entity directhitentity) { this.event_damage = func_null; this.takedamage = DAMAGE_NO; - RadiusDamage (this, this.realowner, WEP_CVAR(rpc, damage), WEP_CVAR(rpc, edgedamage), WEP_CVAR(rpc, radius), NULL, NULL, WEP_CVAR(rpc, force), this.projectiledeathtype, other); + 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); - remove (this); + delete (this); } -void W_RocketPropelledChainsaw_Touch (entity this) +void W_RocketPropelledChainsaw_Explode_think(entity this) { - if(WarpZone_Projectile_Touch(this)) + W_RocketPropelledChainsaw_Explode(this, NULL); +} + +void W_RocketPropelledChainsaw_Touch (entity this, entity toucher) +{ + if(WarpZone_Projectile_Touch(this, toucher)) if(wasfreed(this)) return; - W_RocketPropelledChainsaw_Explode(this); + W_RocketPropelledChainsaw_Explode(this, toucher); } void W_RocketPropelledChainsaw_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) @@ -80,14 +85,14 @@ void W_RocketPropelledChainsaw_Damage(entity this, entity inflictor, entity atta this.health = this.health - damage; if (this.health <= 0) - W_PrepareExplosionByDamage(this, attacker, W_RocketPropelledChainsaw_Explode); + W_PrepareExplosionByDamage(this, attacker, W_RocketPropelledChainsaw_Explode_think); } void W_RocketPropelledChainsaw_Think(entity this) { if(this.cnt <= time) { - remove(this); + delete(this); return; } @@ -124,7 +129,7 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep, entity actor) missile.health = WEP_CVAR(rpc, health); missile.event_damage = W_RocketPropelledChainsaw_Damage; missile.damagedbycontents = true; - missile.movetype = MOVETYPE_FLY; + set_movetype(missile, MOVETYPE_FLY); missile.projectiledeathtype = WEP_RPC.m_id; setsize (missile, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot