]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_hook.qc
Merge branch 'master' into Mario/intrusive_2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_hook.qc
index 88d63e384c11261fc3cb70499cda902c512822cc..12760bc550912cad925ef1f4a29875efa0561308 100644 (file)
@@ -5,7 +5,7 @@
 #include "weapons/weaponsystem.qh"
 #include "weapons/selection.qh"
 #include "weapons/tracing.qh"
-#include "cl_player.qh"
+#include "player.qh"
 #include "command/common.qh"
 #include "round_handler.qh"
 #include "../common/state.qh"
@@ -13,7 +13,7 @@
 #include "../common/vehicles/all.qh"
 #include "../common/constants.qh"
 #include "../common/util.qh"
-#include "../common/weapons/all.qh"
+#include <common/weapons/_all.qh>
 #include "../lib/warpzone/common.qh"
 #include "../lib/warpzone/server.qh"
 
@@ -74,7 +74,7 @@ void RemoveGrapplingHook(entity pl)
 {
        if(pl.hook == NULL)
                return;
-       remove(pl.hook);
+       delete(pl.hook);
        pl.hook = NULL;
        if(pl.move_movetype == MOVETYPE_FLY)
                set_movetype(pl, MOVETYPE_WALK);
@@ -87,7 +87,7 @@ void GrapplingHookReset(entity this)
        if(this.realowner.hook == this)
                RemoveGrapplingHook(this.owner);
        else // in any case:
-               remove(this);
+               delete(this);
 }
 
 void GrapplingHookThink(entity this);
@@ -370,6 +370,8 @@ void FireGrapplingHook(entity actor)
        missile.reset = GrapplingHookReset;
        missile.classname = "grapplinghook";
        missile.flags = FL_PROJECTILE;
+       IL_PUSH(g_projectiles, missile);
+       IL_PUSH(g_bot_dodge, missile);
 
        set_movetype(missile, ((autocvar_g_balance_grapplehook_gravity) ? MOVETYPE_TOSS : MOVETYPE_FLY));
        PROJECTILE_MAKETRIGGER(missile);
@@ -396,6 +398,8 @@ void FireGrapplingHook(entity actor)
        missile.takedamage = DAMAGE_AIM;
        missile.damageforcescale = 0;
        missile.damagedbycontents = (autocvar_g_balance_grapplehook_damagedbycontents);
+       if(missile.damagedbycontents)
+               IL_PUSH(g_damagedbycontents, missile);
 
        missile.hook_start = missile.hook_end = missile.origin;