Hook_Precache();
GibSplash_Precache();
Casings_Precache();
- DamageInfo_Precache();
Vehicles_Precache();
turrets_precache();
Tuba_Precache();
ta = trueaim;
mv = MOVE_NOMONSTERS;
- switch(activeweapon)
+ switch(activeweapon) // WEAPONTODO
{
case WEP_TUBA: // no aim
case WEP_PORTO: // shoots from eye
return EnemyHitCheck();
}
break;
- case WEP_ROCKET_LAUNCHER: // projectile has a size!
+ case WEP_DEVASTATOR: // projectile has a size!
mi = '-3 -3 -3';
ma = '3 3 3';
break;
(get_weaponinfo(hitwep)).weapon_func(WR_IMPACTEFFECT);
}
}
-
-void DamageInfo_Precache()
-{
- float i;
- for(i = WEP_FIRST; i <= WEP_LAST; ++i)
- (get_weaponinfo(i)).weapon_func(WR_PRECACHE);
-}
}
}
-float GetAmmoTypeForWep(float i)
+float GetAmmoTypeForWep(float i) // WEAPONTODO
{
switch(i)
{
case WEP_NEX: return 3;
case WEP_RIFLE: return 1;
case WEP_HAGAR: return 2;
- case WEP_ROCKET_LAUNCHER: return 2;
+ case WEP_DEVASTATOR: return 2;
case WEP_SEEKER: return 2;
case WEP_FIREBALL: return 4;
case WEP_HOOK: return 3;
WEP_ADD_CVAR(weapon, MO_PRI, force) \
WEP_ADD_CVAR(weapon, MO_PRI, range) \
WEP_ADD_CVAR(weapon, MO_PRI, refire) \
+ WEP_ADD_PROP(weapon, reloading_ammo, reload_ammo) \
+ WEP_ADD_PROP(weapon, reloading_time, reload_time) \
WEP_ADD_PROP(weapon, switchdelay_raise, switchdelay_raise) \
WEP_ADD_PROP(weapon, switchdelay_drop, switchdelay_drop)
WEP_ADD_CVAR(weapon, MO_NONE, speed) \
WEP_ADD_CVAR(weapon, MO_NONE, speedaccel) \
WEP_ADD_CVAR(weapon, MO_NONE, speedstart) \
+ WEP_ADD_PROP(weapon, reloading_ammo, reload_ammo) \
+ WEP_ADD_PROP(weapon, reloading_time, reload_time) \
WEP_ADD_PROP(weapon, switchdelay_raise, switchdelay_raise) \
WEP_ADD_PROP(weapon, switchdelay_drop, switchdelay_drop)
#ifdef SVQC
DEVASTATOR_SETTINGS(devastator)
+.float rl_release;
+.float rl_detonate_later;
#endif
#else
#ifdef SVQC
-.float rl_release;
-.float rl_detonate_later;
+void spawnfunc_weapon_rocketlauncher()
+{
+ weapon_defaultspawnfunc(WEP_DEVASTATOR);
+}
void W_Devastator_Unregister()
{
}
}
-void W_Devastator_Explode ()
+void W_Devastator_Explode()
{
W_Devastator_Unregister();
remove (self);
}
-void W_Devastator_DoRemoteExplode ()
+void W_Devastator_DoRemoteExplode()
{
W_Devastator_Unregister();
other = missile; MUTATOR_CALLHOOK(EditProjectile);
}
-void spawnfunc_weapon_rocketlauncher (void); // defined in t_items.qc
-
float W_Devastator(float req)
{
entity rock;
}
else if (req == WR_PRECACHE)
{
- precache_model ("models/flash.md3");
- precache_model ("models/weapons/g_rl.md3");
- precache_model ("models/weapons/v_rl.md3");
- precache_model ("models/weapons/h_rl.iqm");
- precache_sound ("weapons/rocket_det.wav");
- precache_sound ("weapons/rocket_fire.wav");
- precache_sound ("weapons/rocket_mode.wav");
+ if(autocvar_sv_precacheweapons)
+ {
+ precache_model ("models/flash.md3");
+ precache_model ("models/weapons/g_rl.md3");
+ precache_model ("models/weapons/v_rl.md3");
+ precache_model ("models/weapons/h_rl.iqm");
+ precache_sound ("weapons/rocket_det.wav");
+ 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) get_weaponinfo(WEP_DEVASTATOR).##prop = autocvar_g_balance_##weapon##_##name;
+ ARC_SETTINGS(devastator)
+ #undef WEP_ADD_CVAR
+ #undef WEP_ADD_PROP
//precache_sound ("weapons/reload.wav"); // until weapons have individual reload sounds, precache the reload sound somewhere else
}
else if (req == WR_SETUP)
e.ammo_field = ammo_fuel;
else
e.ammo_field = ammo_batteries;
+
+ #ifndef MENUQC
+ func(WR_PRECACHE);
+ #endif
}
float w_null(float dummy)
{
stuffcmd(self, strcat("cl_cmd sendcvar ", name, "\n"));
}
}
-float w_getbestweapon(entity e);
+float w_getbestweapon(entity e); // WEAPONTODO
string W_FixWeaponOrder_ForceComplete_AndBuildImpulseList(string wo)
{
string o;
precache_sound ("weapons/hook_impact.wav"); // hook
}
- if(autocvar_sv_precacheweapons)
- {
- //precache weapon models/sounds
- float wep;
- wep = WEP_FIRST;
- while (wep <= WEP_LAST)
- {
- weapon_action(wep, WR_PRECACHE);
- wep = wep + 1;
- }
- }
-
precache_model("models/elaser.mdl");
precache_model("models/laser.mdl");
precache_model("models/ebomb.mdl");
return FALSE;
}
- if(self.weapon == WEP_ROCKET_LAUNCHER || self.weapon == WEP_NEX)
+ if(self.weapon == WEP_DEVASTATOR || self.weapon == WEP_NEX)
{
entity e = spawn();
setorigin(e, self.origin);
weapon_defaultspawnfunc(WEP_MINSTANEX);
}
-void spawnfunc_weapon_rocketlauncher (void)
-{
- weapon_defaultspawnfunc(WEP_ROCKET_LAUNCHER);
-}
-
void spawnfunc_item_rockets (void) {
if(!self.ammo_rockets)
self.ammo_rockets = g_pickup_rockets;
entity targ;
for (targ = world; (targ = find(targ, targetname, self.target)); ) {
if (targ.classname == "weapon_rocketlauncher") {
- self.ammo_rockets += targ.count * autocvar_g_balance_rocketlauncher_ammo;
+ self.ammo_rockets += targ.count * WEP_CVAR(devastator, ammo);
self.netname = "rocketlauncher";
}
else if (targ.classname == "weapon_plasmagun") {