X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_hook.qc;h=0fc60b2cdc1ffef3f4a2bac6832822e2a0c91db3;hp=fbb4271dfbdaedfd46acdfb280615576fa76c878;hb=d865de7a9a17c5a1d9286aec40f68c3530697660;hpb=7d31b5422a49f7dced6a7384337b4fc84031a6e3 diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index fbb4271df..0fc60b2cd 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -1,5 +1,8 @@ #include "g_hook.qh" +#include +#include +#include #include "weapons/common.qh" #include "weapons/csqcprojectile.qh" #include "weapons/weaponsystem.qh" @@ -79,6 +82,8 @@ void RemoveGrapplingHooks(entity pl) for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) { .entity weaponentity = weaponentities[slot]; + if(!pl.(weaponentity)) + continue; // continue incase other slots exist? if(pl.(weaponentity).hook) delete(pl.(weaponentity).hook); pl.(weaponentity).hook = NULL;