From: Mario Date: Fri, 15 Jun 2018 13:40:29 +0000 (+1000) Subject: Attach the hook properly to entities even if they have the NONE movetype, and remove... X-Git-Tag: xonotic-v0.8.5~2049 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=79dbe32e742d81b8b77e35d23a1a0d5df41b4b68;p=xonotic%2Fxonotic-data.pk3dir.git Attach the hook properly to entities even if they have the NONE movetype, and remove attached hooks when func_breakable is destroyed --- diff --git a/qcsrc/common/mapobjects/func/breakable.qc b/qcsrc/common/mapobjects/func/breakable.qc index d8f6cb138..2b4d5f232 100644 --- a/qcsrc/common/mapobjects/func/breakable.qc +++ b/qcsrc/common/mapobjects/func/breakable.qc @@ -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) diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index 09135d482..b9e95c623 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -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);