|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "damage.qh"#include <common/constants.qh>#include <common/deathtypes/all.qh>#include <common/effects/all.qh>#include <common/gametypes/_mod.qh>#include <common/gametypes/rules.qh>#include <common/items/_mod.qh>#include <common/mapobjects/defs.qh>#include <common/mapobjects/triggers.qh>#include <common/mutators/mutator/buffs/_mod.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 | GiveFrags (entity attacker, entity targ, float f, int deathtype,.entity weaponentity) |
| bool | Heal (entity targ, entity inflictor, float amount, float limit) |
| 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, bool msg_from_ent, int deathtype, string s1, string s2, string s3, string s4, 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, vector forcexyzscale, int deathtype,.entity weaponentity, entity directhitentity) |
| #define SPREE_ITEM | ( | counta, | |
| countb, | |||
| center, | |||
| normal, | |||
| gentle ) |
Definition at line 83 of file damage.qc.
References cnt, entity(), ftos(), M_ARGV, m_weapon, 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 503 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_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(), DEATH_ISSPECIAL, DEATH_ISWEAPON, DEATH_WEAPONOF, DIFF_TEAM, entity(), FL_GODMODE, FORCETYPE_FORCEATPOS, FRAGS_SPECTATOR, game_stopped, GetResource(), healtharmor_applydamage(), HITTYPE_SOUND, HITTYPE_SPAM, impressive_hits, IS_CLIENT, IS_DEAD, IS_INDEPENDENT_PLAYER, IS_MONSTER, IS_PLAYER, IS_TURRET, IS_VEHICLE, IsFlying(), killcount, M_ARGV, MAX_WEAPONSLOTS, MOVETYPE_NOCLIP, MOVETYPE_PHYSICS, MUTATOR_CALLHOOK, normalize(), PHYS_INPUT_BUTTON_CHAT, RemoveHook(), RES_ARMOR, SAME_TEAM, SetResourceExplicit(), setthink, STAT, STATUSEFFECT_REMOVE_CLEAR, StatusEffects_active(), StatusEffects_remove(), SUB_Remove(), teamkill_complain, time, UNSET_ONGROUND, UpdateCSQCProjectile(), vector, vehicles_exit(), VHEF_RELEASE, vlen(), weaponentities, and yoda.
Referenced by buff_Vengeance_DelayedDamage(), bumblebee_pilot_frame(), ClientKill_Now(), CommonCommand_editmob(), CreatureFrame_FallDamage(), CreatureFrame_hotliquids(), ctf_CaptureShield_Touch(), Damage(), door_blocked(), door_generic_plat_blocked(), DrownPlayer(), Fire_ApplyDamage(), fireBullet_falloff(), generic_plat_blocked(), havocbot_role_ctf_carrier(), instagib_countdown(), KillPlayerForTeamChange(), M_Zombie_Attack_Leap_Touch(), misc_laser_think(), Monster_Attack_Melee(), Monster_Move(), Monster_Think(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), nade_heal_touch(), nade_spawn_DestroyDamage(), nade_translocate_DestroyDamage(), ons_CaptureShield_Touch(), Onslaught_CheckWinner(), plat_crush(), RadiusDamageForSource(), target_kill_use(), tdeath(), trigger_hurt_touch(), vehicles_impact(), vehicles_touch(), W_Arc_Beam_Think(), W_Fireball_Explode(), W_OverkillRocketPropelledChainsaw_Think(), W_Shotgun_Melee_Think(), and walker_melee_do_dmg().
Definition at line 1002 of file damage.qc.
References accuracy_add(), accuracy_isgooddamage(), DEATH_WEAPONOF, entity(), IS_DEAD, IS_PLAYER, max(), min(), StatusEffects_active(), StatusEffects_apply(), StatusEffects_gettime(), and time.
Referenced by CreatureFrame_hotliquids(), MUTATOR_HOOKFUNCTION(), napalm_damage(), W_Fireball_Firemine_Touch(), and W_Fireball_LaserPlay().
Definition at line 1114 of file damage.qc.
References Damage(), DMG_NOWEP, entity(), frametime, g_damagedbycontents, IL_EACH, IS_INDEPENDENT_PLAYER, IS_NOT_A_CLIENT, min(), STAT, StatusEffects_active(), StatusEffects_gettime(), 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 216 of file damage.qc.
References CS(), entity(), GetResource(), IS_BOT_CLIENT, MUTATOR_CALLHOOK, ping, RES_ARMOR, and Send_Notification().
Referenced by Obituary().
Definition at line 43 of file damage.qc.
References autocvar_g_teamkill_punishing, entity(), game_stopped, GameRules_scoring_add, GameRules_scoring_add_team, M_ARGV, MUTATOR_CALLHOOK, PlayerStats_GameReport_Event_Player, and warmup_stage.
Referenced by MUTATOR_HOOKFUNCTION(), and Obituary().
Definition at line 987 of file damage.qc.
References CS(), entity(), FRAGS_SPECTATOR, game_stopped, IS_CLIENT, IS_DEAD, killcount, and STAT.
Referenced by bumblebee_pilot_frame(), M_Mage_Defend_Heal(), MUTATOR_HOOKFUNCTION(), trigger_heal_touch(), and W_Arc_Beam_Think().
Definition at line 102 of file damage.qc.
References AppendItemcodes(), autocvar_sv_eventlog, Deathtype_Name(), entity(), ftos(), GameLogEcho(), and strcat().
Referenced by Obituary().
| void Obituary | ( | entity | attacker, |
| entity | inflictor, | ||
| entity | targ, | ||
| int | deathtype, | ||
| .entity | weaponentity ) |
Definition at line 228 of file damage.qc.
References APP_TEAM_NUM, autocvar_notification_server_allows_location, backtrace, buff_FirstFromFlags(), checkrules_firstblood, CS(), DEATH_ENT, DEATH_ISSPECIAL, deathmessage, Deathtype_Name(), entity(), 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, PLAYERSTATS_ACHIEVEMENT_BOTLIKE, PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD, PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM, PlayerStats_GameReport_Event_Player, RES_ARMOR, SAME_TEAM, Send_Notification(), strcat(), strstrofs, time, and warmup_stage.
Referenced by PlayerDamage().
| void Obituary_SpecialDeath | ( | entity | notif_target, |
| float | murder, | ||
| bool | msg_from_ent, | ||
| int | deathtype, | ||
| string | s1, | ||
| string | s2, | ||
| string | s3, | ||
| string | s4, | ||
| float | f1, | ||
| float | f2, | ||
| float | f3 ) |
Definition at line 121 of file damage.qc.
References backtrace, DEATH_ISSPECIAL, DT_FIRST, entity(), f1, f2, g_cts, REGISTRY_GET, s1, s2, and Send_Notification_WOCOVA().
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 169 of file damage.qc.
References DEATH_WEAPONOF, entity(), f1, f2, LOG_TRACEF, Weapon::netname, s1, s2, Send_Notification_WOCOVA(), w_deathtype, Weapon::wr_killmessage(), and Weapon::wr_suicidemessage().
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 981 of file damage.qc.
References entity(), and RadiusDamageForSource().
Referenced by bumblebee_blowup(), CheatImpulse(), func_breakable_destroy(), M_Golem_Attack_Lightning_Explode(), M_Golem_Attack_Smash(), M_Mage_Attack_Push(), M_Mage_Attack_Spike_Explode(), M_Spider_Attack_Web_Explode(), M_Wyvern_Attack_Fireball_Explode(), nade_normal_boom(), PlayerTouchExplode(), racer_blowup(), raptor_blowup(), raptor_bomblet_boom(), spiderbot_blowup(), turret_flac_projectile_think_explode(), turret_projectile_explode(), vehicles_projectile_explode(), W_Arc_Bolt_Explode(), W_Arc_Bolt_Touch(), W_Crylink_LinkExplode(), W_Crylink_LinkJoinEffect_Think(), W_Crylink_Touch(), W_Devastator_DoRemoteExplode(), W_Electro_Explode(), W_Electro_ExplodeCombo(), W_Electro_ExplodeComboThink(), W_Fireball_Explode(), W_Hagar_Explode(), W_Hagar_Explode2(), W_HLAC_Touch(), W_Hook_ExplodeThink(), W_MineLayer_DoRemoteExplode(), W_MineLayer_Explode(), W_Mortar_Grenade_Explode(), W_Mortar_Grenade_Explode2(), W_OverkillRocketPropelledChainsaw_Explode(), W_RocketMinsta_Explosion(), W_RocketMinsta_Laser_Damage(), W_Seeker_Flac_Explode(), W_Seeker_Missile_Explode(), W_Tuba_NoteOn(), and walker_rocket_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, | ||
| vector | forcexyzscale, | ||
| int | deathtype, | ||
| .entity | weaponentity, | ||
| entity | directhitentity ) |
Definition at line 741 of file damage.qc.
References accuracy_add(), accuracy_isgooddamage(), antilag_debug, ANTILAG_LATENCY, autocvar_g_player_damageplayercenter, 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, CS(), Damage(), Damage_DamageInfo(), DEATH_ISSPECIAL, DEATH_WEAPONOF, entity(), HITTYPE_SOUND, HITTYPE_SPAM, HITTYPE_SPLASH, IS_CLIENT, IS_PLAYER, LOG_INFOF, max(), MAX_DAMAGEEXTRARADIUS, min(), MIN_DAMAGEEXTRARADIUS, MOVE_NOMONSTERS, MOVE_NORMAL, movedir, NearestPointOnBoundingBox(), next, normalize(), RadiusDamage_running, random(), sqrt(), trace_endpos, trace_ent, trace_fraction, tracebox_antilag(), v_right, v_up, vector, vlen(), WarpZone_FindRadius(), WarpZone_TraceLine(), and WarpZone_UnTransformOrigin().
Referenced by RadiusDamage(), W_Blaster_Touch(), and W_Devastator_Explode().