X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_damage.qc;h=01b4926ecd743c04c21c54a2b02fba7c853c64e6;hb=5d929ee0b1dc587e3154a4fa4b56e83b9ba9100b;hp=fb755b705bcf4fabb7cacecdd52be329a9f3b89f;hpb=3fc2359b7933352424af07db8f84cbb9342e934f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index fb755b705..01b4926ec 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -216,7 +216,7 @@ bool frag_centermessage_override(entity attacker, entity targ, int deathtype, in if(deathtype == DEATH_FIRE.m_id) { Send_Notification(NOTIF_ONE, attacker, MSG_CHOICE, CHOICE_FRAG_FIRE, targ.netname, kill_count_to_attacker, (IS_BOT_CLIENT(targ) ? -1 : CS(targ).ping)); - Send_Notification(NOTIF_ONE, targ, MSG_CHOICE, CHOICE_FRAGGED_FIRE, attacker.netname, kill_count_to_target, GetResourceAmount(attacker, RES_HEALTH), GetResourceAmount(attacker, RES_ARMOR), (IS_BOT_CLIENT(attacker) ? -1 : CS(attacker).ping)); + Send_Notification(NOTIF_ONE, targ, MSG_CHOICE, CHOICE_FRAGGED_FIRE, attacker.netname, kill_count_to_target, GetResource(attacker, RES_HEALTH), GetResource(attacker, RES_ARMOR), (IS_BOT_CLIENT(attacker) ? -1 : CS(attacker).ping)); return true; } @@ -371,8 +371,8 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en CHOICE_TYPEFRAGGED, attacker.netname, kill_count_to_target, - GetResourceAmount(attacker, RES_HEALTH), - GetResourceAmount(attacker, RES_ARMOR), + GetResource(attacker, RES_HEALTH), + GetResource(attacker, RES_ARMOR), (IS_BOT_CLIENT(attacker) ? -1 : CS(attacker).ping) ); } @@ -394,8 +394,8 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en CHOICE_FRAGGED, attacker.netname, kill_count_to_target, - GetResourceAmount(attacker, RES_HEALTH), - GetResourceAmount(attacker, RES_ARMOR), + GetResource(attacker, RES_HEALTH), + GetResource(attacker, RES_ARMOR), (IS_BOT_CLIENT(attacker) ? -1 : CS(attacker).ping) ); } @@ -490,7 +490,7 @@ void Freeze(entity targ, float revivespeed, int frozen_type, bool show_waypoint) STAT(FROZEN, targ) = frozen_type; STAT(REVIVE_PROGRESS, targ) = ((frozen_type == FROZEN_TEMP_DYING) ? 1 : 0); - SetResourceAmount(targ, RES_HEALTH, ((frozen_type == FROZEN_TEMP_DYING) ? targ_maxhealth : 1)); + SetResource(targ, RES_HEALTH, ((frozen_type == FROZEN_TEMP_DYING) ? targ_maxhealth : 1)); targ.revive_speed = revivespeed; if(targ.bot_attack) IL_REMOVE(g_bot_targets, targ); @@ -535,7 +535,7 @@ void Unfreeze(entity targ, bool reset_health) return; if (reset_health && STAT(FROZEN, targ) != FROZEN_TEMP_DYING) - SetResourceAmount(targ, RES_HEALTH, ((IS_PLAYER(targ)) ? start_health : targ.max_health)); + SetResource(targ, RES_HEALTH, ((IS_PLAYER(targ)) ? start_health : targ.max_health)); targ.pauseregen_finished = time + autocvar_g_balance_pause_health_regen; @@ -595,9 +595,9 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de // These are ALWAYS lethal // No damage modification here // Instead, prepare the victim for his death... - SetResourceAmount(targ, RES_ARMOR, 0); + SetResource(targ, RES_ARMOR, 0); targ.spawnshieldtime = 0; - SetResourceAmount(targ, RES_HEALTH, 0.9); // this is < 1 + SetResource(targ, RES_HEALTH, 0.9); // this is < 1 targ.flags -= targ.flags & FL_GODMODE; damage = 100000; } @@ -638,7 +638,7 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de if(autocvar_g_mirrordamage_virtual) { - vector v = healtharmor_applydamage(GetResourceAmount(attacker, RES_ARMOR), autocvar_g_balance_armor_blockpercent, deathtype, mirrordamage); + vector v = healtharmor_applydamage(GetResource(attacker, RES_ARMOR), autocvar_g_balance_armor_blockpercent, deathtype, mirrordamage); attacker.dmg_take += v.x; attacker.dmg_save += v.y; attacker.dmg_inflictor = inflictor; @@ -648,7 +648,7 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de if(autocvar_g_friendlyfire_virtual) { - vector v = healtharmor_applydamage(GetResourceAmount(targ, RES_ARMOR), autocvar_g_balance_armor_blockpercent, deathtype, damage); + vector v = healtharmor_applydamage(GetResource(targ, RES_ARMOR), autocvar_g_balance_armor_blockpercent, deathtype, damage); targ.dmg_take += v.x; targ.dmg_save += v.y; targ.dmg_inflictor = inflictor; @@ -694,7 +694,7 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de if(autocvar_g_frozen_revive_falldamage > 0 && deathtype == DEATH_FALL.m_id && damage >= autocvar_g_frozen_revive_falldamage) { Unfreeze(targ, false); - SetResourceAmount(targ, RES_HEALTH, autocvar_g_frozen_revive_falldamage_health); + SetResource(targ, RES_HEALTH, autocvar_g_frozen_revive_falldamage_health); Send_Effect(EFFECT_ICEORGLASS, targ.origin, '0 0 0', 3); Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_FREEZETAG_REVIVED_FALL, targ.netname); Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_FREEZETAG_REVIVE_SELF);