]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rename the macros so that they're a little easier to understand
authorSamual Lenks <samual@xonotic.org>
Tue, 31 Dec 2013 13:09:52 +0000 (08:09 -0500)
committerSamual Lenks <samual@xonotic.org>
Tue, 31 Dec 2013 13:09:52 +0000 (08:09 -0500)
13 files changed:
qcsrc/common/weapons/w_devastator.qc
qcsrc/common/weapons/w_electro.qc
qcsrc/common/weapons/w_fireball.qc
qcsrc/common/weapons/w_hagar.qc
qcsrc/common/weapons/w_hlac.qc
qcsrc/common/weapons/w_hook.qc
qcsrc/common/weapons/w_minelayer.qc
qcsrc/common/weapons/w_mortar.qc
qcsrc/common/weapons/w_porto.qc
qcsrc/common/weapons/w_seeker.qc
qcsrc/server/mutators/gamemode_nexball.qc
qcsrc/server/weapons/tracing.qc
qcsrc/server/weapons/tracing.qh

index 0d0d48eb62fa26d0a66525e3f0c92ad4c34f4edf..9262389d2ff4aaa804ff20040cc02317b986110b 100644 (file)
@@ -292,7 +292,7 @@ void W_Devastator_Attack (void)
        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;
index 352e4eeae5d282c325f10eefb3eb1f3fc2345d5c..6f68cee7c6afd56c61925b55b8f139adbeb4a6b3 100644 (file)
@@ -262,7 +262,7 @@ void W_Electro_Attack_Bolt(void)
        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');
@@ -354,7 +354,7 @@ void W_Electro_Attack_Orb(void)
        //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;
index 63effc9f3872fc2d901c057eb37bc95c5a9d2143..e3a9ac7520f65016ae3c888c68c511995371e034 100644 (file)
@@ -200,7 +200,7 @@ void W_Fireball_Attack1()
        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');
@@ -332,7 +332,7 @@ void W_Fireball_Attack2()
        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;
index 99a55e3ed260302c0d5b3b28213dcb8ddf460d1b..196c0e24449c647754433c7643827f7e017d1c45 100644 (file)
@@ -148,7 +148,7 @@ void W_Hagar_Attack (void)
        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;
@@ -192,7 +192,7 @@ void W_Hagar_Attack2 (void)
        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;
index 3b4156eea232976abe5ae297d4b65aa5c1b157d6..246bf6b136c6cb72611a6b65e5e5eee41c46c97b 100644 (file)
@@ -93,7 +93,7 @@ void W_HLAC_Attack (void)
        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;
@@ -136,7 +136,7 @@ void W_HLAC_Attack2()
        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;
index c573cbd96a39b34fe03518259664a4b783c85ba8..61a30d2cd831dd250bbc8f3c83c003f8710547e8 100644 (file)
@@ -159,7 +159,7 @@ void W_Hook_Attack2()
                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;
index 3708dc86ed6160a53f8a11e26ded9dbb584f7298..20ef89008f3bcda3e52e9601f2432bf8983e8331 100644 (file)
@@ -347,7 +347,7 @@ void W_MineLayer_Attack()
        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;
index 63c044a73e68922ff156198414736d257c3dbd2e..f1905abb61cd3d325d6f3b84c06d1fe3f4c00bc2 100644 (file)
@@ -253,7 +253,7 @@ void W_Mortar_Attack()
        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;
@@ -301,7 +301,7 @@ void W_Mortar_Attack2()
        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;
index e986e030c42061e9f19d97279030665c28f17dfa..46963a1a7450df5c2fbe6479b465ec63f5abc0a0 100644 (file)
@@ -257,9 +257,9 @@ void W_Porto_Attack (float type)
        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;
index f22c82c1ba9f1499f8d7c316feced8f9e803d2ee..ae3baf21442a3b8731cdc174d91b5b3a9118ffe5 100644 (file)
@@ -283,7 +283,7 @@ void W_Seeker_Fire_Missile(vector f_diff, entity m_target)
        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);
 
@@ -364,7 +364,7 @@ void W_Seeker_Fire_Flac()
        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);
@@ -580,7 +580,7 @@ void W_Seeker_Fire_Tag()
        //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
index fc9e45b96e8f011edd8d997f4335ff9b011e212c..b998ecd33ebbd4ffe743fb90e950d09e1c5c8d06 100644 (file)
@@ -764,7 +764,7 @@ void W_Nexball_Attack2(void)
        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;
index 9a0ea219bdc726365ab4bcb0d32adf011084c579..0bd6b4f9e0e41739dc3e47388568dbda90cb1546 100644 (file)
@@ -133,11 +133,6 @@ vector W_CalculateProjectileVelocity(vector pvelocity, vector mvelocity, float f
        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)
index f62b56e7cc7d4fc31f188028aef5fa76932bb9ef..ae7f966af3729b45527d24f52a59084c9528d603 100644 (file)
@@ -22,20 +22,19 @@ 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);
-
-#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