#include "g_hook.qh"
-#include "_all.qh"
#include "weapons/common.qh"
+#include "weapons/csqcprojectile.qh"
#include "weapons/weaponsystem.qh"
#include "weapons/selection.qh"
#include "weapons/tracing.qh"
#include "../common/constants.qh"
#include "../common/util.qh"
#include "../common/weapons/all.qh"
-#include "../warpzonelib/common.qh"
-#include "../warpzonelib/server.qh"
+#include "../lib/warpzone/common.qh"
+#include "../lib/warpzone/server.qh"
+
+.int state;
/*============================================
//pl.disableclientprediction = false;
}
-void GrapplingHookReset(void)
+void GrapplingHookReset()
{SELFPARAM();
if(self.realowner.hook == self)
RemoveGrapplingHook(self.owner);
}
.vector hook_start, hook_end;
-float GrapplingHookSend(entity to, int sf)
-{SELFPARAM();
- WriteByte(MSG_ENTITY, ENT_CLIENT_HOOK);
+bool GrapplingHookSend(entity this, entity to, int sf)
+{
+ WriteHeader(MSG_ENTITY, ENT_CLIENT_HOOK);
sf = sf & 0x7F;
if(sound_allowed(MSG_BROADCAST, self.realowner))
sf |= 0x80;
self.nextthink = time;
- int s = self.realowner.cvar_cl_gunalign;
- if(s != 1 && s != 2 && s != 4)
- s = 3; // default value
- --s;
+ int s = W_GetGunAlignment(self.realowner);
vs = hook_shotorigin[s];
makevectors(self.realowner.v_angle);
}
}
-void GrapplingHookTouch (void)
+void GrapplingHookTouch ()
{SELFPARAM();
if(other.movetype == MOVETYPE_FOLLOW)
return;
}
}
-void FireGrapplingHook (void)
+void FireGrapplingHook ()
{SELFPARAM();
entity missile;
vector org;
makevectors(self.v_angle);
- int s = self.cvar_cl_gunalign;
- if(s != 1 && s != 2 && s != 4)
- s = 3; // default value
- --s;
+ int s = W_GetGunAlignment(self);
vs = hook_shotorigin[s];
// UGLY WORKAROUND: play this on CH_WEAPON_B so it can't cut off fire sounds