Xonotic
|
#include "damage.qh"
#include <common/constants.qh>
#include <common/deathtypes/all.qh>
#include <common/effects/all.qh>
#include <common/gamemodes/_mod.qh>
#include <common/gamemodes/rules.qh>
#include <common/items/_mod.qh>
#include <common/mapobjects/defs.qh>
#include <common/mapobjects/triggers.qh>
#include <common/mutators/mutator/buffs/buffs.qh>
#include <common/mutators/mutator/buffs/sv_buffs.qh>
#include <common/mutators/mutator/instagib/sv_instagib.qh>
#include <common/mutators/mutator/status_effects/_mod.qh>
#include <common/mutators/mutator/waypoints/waypointsprites.qh>
#include <common/notifications/all.qh>
#include <common/physics/movetypes/movetypes.qh>
#include <common/physics/player.qh>
#include <common/playerstats.qh>
#include <common/resources/sv_resources.qh>
#include <common/state.qh>
#include <common/teams.qh>
#include <common/util.qh>
#include <common/vehicles/all.qh>
#include <common/weapons/_all.qh>
#include <lib/csqcmodel/sv_model.qh>
#include <lib/warpzone/common.qh>
#include <server/bot/api.qh>
#include <server/client.qh>
#include <server/gamelog.qh>
#include <server/hook.qh>
#include <server/items/items.qh>
#include <server/main.qh>
#include <server/mutators/_mod.qh>
#include <server/scores.qh>
#include <server/spawnpoints.qh>
#include <server/teamplay.qh>
#include <server/weapons/accuracy.qh>
#include <server/weapons/csqcprojectile.qh>
#include <server/weapons/selection.qh>
#include <server/weapons/weaponsystem.qh>
#include <server/world.qh>
Go to the source code of this file.
Macros | |
#define | SPREE_ITEM(counta, countb, center, normal, gentle) |
Functions | |
string | AppendItemcodes (string s, entity player) |
void | Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force) |
float | Fire_AddDamage (entity e, entity o, float d, float t, float dt) |
void | Fire_ApplyDamage (entity e) |
bool | frag_centermessage_override (entity attacker, entity targ, int deathtype, int kill_count_to_attacker, int kill_count_to_target, string attacker_name) |
void | Freeze (entity targ, float revivespeed, int frozen_type, bool show_waypoint) |
void | GiveFrags (entity attacker, entity targ, float f, int deathtype,.entity weaponentity) |
bool | Heal (entity targ, entity inflictor, float amount, float limit) |
void | Ice_Think (entity this) |
void | LogDeath (string mode, int deathtype, entity killer, entity killed) |
void | Obituary (entity attacker, entity inflictor, entity targ, int deathtype,.entity weaponentity) |
void | Obituary_SpecialDeath (entity notif_target, float murder, int deathtype, string s1, string s2, string s3, float f1, float f2, float f3) |
float | Obituary_WeaponDeath (entity notif_target, float murder, int deathtype, string s1, string s2, string s3, float f1, float f2) |
float | RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype,.entity weaponentity, entity directhitentity) |
float | RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, float forcezscale, int deathtype,.entity weaponentity, entity directhitentity) |
void | Unfreeze (entity targ, bool reset_health) |
void | UpdateFrags (entity player, int f) |
#define SPREE_ITEM | ( | counta, | |
countb, | |||
center, | |||
normal, | |||
gentle | |||
) |
Definition at line 87 of file damage.qc.
References cnt, ftos(), M_ARGV, MAX_WEAPONSLOTS, MUTATOR_CALLHOOK, PHYS_INPUT_BUTTON_CHAT, strcat(), and weaponentities.
Referenced by LogDeath().
void Damage | ( | entity | targ, |
entity | inflictor, | ||
entity | attacker, | ||
float | damage, | ||
int | deathtype, | ||
.entity | weaponentity, | ||
vector | hitloc, | ||
vector | force | ||
) |
Definition at line 583 of file damage.qc.
References ACTIVE_ACTIVE, autocvar_g_balance_armor_blockpercent, autocvar_g_balance_damagepush_speedfactor, autocvar_g_balance_selfdamagepercent, autocvar_g_friendlyfire, autocvar_g_friendlyfire_virtual, autocvar_g_friendlyfire_virtual_force, autocvar_g_frozen_damage_trigger, autocvar_g_frozen_force, autocvar_g_frozen_revive_falldamage, autocvar_g_frozen_revive_falldamage_health, autocvar_g_mirrordamage, autocvar_g_mirrordamage_onlyweapons, autocvar_g_mirrordamage_virtual, autocvar_g_teamdamage_threshold, autocvar_g_weapondamagefactor, autocvar_g_weaponforcefactor, autocvar_teamplay_mode, CS(), Damage(), DAMAGE_AIM, damage_explosion_calcpush(), DEAD_NO, DEATH_ISSPECIAL, DEATH_ISWEAPON, DEATH_WEAPONOF, DIFF_TEAM, EF_TELEPORT_BIT, entity(), FL_GODMODE, FORCETYPE_FORCEATPOS, FRAGS_SPECTATOR, GetResource(), HITTYPE_SOUND, hook, impressive_hits, IS_CLIENT, IS_DEAD, IS_INDEPENDENT_PLAYER, IS_MONSTER, IS_PLAYER, IS_TURRET, IS_VEHICLE, IsFlying(), ITEM_DAMAGE_NEEDKILL, killcount, M_ARGV, MAX_WEAPONSLOTS, MOVETYPE_NOCLIP, MOVETYPE_PHYSICS, MUTATOR_CALLHOOK, normalize(), NULL, PHYS_INPUT_BUTTON_CHAT, RemoveHook(), RES_HEALTH, SAME_TEAM, SelectSpawnPoint(), setorigin(), SetResource(), SetResourceExplicit(), setthink, STATUSEFFECT_REMOVE_CLEAR, teamkill_complain, time, Unfreeze(), UNSET_ONGROUND, UpdateCSQCProjectile(), v, vector(), vehicles_exit(), vlen(), weaponentities, and yoda.
Referenced by buff_Vengeance_DelayedDamage(), checkpoint_passed(), ClientKill_Now(), CommonCommand_editmob(), CreatureFrame_FallDamage(), CreatureFrame_hotliquids(), ctf_CaptureShield_Touch(), Damage(), door_blocked(), door_generic_plat_blocked(), DrownPlayer(), Fire_ApplyDamage(), fireBullet_antilag(), generic_plat_blocked(), havocbot_role_ctf_carrier(), instagib_countdown(), KillPlayerForTeamChange(), Monster_Attack_Melee(), Monster_Move(), Monster_Think(), MUTATOR_HOOKFUNCTION(), ons_CaptureShield_Touch(), Onslaught_CheckWinner(), plat_crush(), RadiusDamageForSource(), vehicles_impact(), and vehicles_touch().
Definition at line 1077 of file damage.qc.
References accuracy_add(), accuracy_isgooddamage(), DEATH_WEAPONOF, IS_DEAD, IS_PLAYER, max(), min(), and time.
Referenced by CreatureFrame_hotliquids(), and MUTATOR_HOOKFUNCTION().
Definition at line 1187 of file damage.qc.
References Damage(), DMG_NOWEP, entity(), frametime, g_damagedbycontents, IL_EACH, IS_INDEPENDENT_PLAYER, IS_NOT_A_CLIENT, min(), and time.
bool frag_centermessage_override | ( | entity | attacker, |
entity | targ, | ||
int | deathtype, | ||
int | kill_count_to_attacker, | ||
int | kill_count_to_target, | ||
string | attacker_name | ||
) |
Definition at line 217 of file damage.qc.
References CS(), GetResource(), IS_BOT_CLIENT, MUTATOR_CALLHOOK, ping, and RES_HEALTH.
Referenced by Obituary().
Definition at line 494 of file damage.qc.
References entity(), floor(), FOREACH_CLIENT, Freeze(), FROZEN_TEMP_DYING, g_bot_targets, Ice_Think(), IL_REMOVE(), IS_MONSTER, IS_PLAYER, MAX_WEAPONSLOTS, MUTATOR_CALLHOOK, NULL, random(), RemoveGrapplingHooks(), RemoveHook(), RES_HEALTH, setmodel, SetResource(), setthink, start_health, Team_ColorRGB(), time, and weaponentities.
Referenced by Freeze(), and freezetag_Freeze().
Definition at line 49 of file damage.qc.
References GameRules_scoring_add, M_ARGV, MUTATOR_CALLHOOK, UpdateFrags(), and warmup_stage.
Referenced by Obituary().
Definition at line 1063 of file damage.qc.
References CS(), FRAGS_SPECTATOR, IS_CLIENT, IS_DEAD, and killcount.
Definition at line 106 of file damage.qc.
References AppendItemcodes(), autocvar_sv_eventlog, Deathtype_Name(), ftos(), GameLogEcho(), and strcat().
Referenced by Obituary().
void Obituary | ( | entity | attacker, |
entity | inflictor, | ||
entity | targ, | ||
int | deathtype, | ||
.entity | weaponentity | ||
) |
Definition at line 229 of file damage.qc.
References APP_TEAM_NUM, backtrace, buff_FirstFromFlags(), checkrules_firstblood, CS(), DEATH_ENT, DEATH_ISSPECIAL, deathmessage, Deathtype_Name(), frag_centermessage_override(), GameRules_scoring_add, GetResource(), GiveFrags(), IS_BOT_CLIENT, IS_PLAYER, KILL_SPREE_LIST, killcount, LogDeath(), M_ARGV, MUTATOR_CALLHOOK, NearestLocation(), NULL, Obituary_SpecialDeath(), Obituary_WeaponDeath(), ping, RES_HEALTH, SAME_TEAM, strcat(), strstrofs, time, and warmup_stage.
Referenced by PlayerDamage().
void Obituary_SpecialDeath | ( | entity | notif_target, |
float | murder, | ||
int | deathtype, | ||
string | s1, | ||
string | s2, | ||
string | s3, | ||
float | f1, | ||
float | f2, | ||
float | f3 | ||
) |
Definition at line 125 of file damage.qc.
References backtrace, DEATH_ISSPECIAL, DT_FIRST, entity(), g_cts, and REGISTRY_GET.
Referenced by Obituary().
float Obituary_WeaponDeath | ( | entity | notif_target, |
float | murder, | ||
int | deathtype, | ||
string | s1, | ||
string | s2, | ||
string | s3, | ||
float | f1, | ||
float | f2 | ||
) |
Definition at line 170 of file damage.qc.
References DEATH_WEAPONOF, LOG_TRACEF, Weapon::netname, and w_deathtype.
Referenced by Obituary().
float RadiusDamage | ( | entity | inflictor, |
entity | attacker, | ||
float | coredamage, | ||
float | edgedamage, | ||
float | rad, | ||
entity | cantbe, | ||
entity | mustbe, | ||
float | forceintensity, | ||
int | deathtype, | ||
.entity | weaponentity, | ||
entity | directhitentity | ||
) |
Definition at line 1057 of file damage.qc.
References RadiusDamageForSource().
Referenced by CheatImpulse(), PlayerTouchExplode(), and vehicles_projectile_explode().
float RadiusDamageForSource | ( | entity | inflictor, |
vector | inflictororigin, | ||
vector | inflictorvelocity, | ||
entity | attacker, | ||
float | coredamage, | ||
float | edgedamage, | ||
float | rad, | ||
entity | cantbe, | ||
entity | mustbe, | ||
float | inflictorselfdamage, | ||
float | forceintensity, | ||
float | forcezscale, | ||
int | deathtype, | ||
.entity | weaponentity, | ||
entity | directhitentity | ||
) |
Definition at line 866 of file damage.qc.
References accuracy_add(), accuracy_isgooddamage(), autocvar_g_throughfloor_damage, autocvar_g_throughfloor_damage_max_stddev, autocvar_g_throughfloor_debug, autocvar_g_throughfloor_force, autocvar_g_throughfloor_force_max_stddev, autocvar_g_throughfloor_max_steps_other, autocvar_g_throughfloor_max_steps_player, autocvar_g_throughfloor_min_steps_other, autocvar_g_throughfloor_min_steps_player, backtrace, bound(), ceil(), CENTER_OR_VIEWOFS, Damage(), Damage_DamageInfo(), DEATH_ISSPECIAL, DEATH_WEAPONOF, entity(), HITTYPE_BOUNCE, HITTYPE_SECONDARY, HITTYPE_SOUND, HITTYPE_SPLASH, IS_PLAYER, LOG_INFOF, max(), MAX_DAMAGEEXTRARADIUS, min(), MIN_DAMAGEEXTRARADIUS, MOVE_NOMONSTERS, next, normalize(), RadiusDamage_running, random(), sqrt(), trace_ent, trace_fraction, vector(), vlen(), WarpZone_FindRadius(), WarpZone_TraceLine(), WarpZone_TransformOrigin(), and WarpZone_UnTransformOrigin().
Referenced by RadiusDamage().
Definition at line 546 of file damage.qc.
References autocvar_g_balance_pause_health_regen, FOREACH_CLIENT, FROZEN_TEMP_DYING, g_bot_targets, IL_PUSH(), IS_PLAYER, MAX_WEAPONSLOTS, MUTATOR_CALLHOOK, NULL, RemoveHook(), RES_HEALTH, SetResource(), start_health, time, Unfreeze(), and weaponentities.
Referenced by ClientDisconnect(), Damage(), ft_RemovePlayer(), Monster_Dead(), Monster_Frozen_Think(), Monster_Reset(), MUTATOR_HOOKFUNCTION(), PlayerDamage(), PlayerPreThink(), PutObserverInServer(), PutPlayerInServer(), reset_map(), and Unfreeze().
Definition at line 44 of file damage.qc.
References GameRules_scoring_add_team.
Referenced by GiveFrags(), and kh_Scores_Event().