#include "weapons/selection.qh"
#include "weapons/tracing.qh"
#include "cl_player.qh"
-#include "t_teleporters.qh"
#include "command/common.qh"
#include "round_handler.qh"
-#include "../common/vehicles/sv_vehicles.qh"
+#include "../common/vehicles/all.qh"
#include "../common/constants.qh"
#include "../common/util.qh"
#include "../common/weapons/all.qh"
void GrapplingHookThink();
void GrapplingHook_Stop()
{
- pointparticles(particleeffectnum("grapple_impact"), self.origin, '0 0 0', 1);
+ Send_Effect("grapple_impact", self.origin, '0 0 0', 1);
sound (self, CH_SHOTS, "weapons/hook_impact.wav", VOL_BASE, ATTEN_NORM);
self.state = 1;
tracebox(self.origin + self.view_ofs, '-3 -3 -3', '3 3 3', org, MOVE_NORMAL, self);
org = trace_endpos;
- pointparticles(particleeffectnum("grapple_muzzleflash"), org, '0 0 0', 1);
+ Send_Effect("grapple_muzzleflash", org, '0 0 0', 1);
missile = WarpZone_RefSys_SpawnSameRefSys(self);
missile.owner = missile.realowner = self;
void GrapplingHookFrame()
{
- if(g_grappling_hook && timeout_status != TIMEOUT_ACTIVE && self.weapon != WEP_HOOK)
+ if(g_grappling_hook && timeout_status != TIMEOUT_ACTIVE && self.weapon != WEP_HOOK.m_id)
{
// offhand hook controls
if(self.BUTTON_HOOK)
//self.hook_state &= ~HOOK_RELEASING;
}
}
- else if(!g_grappling_hook && self.switchweapon != WEP_HOOK)
+ else if(!g_grappling_hook && self.switchweapon != WEP_HOOK.m_id)
{
if(self.BUTTON_HOOK && !self.hook_switchweapon)
- W_SwitchWeapon(WEP_HOOK);
+ W_SwitchWeapon(WEP_HOOK.m_id);
}
self.hook_switchweapon = self.BUTTON_HOOK;
- if(!g_grappling_hook && self.weapon != WEP_HOOK)
+ if(!g_grappling_hook && self.weapon != WEP_HOOK.m_id)
{
self.hook_state &= ~HOOK_FIRING;
self.hook_state |= HOOK_REMOVING;
}
else
{
- WEP_ACTION(WEP_HOOK, WR_INIT);
- hook_shotorigin[0] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), false, false, 1);
- hook_shotorigin[1] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), false, false, 2);
- hook_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), false, false, 3);
- hook_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK), false, false, 4);
+ WEP_ACTION(WEP_HOOK.m_id, WR_INIT);
+ hook_shotorigin[0] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK.m_id), false, false, 1);
+ hook_shotorigin[1] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK.m_id), false, false, 2);
+ hook_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK.m_id), false, false, 3);
+ hook_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_HOOK.m_id), false, false, 4);
}
}