]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/w_porto.qc
Some more consistency please
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / w_porto.qc
index 40b1441a6dff7a80b3570b980ea2bc7ae324ccc8..97b27d31c2a8bd8b74443e81e65f4ce351866f01 100644 (file)
@@ -1,8 +1,8 @@
 #ifdef REGISTER_WEAPON
 REGISTER_WEAPON(
 /* WEP_##id */ PORTO,
-/* function */ w_porto,
-/* ammotype */ 0,
+/* function */ W_Porto,
+/* ammotype */ ammo_none,
 /* impulse  */ 0,
 /* flags    */ WEP_TYPE_OTHER | WEP_FLAG_SUPERWEAPON,
 /* rating   */ 0,
@@ -11,16 +11,20 @@ REGISTER_WEAPON(
 /* fullname */ _("Port-O-Launch")
 );
 
-#define PORTO_SETTINGS(w_cvar,w_prop) \
-       w_cvar(WEP_PORTO, porto, MO_BOTH, animtime) \
-       w_cvar(WEP_PORTO, porto, MO_BOTH, lifetime) \
-       w_cvar(WEP_PORTO, porto, MO_BOTH, refire) \
-       w_cvar(WEP_PORTO, porto, MO_BOTH, speed) \
-       w_cvar(WEP_PORTO, porto, MO_NONE, secondary) \
-       w_prop(WEP_PORTO, porto, reloading_ammo, reload_ammo) \
-       w_prop(WEP_PORTO, porto, reloading_time, reload_time) \
-       w_prop(WEP_PORTO, porto, switchdelay_raise, switchdelay_raise) \
-       w_prop(WEP_PORTO, porto, switchdelay_drop, switchdelay_drop)
+#define PORTO_SETTINGS(w_cvar,w_prop) PORTO_SETTINGS_LIST(w_cvar, w_prop, PORTO, porto)
+#define PORTO_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
+       w_cvar(id, sn, MO_BOTH, animtime) \
+       w_cvar(id, sn, MO_BOTH, lifetime) \
+       w_cvar(id, sn, MO_BOTH, refire) \
+       w_cvar(id, sn, MO_BOTH, speed) \
+       w_cvar(id, sn, MO_NONE, secondary) \
+       w_prop(id, sn, float,  reloading_ammo, reload_ammo) \
+       w_prop(id, sn, float,  reloading_time, reload_time) \
+       w_prop(id, sn, float,  switchdelay_raise, switchdelay_raise) \
+       w_prop(id, sn, float,  switchdelay_drop, switchdelay_drop) \
+       w_prop(id, sn, string, weaponreplace, weaponreplace) \
+       w_prop(id, sn, float,  weaponstart, weaponstart) \
+       w_prop(id, sn, float,  weaponstartoverride, weaponstartoverride)
 
 #ifdef SVQC
 PORTO_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
@@ -277,8 +281,8 @@ void W_Porto_Attack (float type)
        other = gren; MUTATOR_CALLHOOK(EditProjectile);
 }
 
-float w_nexball_weapon(float req);
-float w_porto(float req)
+float w_nexball_weapon(float req); // WEAPONTODO
+float W_Porto(float req)
 {
        //vector v_angle_save;
 
@@ -389,7 +393,7 @@ float w_porto(float req)
 }
 #endif
 #ifdef CSQC
-float w_porto(float req)
+float W_Porto(float req)
 {
        switch(req)
        {