#endif
// WEAPONTODO: remove prop
-#define WEP_CONFIG_WRITE_PROPS(weapon,prop,name) \
+#define WEP_CONFIG_WRITE_PROPS(weapon,name) \
{ WEP_CONFIG_QUEUE(sprintf("set g_balance_%s_%s %g\n", \
#weapon, \
#name, \
#define WEP_CONFIG_SETTINGS(wepsettings) \
#define WEP_ADD_CVAR(weapon,mode,name) WEP_CONFIG_WRITE_CVARS(weapon,mode,name) \
- #define WEP_ADD_PROP(weapon,prop,name) WEP_CONFIG_WRITE_PROPS(weapon,prop,name) \
+ #define WEP_ADD_PROP(weapon,prop,name) WEP_CONFIG_WRITE_PROPS(weapon,name) \
wepsettings \
#undef WEP_ADD_CVAR \
#undef WEP_ADD_PROP
arc_shotorigin[1] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 2);
arc_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 3);
arc_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), FALSE, FALSE, 4);
-
- #define WEP_ADD_CVAR(weapon,mode,name) /*nothing*/
- #define WEP_ADD_PROP(weapon,prop,name) WEP_SET_PROP(WEP_ARC,weapon,prop,name)
- ARC_SETTINGS(arc)
- #undef WEP_ADD_CVAR
- #undef WEP_ADD_PROP
+ WEP_SET_PROPS(ARC_SETTINGS(arc), WEP_ARC)
}
#endif
#ifdef CSQC
precache_sound ("weapons/crylink_fire.wav");
precache_sound ("weapons/crylink_fire2.wav");
precache_sound ("weapons/crylink_linkjoin.wav");
- #define WEP_ADD_CVAR(weapon,mode,name) /*nothing*/
- #define WEP_ADD_PROP(weapon,prop,name) WEP_SET_PROP(WEP_CRYLINK,weapon,prop,name)
- CRYLINK_SETTINGS(crylink)
- #undef WEP_ADD_CVAR
- #undef WEP_ADD_PROP
+ WEP_SET_PROPS(CRYLINK_SETTINGS(crylink), WEP_CRYLINK)
return TRUE;
}
case WR_SETUP:
precache_sound("weapons/rocket_fire.wav");
precache_sound("weapons/rocket_mode.wav");
}
-
- #define WEP_ADD_CVAR(weapon,mode,name) /*nothing*/
- #define WEP_ADD_PROP(weapon,prop,name) WEP_SET_PROP(WEP_DEVASTATOR,weapon,prop,name)
- ARC_SETTINGS(devastator)
- #undef WEP_ADD_CVAR
- #undef WEP_ADD_PROP
+ WEP_SET_PROPS(DEVASTATOR_SETTINGS(devastator), WEP_DEVASTATOR)
return TRUE;
}
case WR_SETUP:
precache_sound ("weapons/fireball_fire.wav");
precache_sound ("weapons/fireball_fire2.wav");
precache_sound ("weapons/fireball_prefire2.wav");
- #define WEP_ADD_CVAR(weapon,mode,name) /*nothing*/
- #define WEP_ADD_PROP(weapon,prop,name) WEP_SET_PROP(WEP_FIREBALL,weapon,prop,name)
- FIREBALL_SETTINGS(fireball)
- #undef WEP_ADD_CVAR
- #undef WEP_ADD_PROP
+ WEP_SET_PROPS(FIREBALL_SETTINGS(fireball), WEP_FIREBALL)
return TRUE;
}
case WR_SETUP:
precache_sound ("weapons/hagar_fire.wav");
precache_sound ("weapons/hagar_load.wav");
precache_sound ("weapons/hagar_beep.wav");
- #define WEP_ADD_CVAR(weapon,mode,name) /*nothing*/
- #define WEP_ADD_PROP(weapon,prop,name) WEP_SET_PROP(WEP_HAGAR,weapon,prop,name)
- HAGAR_SETTINGS(hagar)
- #undef WEP_ADD_CVAR
- #undef WEP_ADD_PROP
+ WEP_SET_PROPS(HAGAR_SETTINGS(hagar), WEP_HAGAR)
return TRUE;
}
case WR_SETUP:
precache_sound ("weapons/hook_impact.wav"); // done by g_hook.qc
precache_sound ("weapons/hook_fire.wav");
precache_sound ("weapons/hookbomb_fire.wav");
- #define WEP_ADD_CVAR(weapon,mode,name) /*nothing*/
- #define WEP_ADD_PROP(weapon,prop,name) WEP_SET_PROP(WEP_HOOK,weapon,prop,name)
- HOOK_SETTINGS(hook)
- #undef WEP_ADD_CVAR
- #undef WEP_ADD_PROP
+ WEP_SET_PROPS(HOOK_SETTINGS(hook), WEP_HOOK)
return TRUE;
}
case WR_SETUP:
precache_model ("models/weapons/v_uzi.md3");
precache_model ("models/weapons/h_uzi.iqm");
precache_sound ("weapons/uzi_fire.wav");
- #define WEP_ADD_CVAR(weapon,mode,name) /*nothing*/
- #define WEP_ADD_PROP(weapon,prop,name) WEP_SET_PROP(WEP_UZI,weapon,prop,name)
- UZI_SETTINGS(uzi)
- #undef WEP_ADD_CVAR
- #undef WEP_ADD_PROP
+ WEP_SET_PROPS(UZI_SETTINGS(uzi), WEP_UZI)
return TRUE;
}
case WR_SETUP:
precache_sound ("weapons/mine_fire.wav");
precache_sound ("weapons/mine_stick.wav");
precache_sound ("weapons/mine_trigger.wav");
- #define WEP_ADD_CVAR(weapon,mode,name) /*nothing*/
- #define WEP_ADD_PROP(weapon,prop,name) WEP_SET_PROP(WEP_MINE_LAYER,weapon,prop,name)
- MINELAYER_SETTINGS(minelayer)
- #undef WEP_ADD_CVAR
- #undef WEP_ADD_PROP
+ WEP_SET_PROPS(MINELAYER_SETTINGS(minelayer), WEP_MINE_LAYER)
return TRUE;
}
case WR_SETUP:
precache_sound ("weapons/grenade_bounce6.wav");
precache_sound ("weapons/grenade_stick.wav");
precache_sound ("weapons/grenade_fire.wav");
-
- #define WEP_ADD_CVAR(weapon,mode,name) /*nothing*/
- #define WEP_ADD_PROP(weapon,prop,name) WEP_SET_PROP(WEP_GRENADE_LAUNCHER,weapon,prop,name)
- MORTAR_SETTINGS(mortar)
- #undef WEP_ADD_CVAR
- #undef WEP_ADD_PROP
+ WEP_SET_PROPS(MORTAR_SETTINGS(mortar), WEP_GRENADE_LAUNCHER)
return TRUE;
}
case WR_SETUP:
precache_sound ("weapons/nexwhoosh1.wav");
precache_sound ("weapons/nexwhoosh2.wav");
precache_sound ("weapons/nexwhoosh3.wav");
- #define WEP_ADD_CVAR(weapon,mode,name) /*nothing*/
- #define WEP_ADD_PROP(weapon,prop,name) WEP_SET_PROP(WEP_NEX,weapon,prop,name)
- NEX_SETTINGS(nex)
- #undef WEP_ADD_CVAR
- #undef WEP_ADD_PROP
+ WEP_SET_PROPS(NEX_SETTINGS(nex), WEP_NEX)
return TRUE;
}
case WR_SETUP:
precache_sound ("porto/explode.wav");
precache_sound ("porto/fire.wav");
precache_sound ("porto/unsupported.wav");
- #define WEP_ADD_CVAR(weapon,mode,name) /*nothing*/
- #define WEP_ADD_PROP(weapon,prop,name) WEP_SET_PROP(WEP_PORTO,weapon,prop,name)
- PORTO_SETTINGS(porto)
- #undef WEP_ADD_CVAR
- #undef WEP_ADD_PROP
+ WEP_SET_PROPS(PORTO_SETTINGS(porto), WEP_PORTO)
return TRUE;
}
case WR_SETUP:
precache_model ("models/weapons/h_campingrifle.iqm");
precache_sound ("weapons/campingrifle_fire.wav");
precache_sound ("weapons/campingrifle_fire2.wav");
- #define WEP_ADD_CVAR(weapon,mode,name) /*nothing*/
- #define WEP_ADD_PROP(weapon,prop,name) WEP_SET_PROP(WEP_RIFLE,weapon,prop,name)
- RIFLE_SETTINGS(rifle)
- #undef WEP_ADD_CVAR
- #undef WEP_ADD_PROP
+ WEP_SET_PROPS(RIFLE_SETTINGS(rifle), WEP_RIFLE)
return TRUE;
}
case WR_SETUP:
#define WEP_SET_PROP(wepid,weapon,prop,name) get_weaponinfo(##wepid).##prop = autocvar_g_balance_##weapon##_##name;
+#define WEP_SET_PROPS(wepsettings,wepid) \
+ #define WEP_ADD_CVAR(weapon,mode,name) \
+ #define WEP_ADD_PROP(weapon,prop,name) WEP_SET_PROP(wepid,weapon,prop,name) \
+ wepsettings \
+ #undef WEP_ADD_CVAR \
+ #undef WEP_ADD_PROP
+
#include "all.qh"
#undef WEP_ADD_CVAR