X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fvehicles%2Fvehicle%2Fraptor_weapons.qc;h=5cb0f271c52fec0effb514dff201983fa2069c02;hp=502ef80e2cd88af31f94979549c4b6820cb11d0b;hb=905ec2fbd2b610eeb2591cdddbf71ce24b7bb3ab;hpb=af71335a8e418edc55126a63aa65afd9353f413c diff --git a/qcsrc/common/vehicles/vehicle/raptor_weapons.qc b/qcsrc/common/vehicles/vehicle/raptor_weapons.qc index 502ef80e2..5cb0f271c 100644 --- a/qcsrc/common/vehicles/vehicle/raptor_weapons.qc +++ b/qcsrc/common/vehicles/vehicle/raptor_weapons.qc @@ -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; @@ -201,9 +201,8 @@ void raptor_flare_damage(entity this, entity inflictor, entity attacker, float d 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;