X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_hook.qc;h=453cfc1e70d3664d1725e795c685c36c1e00cb69;hb=fd4ca19778a130ede47cf94b5f26f34555ec5f5f;hp=68aa7154ecdc3928261ea584bd251be2c86d2c03;hpb=070ebb9d95214bf817392d9286608c812a2a7bd9;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index 68aa7154e..453cfc1e7 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -338,15 +338,15 @@ void GrapplingHookTouch(entity this, entity toucher) void GrapplingHook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force) { - if(GetResourceAmount(this, RESOURCE_HEALTH) <= 0) + if(GetResource(this, RES_HEALTH) <= 0) return; if (!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions return; // g_balance_projectiledamage says to halt - TakeResource(this, RESOURCE_HEALTH, damage); + TakeResource(this, RES_HEALTH, damage); - if (GetResourceAmount(this, RESOURCE_HEALTH) <= 0) + if (GetResource(this, RES_HEALTH) <= 0) { if(attacker != this.realowner) { @@ -360,7 +360,7 @@ void GrapplingHook_Damage(entity this, entity inflictor, entity attacker, float void FireGrapplingHook(entity actor, .entity weaponentity) { - if(forbidWeaponUse(actor)) return; + if(weaponLocked(actor)) return; if(actor.vehicle) return; // TODO: offhand hook shoots from eye @@ -397,7 +397,7 @@ void FireGrapplingHook(entity actor, .entity weaponentity) missile.effects = /*EF_FULLBRIGHT | EF_ADDITIVE |*/ EF_LOWPRECISION; - SetResourceAmountExplicit(missile, RESOURCE_HEALTH, autocvar_g_balance_grapplehook_health); + SetResourceExplicit(missile, RES_HEALTH, autocvar_g_balance_grapplehook_health); missile.event_damage = GrapplingHook_Damage; missile.takedamage = DAMAGE_AIM; missile.damageforcescale = 0;