]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Attach the hook properly to entities even if they have the NONE movetype, and remove...
authorMario <mario@smbclan.net>
Fri, 15 Jun 2018 13:40:29 +0000 (23:40 +1000)
committerMario <mario@smbclan.net>
Fri, 15 Jun 2018 13:40:29 +0000 (23:40 +1000)
qcsrc/common/mapobjects/func/breakable.qc
qcsrc/server/g_hook.qc

index d8f6cb1384e72952d7034ae40317a77a130d5bb5..2b4d5f232ffebeee25c194629a9feeb11ffeab8a 100644 (file)
@@ -141,6 +141,11 @@ void func_breakable_behave_destroyed(entity this)
        func_breakable_colormod(this);
        if (this.noise1)
                stopsound (this, CH_TRIGGER_SINGLE);
+
+       IL_EACH(g_projectiles, it.classname == "grapplinghook" && it.aiment == this,
+       {
+               RemoveHook(it);
+       });
 }
 
 void func_breakable_think(entity this)
index 09135d4827913c2f13229356f9f6bba604cb486f..b9e95c6236c31c7bbc36e37c327f127e3fc12ef4 100644 (file)
@@ -327,7 +327,7 @@ void GrapplingHookTouch(entity this, entity toucher)
        GrapplingHook_Stop(this);
 
        if(toucher)
-               if(toucher.move_movetype != MOVETYPE_NONE)
+               //if(toucher.move_movetype != MOVETYPE_NONE)
                {
                        SetMovetypeFollow(this, toucher);
                        WarpZone_RefSys_BeginAddingIncrementally(this, this.aiment);