X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fvehicles%2Fvehicle%2Fraptor_weapons.qc;h=7d7d7e71d12670d5561e20ec87e8e38359a88ef8;hb=8c094d930e9ef51767384452f80a3bccdc6fd38d;hp=24db99841be23d452a7f36e45caca5c2c4f03013;hpb=51c4ab5336d3887b618c13e5f566cf19636af951;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 24db99841..7d7d7e71d 100644 --- a/qcsrc/common/vehicles/vehicle/raptor_weapons.qc +++ b/qcsrc/common/vehicles/vehicle/raptor_weapons.qc @@ -1,7 +1,5 @@ #include "raptor_weapons.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC METHOD(RaptorCannon, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { @@ -12,7 +10,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 +28,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; @@ -52,7 +50,7 @@ METHOD(RaptorBomb, wr_think, void(entity thiswep, entity actor, .entity weaponen } void raptor_flare_think(entity this); -void raptor_flare_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force); +void raptor_flare_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force); void raptor_flare_touch(entity this, entity toucher); METHOD(RaptorFlare, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { @@ -90,7 +88,7 @@ void raptor_bomblet_boom(entity this) RadiusDamage (this, this.realowner, autocvar_g_vehicle_raptor_bomblet_damage, 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); + autocvar_g_vehicle_raptor_bomblet_force, DEATH_VH_RAPT_BOMB.m_id, DMG_NOWEP, NULL); delete(this); } @@ -191,7 +189,7 @@ void raptor_flare_touch(entity this, entity toucher) delete(this); } -void raptor_flare_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) +void raptor_flare_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force) { this.health -= damage; if(this.health <= 0) @@ -201,9 +199,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; @@ -260,5 +257,3 @@ void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang) } #endif - -#endif