5 void W_Fireball_Explode(
entity this,
entity directhitentity)
18 RadiusDamage(
this, this.
realowner,
WEP_CVAR_PRI(fireball, damage),
WEP_CVAR_PRI(fireball, edgedamage),
WEP_CVAR_PRI(fireball,
radius),
NULL,
NULL,
WEP_CVAR_PRI(fireball, force), this.
projectiledeathtype, this.
weaponentity_fld, directhitentity);
22 modeleffect_spawn(
"models/sphere/sphere.md3", 0, 0, this.
origin,
'0 0 0',
'0 0 0',
'0 0 0', 0,
WEP_CVAR_PRI(fireball, bfgradius), 0.2, 0.05, 0.25);
30 traceline(e.origin + e.view_ofs,
this.origin,
MOVE_NORMAL, e);
34 traceline(e.origin + e.view_ofs,
this.realowner.origin +
this.realowner.view_ofs,
MOVE_NORMAL, e);
38 dist =
vlen(this.
origin - e.origin - e.view_ofs);
42 dir =
normalize(e.origin + e.view_ofs -
this.origin);
48 Send_Effect(EFFECT_FIREBALL_BFGDAMAGE, e.origin, -1 * dir, 1);
55 void W_Fireball_Explode_think(
entity this)
57 W_Fireball_Explode(
this,
NULL);
62 W_Fireball_Explode(
this, trigger);
65 void W_Fireball_TouchExplode(
entity this,
entity toucher)
68 W_Fireball_Explode(
this, toucher);
71 void W_Fireball_LaserPlay(
entity this,
float dt,
float dist,
float damage,
float edgedamage,
float burntime)
88 p.x += e.mins.x +
random() * (e.maxs.x - e.mins.x);
89 p.y += e.mins.y +
random() * (e.maxs.y - e.mins.y);
90 p.z += e.mins.z +
random() * (e.maxs.z - e.mins.z);
94 e.fireball_impactvec = p;
101 d = damage + (edgedamage - damage) * (d / dist);
108 void W_Fireball_Think(
entity this)
114 W_Fireball_Explode(
this,
NULL);
139 void W_Fireball_Attack1(
entity actor, .
entity weaponentity)
141 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);
145 entity proj =
new(plasma_prim);
146 proj.owner = proj.realowner = actor;
147 proj.bot_dodge =
true;
150 proj.use = W_Fireball_Explode_use;
152 proj.nextthink =
time;
154 proj.team = actor.team;
155 proj.event_damage = W_Fireball_Damage;
159 proj.projectiledeathtype = WEP_FIREBALL.m_id;
160 proj.weaponentity_fld = weaponentity;
166 settouch(proj, W_Fireball_TouchExplode);
167 setsize(proj,
'-16 -16 -16',
'16 16 16');
168 proj.flags = FL_PROJECTILE;
178 void W_Fireball_AttackEffect(
entity actor, .
entity weaponentity,
float i,
vector f_diff)
185 void W_Fireball_Attack1_Frame4(
Weapon thiswep,
entity actor, .
entity weaponentity,
int fire)
187 W_Fireball_Attack1(actor, weaponentity);
191 void W_Fireball_Attack1_Frame3(
Weapon thiswep,
entity actor, .
entity weaponentity,
int fire)
193 W_Fireball_AttackEffect(actor, weaponentity, 0,
'+1.25 +3.75 0');
197 void W_Fireball_Attack1_Frame2(
Weapon thiswep,
entity actor, .
entity weaponentity,
int fire)
199 W_Fireball_AttackEffect(actor, weaponentity, 0,
'-1.25 +3.75 0');
203 void W_Fireball_Attack1_Frame1(
Weapon thiswep,
entity actor, .
entity weaponentity,
int fire)
205 W_Fireball_AttackEffect(actor, weaponentity, 1,
'+1.25 -3.75 0');
209 void W_Fireball_Attack1_Frame0(
Weapon thiswep,
entity actor, .
entity weaponentity,
int fire)
211 W_Fireball_AttackEffect(actor, weaponentity, 0,
'-1.25 -3.75 0');
216 void W_Fireball_Firemine_Think(
entity this)
242 void W_Fireball_Firemine_Touch(
entity this,
entity toucher)
254 void W_Fireball_Attack2(
entity actor, .
entity weaponentity)
264 f_diff =
'-1.25 -3.75 0';
267 f_diff =
'+1.25 -3.75 0';
270 f_diff =
'-1.25 +3.75 0';
274 f_diff =
'+1.25 +3.75 0';
277 W_SetupShot_ProjectileSize(actor, weaponentity,
'-4 -4 -4',
'4 4 4',
false, 2, SND_FIREBALL_FIRE,
CH_WEAPON_A,
WEP_CVAR_SEC(fireball, damage), WEP_FIREBALL.m_id |
HITTYPE_SECONDARY);
284 proj.owner = proj.realowner = actor;
285 proj.bot_dodge =
true;
289 settouch(proj, W_Fireball_Firemine_Touch);
291 setsize(proj,
'-4 -4 -4',
'4 4 4');
293 setthink(proj, W_Fireball_Firemine_Think);
294 proj.nextthink =
time;
300 proj.flags = FL_PROJECTILE;
314 if(actor.bot_primary_fireballmooth == 0)
319 if(
random() < 0.02) actor.bot_primary_fireballmooth = 0;
327 if(
random() < 0.01) actor.bot_primary_fireballmooth = 1;
335 if(
time >= actor.(weaponentity).fireball_primarytime)
338 W_Fireball_Attack1_Frame0(thiswep, actor, weaponentity, fire);
346 W_Fireball_Attack2(actor, weaponentity);
364 actor.(weaponentity).fireball_primarytime =
time;
370 return WEAPON_FIREBALL_SUICIDE_FIREMINE;
372 return WEAPON_FIREBALL_SUICIDE_BLAST;
377 return WEAPON_FIREBALL_MURDER_FIREMINE;
379 return WEAPON_FIREBALL_MURDER_BLAST;
394 org2 = w_org + w_backoff * 16;
const int HITTYPE_SPLASH
automatically set by RadiusDamage
#define WEP_CVAR_PRI(wepname, name)
#define PHYS_INPUT_BUTTON_ATCK2(s)
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity)
#define WEP_CVAR_SEC(wepname, name)
#define PROJECTILE_MAKETRIGGER(e)
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
#define W_SetupProjVelocity_UP_SEC(ent, wepname)
ERASEABLE void RandomSelection_Init()
#define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception)
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)
#define METHOD(cname, name, prototype)
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
IntrusiveList g_bot_dodge
vector WarpZone_UnTransformOrigin(entity wz, vector v)
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
#define PROJECTILE_TOUCH(e, t)
#define W_SetupProjVelocity_PRI(ent, wepname)
#define RandomSelection_AddEnt(e, weight, priority)
const int PROJECTILE_FIREBALL
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
const int MAX_WEAPONSLOTS
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
const int CH_WEAPON_SINGLE
void W_PrepareExplosionByDamage(entity this, entity attacker, void(entity this) explode)
entity RandomSelection_chosen_ent
#define PHYS_INPUT_BUTTON_ATCK(s)
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
const int HITTYPE_SECONDARY
entity WarpZone_FindRadius(vector org, float rad, bool needlineofsight)
const int PROJECTILE_FIREMINE
vector(float skel, float bonenum) _skel_get_boneabs_hidden
IntrusiveList g_projectiles
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
float Fire_AddDamage(entity e, entity o, float d, float t, float dt)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
void accuracy_add(entity this, Weapon w, float fired, float hit)
entity Notification
always last
void weapon_thinkf(entity actor,.entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor,.entity weaponentity, int fire) func)
float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype,.entity weaponentity, entity directhitentity)
bool accuracy_isgooddamage(entity attacker, entity targ)
#define MUTATOR_CALLHOOK(id,...)
entity weaponentities[MAX_WEAPONSLOTS]
#define sound(e, c, s, v, a)
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
float W_WeaponRateFactor(entity this)
void set_movetype(entity this, int mt)