X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_hook.qc;h=cccba42bb42128fff96050498f317875c050c360;hp=1b2662d6e4ede1927712d46266b2afc2f9533771;hb=c1389c740a4a144e46543e51296ad90ade3c365b;hpb=9185b58da6fe5f2b095d7066577e1e024b4d2798 diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index 1b2662d6e..cccba42bb 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -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,8 @@ #include "../common/vehicles/all.qh" #include "../common/constants.qh" #include "../common/util.qh" -#include "../common/weapons/all.qh" +#include +#include #include "../lib/warpzone/common.qh" #include "../lib/warpzone/server.qh" @@ -143,7 +144,7 @@ void GrapplingHookThink(entity this) error("Owner lost the hook!\n"); return; } - if(LostMovetypeFollow(this) || intermission_running || (round_handler_IsActive() && !round_handler_IsRoundStarted()) || ((this.aiment.flags & FL_PROJECTILE) && this.aiment.classname != "nade")) + if(LostMovetypeFollow(this) || gameover || (round_handler_IsActive() && !round_handler_IsRoundStarted()) || ((this.aiment.flags & FL_PROJECTILE) && this.aiment.classname != "nade")) { RemoveGrapplingHook(this.realowner); return; @@ -371,6 +372,7 @@ void FireGrapplingHook(entity actor) 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); @@ -397,6 +399,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;