X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fvehicles%2Fvehicle%2Fraptor_weapons.qc;h=5cb0f271c52fec0effb514dff201983fa2069c02;hb=64f2b309aa5be8aafb9ad2137174bb6d99aeb876;hp=86f4b22b8b6735dcc7c69a2f28bc97754008bc31;hpb=87cbf00c7734cf2910502c217b5c5157511ba5ea;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/vehicles/vehicle/raptor_weapons.qc b/qcsrc/common/vehicles/vehicle/raptor_weapons.qc index 86f4b22b8..5cb0f271c 100644 --- a/qcsrc/common/vehicles/vehicle/raptor_weapons.qc +++ b/qcsrc/common/vehicles/vehicle/raptor_weapons.qc @@ -12,7 +12,7 @@ METHOD(RaptorCannon, wr_think, void(entity thiswep, entity actor, .entity weapon float t = autocvar_g_vehicle_raptor_cannon_refire * (1 + veh.misc_bulletcounter == 4); if (fire & 1) if (weapon_prepareattack(thiswep, player, weaponentity, false, t)) { - if (isPlayer) W_SetupShot_Dir(player, v_forward, false, 0, SND_Null, CH_WEAPON_B, 0); + if (isPlayer) W_SetupShot_Dir(player, weaponentity, v_forward, false, 0, SND_Null, CH_WEAPON_B, 0); vector org = w_shotorg; vector dir = w_shotdir; if (veh) { @@ -30,7 +30,7 @@ METHOD(RaptorCannon, wr_think, void(entity thiswep, entity actor, .entity weapon weapon_thinkf(player, weaponentity, WFRAME_FIRE1, 0, w_ready); } } -METHOD(RaptorCannon, wr_checkammo1, bool(RacerAttack thiswep, entity actor)) { +METHOD(RaptorCannon, wr_checkammo1, bool(RacerAttack thiswep, entity actor, .entity weaponentity)) { bool isPlayer = IS_PLAYER(actor); entity player = isPlayer ? actor : actor.owner; entity veh = player.vehicle; @@ -91,7 +91,7 @@ void raptor_bomblet_boom(entity this) autocvar_g_vehicle_raptor_bomblet_edgedamage, autocvar_g_vehicle_raptor_bomblet_radius, NULL, NULL, autocvar_g_vehicle_raptor_bomblet_force, DEATH_VH_RAPT_BOMB.m_id, NULL); - remove(this); + delete(this); } void raptor_bomblet_touch(entity this, entity toucher) @@ -140,7 +140,7 @@ void raptor_bomb_burst(entity this) CSQCProjectile(bomblet, true, PROJECTILE_RAPTORBOMBLET, true); } - remove(this); + delete(this); } void raptor_bomb_touch(entity this, entity toucher) @@ -188,29 +188,28 @@ void raptor_bombdrop(entity this) void raptor_flare_touch(entity this, entity toucher) { - remove(this); + delete(this); } void raptor_flare_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { this.health -= damage; if(this.health <= 0) - remove(this); + delete(this); } void raptor_flare_think(entity this) { this.nextthink = time + 0.1; - FOREACH_ENTITY_ENT(enemy, this.owner, + IL_EACH(g_projectiles, it.enemy == this.owner, { - if(it.flags & FL_PROJECTILE) if(vdist(this.origin - it.origin, <, autocvar_g_vehicle_raptor_flare_range)) if(random() > autocvar_g_vehicle_raptor_flare_chase) it.enemy = this; }); if(this.tur_impacttime < time) - remove(this); + delete(this); } #endif @@ -230,7 +229,7 @@ void RaptorCBShellfragDraw(entity this) this.alpha = bound(0, this.nextthink - time, 1); if(this.alpha < ALPHA_MIN_VISIBLE) - remove(this); + delete(this); } void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang)