setsize (missile, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot
setorigin (missile, w_shotorg - v_forward * 3); // move it back so it hits the wall at the right point
- W_SetupProjectileVelocity(missile, WEP_CVAR(devastator, speedstart), 0);
+ W_SetupVelocity_Explicit(missile, WEP_CVAR(devastator, speedstart), 0);
missile.angles = vectoangles (missile.velocity);
missile.touch = W_Devastator_Touch;
setorigin(proj, w_shotorg);
proj.movetype = MOVETYPE_FLY;
- WEP_SPV_PRI(proj, electro);
+ W_SetupVelocity_PRI(proj, electro);
proj.angles = vectoangles(proj.velocity);
proj.touch = W_Electro_TouchExplode;
setsize(proj, '0 0 -3', '0 0 -3');
//proj.glow_size = 50;
//proj.glow_color = 45;
proj.movetype = MOVETYPE_BOUNCE;
- WEP_SPV_UP_SEC(proj, electro);
+ W_SetupVelocity_UP_SEC(proj, electro);
proj.touch = W_Electro_Orb_Touch;
setsize(proj, '0 0 -4', '0 0 -4');
proj.takedamage = DAMAGE_YES;
setorigin(proj, w_shotorg);
proj.movetype = MOVETYPE_FLY;
- WEP_SPV_PRI(proj, fireball);
+ W_SetupVelocity_PRI(proj, fireball);
proj.angles = vectoangles(proj.velocity);
proj.touch = W_Fireball_TouchExplode;
setsize(proj, '-16 -16 -16', '16 16 16');
proj.nextthink = time;
proj.damageforcescale = WEP_CVAR_SEC(fireball, damageforcescale);
proj.pushltime = time + WEP_CVAR_SEC(fireball, lifetime);
- WEP_SPV_UP_SEC(proj, fireball);
+ W_SetupVelocity_UP_SEC(proj, fireball);
proj.angles = vectoangles(proj.velocity);
proj.flags = FL_PROJECTILE;
setsize(missile, '0 0 0', '0 0 0');
missile.movetype = MOVETYPE_FLY;
- WEP_SPV_PRI(missile, hagar);
+ W_SetupVelocity_PRI(missile, hagar);
missile.angles = vectoangles (missile.velocity);
missile.flags = FL_PROJECTILE;
setsize(missile, '0 0 0', '0 0 0');
missile.movetype = MOVETYPE_BOUNCEMISSILE;
- WEP_SPV_SEC(missile, hagar);
+ W_SetupVelocity_SEC(missile, hagar);
missile.angles = vectoangles (missile.velocity);
missile.flags = FL_PROJECTILE;
setorigin (missile, w_shotorg);
setsize(missile, '0 0 0', '0 0 0');
- W_SetupProjectileVelocity(missile, WEP_CVAR_PRI(hlac, speed), spread);
+ W_SetupVelocity_Explicit(missile, WEP_CVAR_PRI(hlac, speed), spread);
//missile.angles = vectoangles (missile.velocity); // csqc
missile.touch = W_HLAC_Touch;
setorigin (missile, w_shotorg);
setsize(missile, '0 0 0', '0 0 0');
- W_SetupProjectileVelocity(missile, WEP_CVAR_SEC(hlac, speed), spread);
+ W_SetupVelocity_Explicit(missile, WEP_CVAR_SEC(hlac, speed), spread);
//missile.angles = vectoangles (missile.velocity); // csqc
missile.touch = W_HLAC_Touch;
gren.velocity = gren.velocity + self.velocity;
gren.gravity = WEP_CVAR_SEC(hook, gravity);
- //W_SetupProjectileVelocity(gren); // just falling down!
+ //W_SetupVelocity_Explicit(gren); // just falling down!
gren.angles = '0 0 0';
gren.flags = FL_PROJECTILE;
setsize (mine, '-4 -4 -4', '4 4 4'); // give it some size so it can be shot
setorigin (mine, w_shotorg - v_forward * 4); // move it back so it hits the wall at the right point
- W_SetupProjectileVelocity(mine, WEP_CVAR(minelayer, speed), 0);
+ W_SetupVelocity_Explicit(mine, WEP_CVAR(minelayer, speed), 0);
mine.angles = vectoangles (mine.velocity);
mine.touch = W_MineLayer_Touch;
gren.event_damage = W_Mortar_Grenade_Damage;
gren.damagedbycontents = TRUE;
gren.missile_flags = MIF_SPLASH | MIF_ARC;
- WEP_SPV_UP_PRI(gren, mortar);
+ W_SetupVelocity_UP_PRI(gren, mortar);
gren.angles = vectoangles (gren.velocity);
gren.flags = FL_PROJECTILE;
gren.event_damage = W_Mortar_Grenade_Damage;
gren.damagedbycontents = TRUE;
gren.missile_flags = MIF_SPLASH | MIF_ARC;
- WEP_SPV_UP_SEC(gren, mortar); // WEAPONTODO
+ W_SetupVelocity_UP_SEC(gren, mortar); // WEAPONTODO
gren.angles = vectoangles (gren.velocity);
gren.flags = FL_PROJECTILE;
gren.touch = W_Porto_Touch;
if(self.items & IT_STRENGTH)
- W_SetupProjectileVelocity(gren, WEP_CVAR_BOTH(porto, (type <= 0), speed) * autocvar_g_balance_powerup_strength_force, 0);
+ W_SetupVelocity_Explicit(gren, WEP_CVAR_BOTH(porto, (type <= 0), speed) * autocvar_g_balance_powerup_strength_force, 0);
else
- W_SetupProjectileVelocity(gren, WEP_CVAR_BOTH(porto, (type <= 0), speed), 0);
+ W_SetupVelocity_Explicit(gren, WEP_CVAR_BOTH(porto, (type <= 0), speed), 0);
gren.angles = vectoangles (gren.velocity);
gren.flags = FL_PROJECTILE;
missile.flags = FL_PROJECTILE;
missile.missile_flags = MIF_SPLASH | MIF_GUIDED_TAG;
- WEP_SPV_UP_NONE(missile, seeker, missile_);
+ W_SetupVelocity_UP_PRE(missile, seeker, missile_);
missile.angles = vectoangles (missile.velocity);
setorigin (missile, w_shotorg);
setsize (missile, '-2 -2 -2', '2 2 2');
- WEP_SPV_UP_NONE(missile, seeker, flac_);
+ W_SetupVelocity_UP_PRE(missile, seeker, flac_);
CSQCProjectile(missile, TRUE, PROJECTILE_FLAC, TRUE);
other = missile; MUTATOR_CALLHOOK(EditProjectile);
//missile.missile_flags = MIF_..?;
missile.movetype = MOVETYPE_FLY;
- WEP_SPV_NONE(missile, seeker, tag_);
+ W_SetupVelocity_PRE(missile, seeker, tag_);
missile.angles = vectoangles (missile.velocity);
CSQCProjectile(missile, TRUE, PROJECTILE_TAG, FALSE); // has sound
setsize(missile, '0 0 0', '0 0 0');
setorigin(missile, w_shotorg);
- W_SetupProjectileVelocity(missile, autocvar_g_balance_nexball_secondary_speed, 0);
+ W_SetupVelocity_Explicit(missile, autocvar_g_balance_nexball_secondary_speed, 0);
missile.angles = vectoangles(missile.velocity);
missile.touch = W_Nexball_Touch;
missile.think = SUB_Remove;
return outvelocity;
}
-#if 0
-float mspercallsum;
-float mspercallsstyle;
-float mspercallcount;
-#endif
void W_SetupProjectileVelocityEx(entity missile, vector dir, vector upDir, float pSpeed, float pUpSpeed, float pZSpeed, float spread, float forceAbsolute)
{
if(missile.owner == world)
float mspercallsstyle;
float mspercallcount;
#endif
-void W_SetupProjectileVelocityEx(entity missile, vector dir, vector upDir, float pSpeed, float pUpSpeed, float pZSpeed, float spread, float forceAbsolute);
-
-#define W_SetupProjectileVelocity(ent,pspeed,pspread) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, pspeed, 0, 0, pspread, FALSE)
+void W_SetupProjectileVelocityEx(entity missile, vector dir, vector upDir, float pSpeed, float pUpSpeed, float pZSpeed, float spread, float forceAbsolute);
+#define W_SetupVelocity_Explicit(ent,pspeed,pspread) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, pspeed, 0, 0, pspread, FALSE)
-#define WEP_SPV_UP_NONE(ent,wepname,prefix) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR(wepname, prefix##speed), WEP_CVAR(wepname, prefix##speed_up), WEP_CVAR(wepname, prefix##speed_z), WEP_CVAR(wepname, prefix##spread), FALSE)
-#define WEP_SPV_UP_PRI(ent,wepname) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR_PRI(wepname, speed), WEP_CVAR_PRI(wepname, speed_up), WEP_CVAR_PRI(wepname, speed_z), WEP_CVAR_PRI(wepname, spread), FALSE)
-#define WEP_SPV_UP_SEC(ent,wepname) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR_SEC(wepname, speed), WEP_CVAR_SEC(wepname, speed_up), WEP_CVAR_SEC(wepname, speed_z), WEP_CVAR_SEC(wepname, spread), FALSE)
-#define WEP_SPV_UP_BOTH(ent,wepname,isprimary) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR_BOTH(wepname, isprimary, speed), WEP_CVAR_BOTH(wepname, isprimary, speed_up), WEP_CVAR_BOTH(wepname, isprimary, speed_z), WEP_CVAR_BOTH(wepname, isprimary, spread), FALSE)
+#define W_SetupVelocity_UP_PRE(ent,wepname,prefix) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR(wepname, prefix##speed), WEP_CVAR(wepname, prefix##speed_up), WEP_CVAR(wepname, prefix##speed_z), WEP_CVAR(wepname, prefix##spread), FALSE)
+#define W_SetupVelocity_UP_PRI(ent,wepname) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR_PRI(wepname, speed), WEP_CVAR_PRI(wepname, speed_up), WEP_CVAR_PRI(wepname, speed_z), WEP_CVAR_PRI(wepname, spread), FALSE)
+#define W_SetupVelocity_UP_SEC(ent,wepname) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR_SEC(wepname, speed), WEP_CVAR_SEC(wepname, speed_up), WEP_CVAR_SEC(wepname, speed_z), WEP_CVAR_SEC(wepname, spread), FALSE)
+#define W_SetupVelocity_UP_BOTH(ent,wepname,isprimary) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR_BOTH(wepname, isprimary, speed), WEP_CVAR_BOTH(wepname, isprimary, speed_up), WEP_CVAR_BOTH(wepname, isprimary, speed_z), WEP_CVAR_BOTH(wepname, isprimary, spread), FALSE)
-#define WEP_SPV_NONE(ent,wepname,prefix) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR(wepname, prefix##speed), 0, 0, WEP_CVAR(wepname, prefix##spread), FALSE)
-#define WEP_SPV_PRI(ent,wepname) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR_PRI(wepname, speed), 0, 0, WEP_CVAR_PRI(wepname, spread), FALSE)
-#define WEP_SPV_SEC(ent,wepname) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR_SEC(wepname, speed), 0, 0, WEP_CVAR_SEC(wepname, spread), FALSE)
-#define WEP_SPV_BOTH(ent,wepname,isprimary) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR_BOTH(wepname, isprimary, speed), 0, 0, WEP_CVAR_BOTH(wepname, isprimary, spread), FALSE)
+#define W_SetupVelocity_PRE(ent,wepname,prefix) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR(wepname, prefix##speed), 0, 0, WEP_CVAR(wepname, prefix##spread), FALSE)
+#define W_SetupVelocity_PRI(ent,wepname) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR_PRI(wepname, speed), 0, 0, WEP_CVAR_PRI(wepname, spread), FALSE)
+#define W_SetupVelocity_SEC(ent,wepname) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR_SEC(wepname, speed), 0, 0, WEP_CVAR_SEC(wepname, spread), FALSE)
+#define W_SetupVelocity_BOTH(ent,wepname,isprimary) W_SetupProjectileVelocityEx(ent, w_shotdir, v_up, WEP_CVAR_BOTH(wepname, isprimary, speed), 0, 0, WEP_CVAR_BOTH(wepname, isprimary, spread), FALSE)
// ====================
// Ballistics Tracing