#ifdef REGISTER_WEAPON
REGISTER_WEAPON(
-/* WEP_##id */ HOOK,
-/* function */ w_hook,
-/* ammotype */ ammo_fuel,
-/* impulse */ 0,
-/* flags */ WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
-/* rating */ 0,
-/* model */ "hookgun",
-/* netname */ "hook",
-/* fullname */ _("Grappling Hook")
+/* WEP_##id */ HOOK,
+/* function */ W_Hook,
+/* ammotype */ ammo_fuel,
+/* impulse */ 0,
+/* flags */ WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
+/* rating */ 0,
+/* color */ '0 0.5 0',
+/* model */ "hookgun",
+/* crosshair */ "gfx/crosshairhook 0.5",
+/* refname */ "hook",
+/* wepname */ _("Grappling Hook")
);
#define HOOK_SETTINGS(w_cvar,w_prop) HOOK_SETTINGS_LIST(w_cvar, w_prop, HOOK, hook)
#define HOOK_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
w_cvar(id, sn, BOTH, animtime) \
- w_cvar(id, sn, BOTH, ammo) \
w_cvar(id, sn, BOTH, refire) \
+ w_cvar(id, sn, PRI, ammo) \
w_cvar(id, sn, PRI, hooked_ammo) \
w_cvar(id, sn, PRI, hooked_time_free) \
w_cvar(id, sn, PRI, hooked_time_max) \
{
entity gren;
- W_DecreaseAmmo(WEP_CVAR_SEC(hook, ammo));
+ //W_DecreaseAmmo(WEP_CVAR_SEC(hook, ammo)); // WEAPONTODO: Figure out how to handle ammo with hook secondary (gravitybomb)
W_SetupShot (self, FALSE, 4, "weapons/hookbomb_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(hook, damage));
gren = spawn ();
gren.velocity = gren.velocity + self.velocity;
gren.gravity = WEP_CVAR_SEC(hook, gravity);
- //W_SetupProjectileVelocity(gren); // just falling down!
+ //W_SetupProjVelocity_Basic(gren); // just falling down!
gren.angles = '0 0 0';
gren.flags = FL_PROJECTILE;
other = gren; MUTATOR_CALLHOOK(EditProjectile);
}
-float w_hook(float req)
+float W_Hook(float req)
{
float hooked_time_max, hooked_fuel;
precache_sound ("weapons/hook_impact.wav"); // done by g_hook.qc
precache_sound ("weapons/hook_fire.wav");
precache_sound ("weapons/hookbomb_fire.wav");
- HOOK_SETTINGS(WEP_SKIPCVAR, WEP_SET_PROP)
+ HOOK_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP)
return TRUE;
}
case WR_SETUP:
{
- self.current_ammo = ammo_fuel;
self.hook_state &= ~HOOK_WAITING_FOR_RELEASE;
return TRUE;
}
}
case WR_CHECKAMMO2:
{
- return self.ammo_cells >= WEP_CVAR_SEC(hook, ammo);
+ // infinite ammo for now
+ return TRUE; // self.ammo_cells >= WEP_CVAR_SEC(hook, ammo); // WEAPONTODO: see above
}
case WR_CONFIG:
{
}
#endif
#ifdef CSQC
-float w_hook(float req)
+float W_Hook(float req)
{
switch(req)
{
precache_sound("weapons/hookbomb_impact.wav");
return TRUE;
}
+ case WR_ZOOMRETICLE:
+ {
+ // no weapon specific image for this weapon
+ return FALSE;
+ }
}
return TRUE;
}