#endif
#ifdef IMPLEMENTATION
#ifdef SVQC
-void spawnfunc_weapon_fireball(void) { weapon_defaultspawnfunc(WEP_FIREBALL.m_id); }
+spawnfunc(weapon_fireball) { weapon_defaultspawnfunc(WEP_FIREBALL.m_id); }
void W_Fireball_Explode(void)
-{
+{SELFPARAM();
entity e;
float dist;
float points;
}
void W_Fireball_LaserPlay(float dt, float dist, float damage, float edgedamage, float burntime)
-{
+{SELFPARAM();
entity e;
float d;
vector p;
}
void W_Fireball_Think(void)
-{
+{SELFPARAM();
if(time > self.pushltime)
{
self.cnt = 1;
}
void W_Fireball_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
-{
+{SELFPARAM();
if(self.health <= 0)
return;
}
void W_Fireball_Attack1(void)
-{
+{SELFPARAM();
entity proj;
- W_SetupShot_ProjectileSize(self, '-16 -16 -16', '16 16 16', false, 2, W_Sound("fireball_fire2"), CH_WEAPON_A, WEP_CVAR_PRI(fireball, damage) + WEP_CVAR_PRI(fireball, bfgdamage));
+ W_SetupShot_ProjectileSize(self, '-16 -16 -16', '16 16 16', false, 2, SND(FIREBALL_FIRE2), CH_WEAPON_A, WEP_CVAR_PRI(fireball, damage) + WEP_CVAR_PRI(fireball, bfgdamage));
Send_Effect(EFFECT_FIREBALL_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
}
void W_Fireball_AttackEffect(float i, vector f_diff)
-{
+{SELFPARAM();
W_SetupShot_ProjectileSize(self, '-16 -16 -16', '16 16 16', false, 0, "", 0, 0);
w_shotorg += f_diff.x * v_up + f_diff.y * v_right;
Send_Effect(EFFECT_FIREBALL_PRE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
}
void W_Fireball_Attack1_Frame0(void)
-{
+{SELFPARAM();
W_Fireball_AttackEffect(0, '-1.25 -3.75 0');
- sound(self, CH_WEAPON_SINGLE, W_Sound("fireball_prefire2"), VOL_BASE, ATTEN_NORM);
+ sound(self, CH_WEAPON_SINGLE, SND_FIREBALL_PREFIRE2, VOL_BASE, ATTEN_NORM);
weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame1);
}
void W_Fireball_Firemine_Think(void)
-{
+{SELFPARAM();
if(time > self.pushltime)
{
remove(self);
}
void W_Fireball_Firemine_Touch(void)
-{
+{SELFPARAM();
PROJECTILE_TOUCH;
if(other.takedamage == DAMAGE_AIM)
if(Fire_AddDamage(other, self.realowner, WEP_CVAR_SEC(fireball, damage), WEP_CVAR_SEC(fireball, damagetime), self.projectiledeathtype) >= 0)
}
void W_Fireball_Attack2(void)
-{
+{SELFPARAM();
entity proj;
vector f_diff;
float c;
f_diff = '+1.25 +3.75 0';
break;
}
- W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', false, 2, W_Sound("fireball_fire"), CH_WEAPON_A, WEP_CVAR_SEC(fireball, damage));
+ W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', false, 2, SND(FIREBALL_FIRE), CH_WEAPON_A, WEP_CVAR_SEC(fireball, damage));
traceline(w_shotorg, w_shotorg + f_diff_x * v_up + f_diff_y * v_right, MOVE_NORMAL, self);
w_shotorg = trace_endpos;
}
bool W_Fireball(int req)
-{
+{SELFPARAM();
switch(req)
{
case WR_AIM:
}
case WR_INIT:
{
- precache_model(W_Model("g_fireball.md3"));
- precache_model(W_Model("v_fireball.md3"));
- precache_model(W_Model("h_fireball.iqm"));
- precache_model("models/sphere/sphere.md3");
- precache_sound(W_Sound("fireball_fire"));
- precache_sound(W_Sound("fireball_fire2"));
- precache_sound(W_Sound("fireball_prefire2"));
FIREBALL_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
return true;
}
#endif
#ifdef CSQC
bool W_Fireball(int req)
-{
+{SELFPARAM();
switch(req)
{
case WR_IMPACTEFFECT:
org2 = w_org + w_backoff * 16;
pointparticles(particleeffectnum(EFFECT_FIREBALL_EXPLODE), org2, '0 0 0', 1);
if(!w_issilent)
- sound(self, CH_SHOTS, W_Sound("fireball_impact2"), VOL_BASE, ATTEN_NORM * 0.25); // long range boom
+ sound(self, CH_SHOTS, SND_FIREBALL_IMPACT2, VOL_BASE, ATTEN_NORM * 0.25); // long range boom
}
return true;
}
case WR_INIT:
{
- precache_sound(W_Sound("fireball_impact2"));
return true;
}
case WR_ZOOMRETICLE: