RandomSelection_Init();
for(e = WarpZone_FindRadius(this.origin, dist, true); e; e = e.chain)
- if(e != this.realowner) if(e.takedamage == DAMAGE_AIM) if(!IS_PLAYER(e) || !this.realowner || DIFF_TEAM(e, this))
{
+ if(e == this.realowner) continue;
+ if(e.takedamage != DAMAGE_AIM) continue;
+ if(IS_PLAYER(e) && this.realowner && SAME_TEAM(e, this)) continue;
+
p = e.origin;
p.x += e.mins.x + random() * (e.maxs.x - e.mins.x);
p.y += e.mins.y + random() * (e.maxs.y - e.mins.y);
if(d < dist)
{
e.fireball_impactvec = p;
- RandomSelection_AddEnt(e, 1 / (1 + d), !Fire_IsBurning(e));
+ RandomSelection_AddEnt(e, 1 / (1 + d), !StatusEffects_active(STATUSEFFECT_Burning, e));
}
}
if(RandomSelection_chosen_ent)
{
W_SetupShot_ProjectileSize(actor, weaponentity, '-16 -16 -16', '16 16 16', false, 2, SND_FIREBALL_FIRE2, CH_WEAPON_A, WEP_CVAR_PRI(fireball, damage) + WEP_CVAR_PRI(fireball, bfgdamage), WEP_FIREBALL.m_id);
- W_MuzzleFlash(actor, weaponentity, EFFECT_FIREBALL_MUZZLEFLASH, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(WEP_FIREBALL, actor, weaponentity, w_shotorg, w_shotdir);
entity proj = new(plasma_prim);
proj.owner = proj.realowner = actor;
proj.flags = FL_PROJECTILE;
IL_PUSH(g_projectiles, proj);
IL_PUSH(g_bot_dodge, proj);
- proj.missile_flags = MIF_SPLASH | MIF_PROXY;
+ proj.missile_flags = MIF_SPLASH | MIF_PROXY;
CSQCProjectile(proj, true, PROJECTILE_FIREBALL, true);
{
W_SetupShot_ProjectileSize(actor, weaponentity, '-16 -16 -16', '16 16 16', false, 0, SND_Null, 0, 0, WEP_FIREBALL.m_id); // TODO: probably doesn't need deathtype, just a prefire effect
w_shotorg += f_diff.x * v_up + f_diff.y * v_right;
- W_MuzzleFlash(actor, weaponentity, EFFECT_FIREBALL_PRE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000);
+ Send_Effect(EFFECT_FIREBALL_PRE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
}
void W_Fireball_Attack1_Frame4(Weapon thiswep, entity actor, .entity weaponentity, int fire)
traceline(w_shotorg, w_shotorg + f_diff_x * v_up + f_diff_y * v_right, MOVE_NORMAL, actor);
w_shotorg = trace_endpos;
- W_MuzzleFlash(actor, weaponentity, EFFECT_FIREBALL_MUZZLEFLASH, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(WEP_FIREBALL, actor, weaponentity, w_shotorg, w_shotdir);
proj = new(grenade);
proj.owner = proj.realowner = actor;
proj.flags = FL_PROJECTILE;
IL_PUSH(g_projectiles, proj);
IL_PUSH(g_bot_dodge, proj);
- proj.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_ARC;
+ proj.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_ARC;
CSQCProjectile(proj, true, PROJECTILE_FIREMINE, true);