35 modeleffect_spawn(
"models/sphere/sphere.md3", 0, 0, this.
origin,
'0 0 0',
'0 0 0',
'0 0 0', 0,
WEP_CVAR_PRI(WEP_FIREBALL, bfgradius), 0.2, 0.05, 0.25);
39 for(e = findradius(this.
origin,
WEP_CVAR_PRI(WEP_FIREBALL, bfgradius)); e; e = e.chain)
46 traceline(e.origin + e.view_ofs,
this.origin,
MOVE_NORMAL, e);
50 traceline(e.origin + e.view_ofs,
this.realowner.origin +
this.realowner.view_ofs,
MOVE_NORMAL, e);
54 dist =
vlen(this.
origin - e.origin - e.view_ofs);
70 e.origin + e.view_ofs,
117 p.x += e.mins.x +
random() * (e.maxs.x - e.mins.x);
118 p.y += e.mins.y +
random() * (e.maxs.y - e.mins.y);
119 p.z += e.mins.z +
random() * (e.maxs.z - e.mins.z);
123 e.fireball_impactvec = p;
130 d = damage + (edgedamage - damage) * (d / dist);
170 W_SetupShot_ProjectileSize(actor, weaponentity,
'-16 -16 -16',
'16 16 16',
false, 2, SND_FIREBALL_FIRE2,
CH_WEAPON_A,
WEP_CVAR_PRI(WEP_FIREBALL, damage) +
WEP_CVAR_PRI(WEP_FIREBALL, bfgdamage), WEP_FIREBALL.m_id);
174 entity proj =
new(plasma_prim);
175 proj.owner = proj.realowner = actor;
176 proj.bot_dodge =
true;
177 proj.bot_dodgerating =
WEP_CVAR_PRI(WEP_FIREBALL, damage);
181 proj.nextthink =
time;
183 proj.team = actor.team;
188 proj.projectiledeathtype = WEP_FIREBALL.m_id;
189 proj.weaponentity_fld = weaponentity;
196 setsize(proj,
'-16 -16 -16',
'16 16 16');
293 f_diff =
'-1.25 -3.75 0';
296 f_diff =
'+1.25 -3.75 0';
299 f_diff =
'-1.25 +3.75 0';
303 f_diff =
'+1.25 +3.75 0';
306 W_SetupShot_ProjectileSize(actor, weaponentity,
'-4 -4 -4',
'4 4 4',
false, 2, SND_FIREBALL_FIRE,
CH_WEAPON_A,
WEP_CVAR_SEC(WEP_FIREBALL, damage), WEP_FIREBALL.m_id |
HITTYPE_SECONDARY);
313 proj.owner = proj.realowner = actor;
314 proj.bot_dodge =
true;
315 proj.bot_dodgerating =
WEP_CVAR_SEC(WEP_FIREBALL, damage);
320 setsize(proj,
'-4 -4 -4',
'4 4 4');
323 proj.nextthink =
time;
343 if(actor.bot_primary_fireballmooth == 0)
348 if(
random() < 0.02) actor.bot_primary_fireballmooth = 1;
356 if(
random() < 0.01) actor.bot_primary_fireballmooth = 0;
365 if(
time >= actor.(weaponentity).fireball_primarytime)
404 return WEAPON_FIREBALL_SUICIDE_FIREMINE;
406 return WEAPON_FIREBALL_SUICIDE_BLAST;
412 return WEAPON_FIREBALL_MURDER_FIREMINE;
414 return WEAPON_FIREBALL_MURDER_BLAST;
442 PAR(_(
"The %s supercharges then fires a massive fireball in a straight line, dealing heaps of splash damage over a large radius on impact."),
COLORED_NAME(
this));
443 PAR(_(
"The secondary fire launches flaming balls that set nearby players alight."));
444 PAR(_(
"It is a superweapon, so isn't often found in game."));
445 PAR(_(
"It doesn't require ammo, but it is destroyed after some time."));
446 PAR(_(
"Since the %s takes a moment to charge and the fireball travels slowly, using it effectively may be difficult, "
447 "but if done properly it can deal a ton of damage."),
COLORED_NAME(
this));
void accuracy_add(entity this, Weapon w, float fired, float hit, float real)
update accuracy stats
bool accuracy_isgooddamage(entity attacker, entity targ)
does this damage count towards accuracy stats?
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity, bool shot_accurate)
IntrusiveList g_bot_dodge
#define MUTATOR_CALLHOOK(id,...)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
#define COLORED_NAME(this)
#define PHYS_INPUT_BUTTON_ATCK(s)
#define PHYS_INPUT_BUTTON_ATCK2(s)
float W_WeaponRateFactor(entity this)
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype,.entity weaponentity, entity directhitentity)
float Fire_AddDamage(entity e, entity o, float d, float t, float dt)
const int HITTYPE_SECONDARY
#define pointparticles(effect, org, vel, howmany)
void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
void W_Fireball_Think(entity this)
void W_Fireball_LaserPlay(entity this, float dt, float dist, float damage, float edgedamage, float burntime)
void W_Fireball_Attack2(entity actor,.entity weaponentity)
void W_Fireball_Explode_use(entity this, entity actor, entity trigger)
void W_Fireball_TouchExplode(entity this, entity toucher)
void W_Fireball_Firemine_Touch(entity this, entity toucher)
void W_Fireball_Attack1_Frame0(Weapon thiswep, entity actor,.entity weaponentity, int fire)
void W_Fireball_Firemine_Think(entity this)
void W_Fireball_Explode(entity this, entity directhitentity)
void W_Fireball_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
void W_Fireball_Attack1_Frame1(Weapon thiswep, entity actor,.entity weaponentity, int fire)
void W_Fireball_Attack1_Frame4(Weapon thiswep, entity actor,.entity weaponentity, int fire)
void W_Fireball_Attack1_Frame3(Weapon thiswep, entity actor,.entity weaponentity, int fire)
void W_Fireball_Explode_think(entity this)
void W_Fireball_Attack1(entity actor,.entity weaponentity)
void W_Fireball_AttackEffect(entity actor,.entity weaponentity, float i, vector f_diff)
void W_Fireball_Attack1_Frame2(Weapon thiswep, entity actor,.entity weaponentity, int fire)
float fireball_primarytime
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
entity WarpZone_FindRadius(vector org, float rad, bool needlineofsight)
vector WarpZone_UnTransformOrigin(entity wz, vector v)
void modeleffect_spawn(string m, float s, float f, vector o, vector v, vector ang, vector angv, float s0, float s2, float a, float t1, float t2)
void set_movetype(entity this, int mt)
const int MOVETYPE_BOUNCE
entity Notification
always last
#define METHOD(cname, name, prototype)
const int PROJECTILE_FIREMINE
const int PROJECTILE_FIREBALL
ERASEABLE void RandomSelection_Init()
#define RandomSelection_AddEnt(e, weight, priority)
entity RandomSelection_chosen_ent
float health
Legacy fields for the resources. To be removed.
#define IS_INDEPENDENT_PLAYER(e)
float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception)
void W_PrepareExplosionByDamage(entity this, entity attacker, void(entity this) explode)
#define PROJECTILE_TOUCH(e, t)
IntrusiveList g_projectiles
#define PROJECTILE_MAKETRIGGER(e)
const int CH_WEAPON_SINGLE
#define sound(e, c, s, v, a)
bool StatusEffects_active(StatusEffect this, entity actor)
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
#define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
#define W_SetupProjVelocity_PRI(ent, wep)
#define W_SetupProjVelocity_UP_SEC(ent, wep)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
string W_Guide_Keybinds(Weapon wep)
string W_Guide_DPS(string name, string pri, string sec)
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
#define WEP_CVAR_PRI(wep, name)
#define WEP_CVAR_SEC(wep, name)
const int MAX_WEAPONSLOTS
entity weaponentities[MAX_WEAPONSLOTS]
void weapon_thinkf(entity actor,.entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor,.entity weaponentity, int fire) func)
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)