|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "sv_monsters.qh"#include <common/checkextension.qh>#include <common/constants.qh>#include <common/deathtypes/all.qh>#include <common/items/_mod.qh>#include <common/mapobjects/teleporters.qh>#include <common/mapobjects/triggers.qh>#include <common/monsters/all.qh>#include <common/mutators/mutator/nades/_mod.qh>#include <common/mutators/mutator/status_effects/_mod.qh>#include <common/physics/movelib.qh>#include <common/stats.qh>#include <common/teams.qh>#include <common/turrets/sv_turrets.qh>#include <common/turrets/util.qh>#include <common/util.qh>#include <common/vehicles/all.qh>#include <common/weapons/_all.qh>#include <common/weapons/_mod.qh>#include <lib/csqcmodel/sv_model.qh>#include <lib/warpzone/common.qh>#include <server/campaign.qh>#include <server/cheats.qh>#include <server/client.qh>#include <server/command/_mod.qh>#include <server/damage.qh>#include <server/items/items.qh>#include <server/mutators/_mod.qh>#include <server/round_handler.qh>#include <server/steerlib.qh>#include <server/weapons/_mod.qh>Go to the source code of this file.
Macros | |
| #define | _MSOUND(m) |
| #define | _MSOUND(m) |
Variables | |
| entity | draggedby |
| vector | pos1 |
| vector | pos2 |
| int | skin_for_monstersound |
| #define _MSOUND | ( | m | ) |
| #define _MSOUND | ( | m | ) |
Definition at line 264 of file sv_monsters.qc.
References ftos(), and strcat().
Referenced by Monster_Sounds_Update().
Definition at line 1219 of file sv_monsters.qc.
References anim_state, animdecide_setimplicitstate(), animdecide_setstate(), ANIMSTATE_DEAD1, ANIMSTATE_DEAD2, ANIMSTATE_DUCK, ANIMSTATE_FROZEN, entity(), IS_DEAD, IS_DUCKED, IS_ONGROUND, random(), and StatusEffects_active().
Referenced by Monster_Think().
Definition at line 978 of file sv_monsters.qc.
References enemy, entity(), Monster_Spawn(), and monsterdef.
Referenced by Monster_Appear_Check().
Definition at line 984 of file sv_monsters.qc.
References entity(), FL_MONSTER, flags, func_null(), Monster_Appear(), monsterdef, MONSTERFLAG_APPEAR, nextthink, setthink, spawnflags, and use.
Referenced by Monster_Spawn().
Definition at line 452 of file sv_monsters.qc.
References attack_finished_single, autocvar_g_monsters_target_infront, CH_VOICE, entity(), game_stopped, MONSTER_ATTACK_MELEE, MONSTER_ATTACK_RANGED, monster_facing(), monster_makevectors(), Monster_Sound(), MONSTERFLAG_INFRONT, spawnflags, time, vdist, and weaponslot().
Referenced by Monster_Think().
| bool Monster_Attack_Leap | ( | entity | this, |
| vector | anm, | ||
| void(entity this, entity toucher) | touchfunc, | ||
| vector | vel, | ||
| float | animtime ) |
Definition at line 430 of file sv_monsters.qc.
References anim_finished, animstate_endtime, attack_finished_single, entity(), IS_MONSTER, Monster_Attack_Leap_Check(), MONSTER_ATTACK_RANGED, setanim, settouch, state, time, toucher, UNSET_ONGROUND, vector, and velocity.
Referenced by M_Zombie_Attack().
Definition at line 408 of file sv_monsters.qc.
References attack_finished_single, enemy, entity(), GetResource(), IS_DEAD, IS_MONSTER, IS_ONGROUND, state, time, trace_ent, vector, and velocity.
Referenced by Monster_Attack_Leap().
| bool Monster_Attack_Melee | ( | entity | this, |
| entity | targ, | ||
| float | damg, | ||
| vector | anim, | ||
| float | er, | ||
| float | animtime, | ||
| int | deathtype, | ||
| bool | dostop ) |
Definition at line 389 of file sv_monsters.qc.
References anim, anim_finished, animstate_endtime, attack_finished_single, Damage(), DMG_NOWEP, entity(), IS_MONSTER, MONSTER_ATTACK_MELEE, MONSTER_SKILLMOD, normalize(), origin, setanim, state, time, trace_ent, v_forward, vector, and view_ofs.
Referenced by M_Golem_Attack_Swing(), and M_Zombie_Attack().
Definition at line 204 of file sv_monsters.qc.
References entity(), g_monster_targets, IL_PUSH(), monster_attack, monster_setupcolors(), sprite, team, Team_ColorRGB(), teamplay, and WaypointSprite_UpdateTeamRadar().
Definition at line 710 of file sv_monsters.qc.
References CONTENT_LAVA, CONTENT_SLIME, CONTENT_SOLID, entity(), FL_FLY, FL_SWIM, flags, maxs, mins, NULL, origin, Q3SURFACEFLAG_SKY, trace_dphitq3surfaceflags, trace_endpos, tracebox_hits_trigger_hurt(), vector, and view_ofs.
Referenced by Monster_Move().
| void Monster_Damage | ( | entity | this, |
| entity | inflictor, | ||
| entity | attacker, | ||
| float | damage, | ||
| int | deathtype, | ||
| .entity | weaponentity, | ||
| vector | hitloc, | ||
| vector | force ) |
Definition at line 1086 of file sv_monsters.qc.
References ATTEN_NORM, bound(), candrop, CH_PAIN, damageforcescale, dmg_time, enemy, entity(), GetResource(), healtharmor_applydamage(), ITEM_DAMAGE_NEEDKILL, Monster_Dead(), Monster_Sound(), monsterdef, MONSTERFLAG_INVINCIBLE, Monster::mr_pain(), MSG_BROADCAST, MUTATOR_CALLHOOK, nextthink, NULL, oldtarget2, RES_ARMOR, setthink, sound_allowed(), spamsound(), spawnflags, sprite, StatusEffects_active(), SUB_Remove(), SUB_UseTargets(), TakeResource(), target2, time, vector, velocity, Violence_GibSplash(), Violence_GibSplash_At(), VOL_BASE, WaypointSprite_Kill(), and WaypointSprite_UpdateHealth().
Referenced by Monster_Spawn().
Definition at line 1036 of file sv_monsters.qc.
References attack_finished_single, autocvar_g_monsters_score_kill, autocvar_g_monsters_score_spawned, CH_VOICE, CSQCModel_UnlinkEntity(), DAMAGE_AIM, DEAD_DEAD, deadflag, DPCONTENTS_BODY, dphitcontentsmask, effects, enemy, entity(), FL_FLY, FL_SWIM, flags, func_null(), GameRules_scoring_add, IS_PLAYER, mdl_dead, Monster_Dead_Damage(), Monster_Dead_Think(), monster_dropitem(), monster_lifetime, Monster_Sound(), Monster_Touch(), monsterdef, MONSTERFLAG_RESPAWNED, MONSTERFLAG_SPAWNED, monsters_killed, moveto, MOVETYPE_TOSS, Monster::mr_death(), nextthink, NULL, origin, set_movetype(), setthink, settouch, solid, SOLID_CORPSE, spawnflags, state, takedamage, time, totalspawned, and velocity.
Referenced by Monster_Damage().
| void Monster_Dead_Damage | ( | entity | this, |
| entity | inflictor, | ||
| entity | attacker, | ||
| float | damage, | ||
| int | deathtype, | ||
| .entity | weaponentity, | ||
| vector | hitloc, | ||
| vector | force ) |
Definition at line 1017 of file sv_monsters.qc.
References bound(), entity(), func_null(), GetResource(), nextthink, setthink, SUB_Remove(), TakeResource(), time, totalspawned, vector, and Violence_GibSplash_At().
Referenced by Monster_Dead().
Definition at line 562 of file sv_monsters.qc.
References angles, DAMAGE_NO, DEAD_RESPAWNING, deadflag, entity(), func_null(), max_health, monster_lifetime, Monster_Respawn(), Monster_Respawn_Check(), MONSTER_RESPAWN_DEATHPOINT, MONSTERFLAG_RESPAWNED, nextthink, origin, pos1, respawntime, setmodel, SetResourceExplicit(), setthink, spawnflags, SUB_SetFade(), takedamage, time, and totalspawned.
Referenced by Monster_Dead_Think().
Definition at line 963 of file sv_monsters.qc.
References entity(), Monster_Dead_Fade(), monster_lifetime, Monster::mr_deadthink(), nextthink, REGISTRY_GET, and time.
Referenced by Monster_Dead().
Definition at line 246 of file sv_monsters.qc.
References entity(), Monster_Delay(), Monster_Delay_Action(), new_pure, setthink, and time.
Referenced by M_Golem_Attack(), M_Wyvern_Attack(), M_Zombie_Defend_Block(), and Monster_Delay().
Definition at line 224 of file sv_monsters.qc.
References cnt, count, entity(), Monster_Delay_Action(), monster_makevectors(), Monster_ValidTarget(), nextthink, owner, setthink, SUB_Remove(), and time.
Referenced by Monster_Delay(), and Monster_Delay_Action().
Definition at line 40 of file sv_monsters.qc.
References autocvar_g_monsters_drop_time, autocvar_g_monsters_miniboss_loot, candrop, CENTER_OR_VIEWOFS, colormap, entity(), Item_Initialise(), Item_RandomFromList(), ITEM_SET_LOOT, M_ARGV, monster_loot, MONSTERFLAG_MINIBOSS, MUTATOR_CALLHOOK, randomvec(), spawn, and spawnflags.
Referenced by Monster_Dead().
Definition at line 1256 of file sv_monsters.qc.
References CH_VOICE, DAMAGE_NO, enemy, entity(), FL_NOTARGET, GetResource(), IS_DEAD, monster_face, Monster_FindTarget(), monster_moveto, Monster_Sound(), MOVE_NOMONSTERS, moveto, NULL, origin, STAT, trace_ent, trace_fraction, vdist, vector, WarpZone_RefSys_AddInverse(), WarpZone_RefSys_Copy(), WarpZone_RefSys_TransformOrigin(), and WarpZone_TraceLine().
Referenced by Monster_Think().
Definition at line 70 of file sv_monsters.qc.
References angles, autocvar_g_monsters_target_infront_2d, autocvar_g_monsters_target_infront_range, entity(), makevectors, normalize(), origin, v_forward, vec2, and vector.
Referenced by Monster_Attack_Check(), and Monster_ValidTarget().
Definition at line 142 of file sv_monsters.qc.
References CENTER_OR_VIEWOFS, enemy, entity(), g_monster_targets, IL_EACH, MUTATOR_CALLHOOK, NULL, and vector.
Referenced by Monster_Enemy_Check().
Definition at line 1157 of file sv_monsters.qc.
References entity(), GetResource(), GiveResourceWithLimit(), RES_LIMIT_NONE, and WaypointSprite_UpdateHealth().
Referenced by Monster_Spawn().
Definition at line 85 of file sv_monsters.qc.
References entity(), IS_MONSTER, makevectors, origin, v_angle, vectoangles(), vector, and view_ofs.
Referenced by M_Golem_Attack_Lightning(), Monster_Attack_Check(), and Monster_Delay_Action().
Definition at line 517 of file sv_monsters.qc.
References autocvar_g_monsters_miniboss_chance, autocvar_g_monsters_miniboss_healthboost, EF_RED, effects, entity(), GiveResource(), MONSTERFLAG_MINIBOSS, MONSTERFLAG_RESPAWNED, MUTATOR_CALLHOOK, random(), and spawnflags.
Referenced by Monster_Spawn_Setup().
Definition at line 781 of file sv_monsters.qc.
References angles, angles_y, anim_finished, anim_idle, anim_walk, attack_finished_single, autocvar_g_campaign, autocvar_g_monsters_teams, bound(), campaign_bots_may_start, CH_VOICE, Damage(), DIFF_TEAM, DMG_NOWEP, draggedby, enemy, entity(), find(), fixedmakevectors(), FL_FLY, FL_SWIM, flags, game_starttime, game_stopped, goalentity, IS_OBSERVER, IS_ONGROUND, IS_SPEC, last_trace, M_ARGV, min(), MONSTER_ATTACK_MELEE, MONSTER_ATTACK_RANGED, Monster_CheckDanger(), monster_face, monster_follow, Monster_Move_Target(), monster_moveto, MONSTER_SKILLMOD, Monster_Sound(), Monster_Touch(), Monster_WanderTarget(), MONSTERFLAG_FLY_VERTICAL, move_movetype, movelib_brake_simple(), movelib_move_simple, moveto, MOVETYPE_BOUNCE, MOVETYPE_WALK, MUTATOR_CALLHOOK, NULL, origin, pain_finished, random(), round_handler_IsActive, round_handler_IsRoundStarted, set_movetype(), setanim, settouch, shortangle_f(), spawn_time, spawnflags, state, StatusEffects_active(), steerlib_attract2(), steerto, target2, targetname, teamplay, time, turret_closetotarget(), v_forward, vdist, vectoangles(), vector, velocity, view_ofs, waterlevel, and WATERLEVEL_WETFEET.
Referenced by Monster_Think().
Definition at line 1170 of file sv_monsters.qc.
References anglemods(), angles, angles_y, anim_idle, anim_walk, attack_finished_single, autocvar_g_campaign, campaign_bots_may_start, CENTER_OR_VIEWOFS, draggedby, entity(), game_starttime, game_stopped, IS_MONSTER, IS_ONGROUND, IS_PLAYER, makevectors, MOVE_NORMAL, movelib_brake_simple(), movelib_move_simple_gravity, NULL, pain_finished, round_handler_IsActive, round_handler_IsRoundStarted, setanim, spawn_time, time, trace_ent, trace_fraction, v_forward, vdist, vector, and velocity.
Definition at line 619 of file sv_monsters.qc.
References enemy, entity(), last_trace, monster_follow, MONSTER_MOVE_ENEMY, MONSTER_MOVE_FOLLOW, MONSTER_MOVE_NOMOVE, MONSTER_MOVE_SPAWNLOC, MONSTER_MOVE_WANDER, monster_moveflags, monster_movestate, monster_moveto, Monster_WanderTarget(), origin, pos1, time, vdist, vector, wander_delay, and WarpZone_RefSys_TransformOrigin().
Referenced by Monster_Move().
Definition at line 943 of file sv_monsters.qc.
References entity(), IS_CLIENT, MAX_WEAPONSLOTS, MUTATOR_CALLHOOK, origin, Send_Effect(), sprite, WaypointSprite_Kill(), and weaponentities.
Referenced by CommonCommand_editmob(), Invasion_CheckWinner(), Monster_Reset(), and Monster_Spawn().
Definition at line 998 of file sv_monsters.qc.
References angles, attack_finished_single, enemy, entity(), goalentity, max_health, Monster_Remove(), MONSTERFLAG_SPAWNED, moveto, NULL, origin, pos1, SetResourceExplicit(), spawnflags, and velocity.
Referenced by Monster_Spawn().
Definition at line 558 of file sv_monsters.qc.
References entity(), Monster_Spawn(), and monsterdef.
Referenced by Monster_Dead_Fade().
Definition at line 543 of file sv_monsters.qc.
References autocvar_g_monsters_respawn, DEAD_DEAD, deadflag, entity(), MONSTERFLAG_NORESPAWN, MUTATOR_CALLHOOK, and spawnflags.
Referenced by Monster_Dead_Fade().
Definition at line 176 of file sv_monsters.qc.
References colormap, colormapPaletteColor, entity(), glowmod, IS_PLAYER, monster_skill, MONSTER_SKILL_EASY, MONSTER_SKILL_HARD, MONSTER_SKILL_INSANE, MONSTER_SKILL_MEDIUM, MONSTER_SKILL_NIGHTMARE, realowner, team, and teamplay.
Referenced by monster_changeteam(), and Monster_Spawn().
| void Monster_Sound | ( | entity | this, |
| .string | samplefield, | ||
| float | sound_delay, | ||
| bool | delaytoo, | ||
| float | chan ) |
Definition at line 369 of file sv_monsters.qc.
References ATTEN_NORM, autocvar_g_monsters_sounds, entity(), GlobalSound_sample(), msound_delay, random(), scale, time, and VOL_BASE.
Referenced by Monster_Attack_Check(), Monster_Damage(), Monster_Dead(), Monster_Enemy_Check(), Monster_Move(), and Monster_Spawn_Setup().
Definition at line 277 of file sv_monsters.qc.
References argv(), fclose(), fgets(), FILE_READ, fopen(), PrecacheGlobalSound(), strcat(), and tokenize_console.
Referenced by Monster_Sounds_Precache().
Definition at line 322 of file sv_monsters.qc.
References ALLMONSTERSOUNDS, GetMonsterSoundSampleField_notFound, and string_null.
Referenced by Monster_Sounds_Load().
Definition at line 315 of file sv_monsters.qc.
References ALLMONSTERSOUNDS, and entity().
Referenced by Monster_Sounds_Update().
Definition at line 335 of file sv_monsters.qc.
References argv(), entity(), fclose(), fgets(), FILE_READ, fopen(), GetMonsterSoundSampleField_notFound, Monster_Sound_SampleField(), strcat(), strcpy, and tokenize_console.
Referenced by Monster_Sounds_Update().
Definition at line 296 of file sv_monsters.qc.
References entity(), Monster_Sound_Precache(), monsterdef, search_begin(), search_end(), search_getfilename(), search_getsize(), and strcat().
Referenced by Monster_Spawn_Setup().
Definition at line 359 of file sv_monsters.qc.
References entity(), get_monster_model_datafilename(), model, Monster_Sounds_Clear(), Monster_Sounds_Load(), skin, and skin_for_monstersound.
Referenced by Monster_Spawn_Setup().
Definition at line 1397 of file sv_monsters.qc.
References angles, autocvar_g_fullbrightplayers, autocvar_g_monsters, autocvar_g_monsters_edit, autocvar_g_monsters_playerclip_collisions, autocvar_g_monsters_quake_resize, autocvar_g_monsters_spawnshieldtime, autocvar_g_nodepthtestplayers, bot_attack, candrop, classname, CSQCMODEL_AUTOINIT, cvar(), DAMAGE_AIM, damagedbycontents, DEAD_NO, deadflag, DPCONTENTS_BODY, DPCONTENTS_BOTCLIP, DPCONTENTS_MONSTERCLIP, DPCONTENTS_PLAYERCLIP, DPCONTENTS_SOLID, dphitcontentsmask, EF_FULLBRIGHT, EF_NODEPTHTEST, effects, enemy, entity(), FL_FLY, FL_MONSTER, FL_SWIM, flags, g_bot_targets, g_damagedbycontents, g_monsters, grab, gravity, IL_PUSH(), iscreature, Monster::m_maxs, Monster::m_mins, m_name, Monster::m_name, maxs, mdl, mdl_dead, mins, Monster_Appear_Check(), Monster_Damage(), monster_face, Monster_Heal(), monster_moveto, Monster_Remove(), Monster_Reset(), monster_setupcolors(), MONSTER_SIZE_QUAKE, monster_skill, MONSTER_SKILL_EASY, MONSTER_SKILL_HARD, MONSTER_SKILL_MEDIUM, Monster_Spawn_Setup(), Monster_Touch(), MONSTER_TYPE_FLY, MONSTER_TYPE_SWIM, Monster_UpdateModel(), Monster_Use(), monsterdef, MONSTERFLAG_RESPAWNED, MONSTERFLAG_SPAWNED, monsters_total, MONSTERSKILL_NOTEASY, MONSTERSKILL_NOTHARD, MONSTERSKILL_NOTMEDIUM, MOVE_WORLDONLY, moveto, MOVETYPE_FLY, MOVETYPE_WALK, Monster::netname, netname, noalign, NULL, oldtarget2, origin, pos1, RoundPerfectVector(), scale, set_movetype(), setmodel, settouch, solid, SOLID_BBOX, spawn_time, Monster::spawnflags, spawnflags, statuseffects, StatusEffects_apply(), StatusEffects_clearall(), StatusEffects_update(), takedamage, target2, team, teamplay, teleportable, time, trace_endpos, use, velocity, and view_ofs.
Referenced by Monster_Appear(), Monster_Respawn(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), and spawnmonster().
Definition at line 1333 of file sv_monsters.qc.
References attack_range, autocvar_g_monsters_attack_range, autocvar_g_monsters_damageforcescale, autocvar_g_monsters_healthbars, autocvar_g_monsters_respawn_delay, autocvar_g_monsters_target_range, bound(), CH_VOICE, damageforcescale, entity(), g_monster_targets, GetResource(), IL_PUSH(), last_enemycheck, max_health, maxs, monster_attack, Monster_Miniboss_Setup(), MONSTER_MOVE_WANDER, monster_moveflags, MONSTER_SKILLMOD, Monster_Sound(), Monster_Sounds_Precache(), Monster_Sounds_Update(), Monster_Think(), monsterdef, MONSTERFLAG_INVINCIBLE, MONSTERFLAG_RESPAWNED, Monster::mr_setup(), MUTATOR_CALLHOOK, nextthink, NULL, pain_finished, random(), RES_ARMOR, respawntime, rint(), SetResourceExplicit(), setthink, skin, spawn_time, spawnflags, sprite, team, Team_ColorRGB(), teamplay, time, wander_delay, wander_distance, WaypointSprite_Spawn(), WaypointSprite_UpdateHealth(), and WaypointSprite_UpdateMaxHealth().
Referenced by Monster_Spawn().
Definition at line 1297 of file sv_monsters.qc.
References CSQCMODEL_AUTOUPDATE, Damage(), DMG_NOWEP, enemy, entity(), GetResource(), last_enemycheck, max_health, Monster_Anim(), Monster_Attack_Check(), Monster_Enemy_Check(), monster_lifetime, Monster_Move(), Monster_Think(), monsterdef, Monster::mr_think(), nextthink, NULL, setthink, speed, speed2, StatusEffects_active(), stopspeed, time, and weaponentities.
Referenced by Monster_Spawn_Setup(), and Monster_Think().
Definition at line 508 of file sv_monsters.qc.
References enemy, entity(), IS_MONSTER, Monster_ValidTarget(), spawn_time, time, and toucher.
Referenced by M_Zombie_Attack_Leap_Touch(), Monster_Dead(), Monster_Move(), and Monster_Spawn().
Definition at line 489 of file sv_monsters.qc.
References entity(), monsterdef, and Monster::mr_anim().
Referenced by Monster_Spawn().
Definition at line 593 of file sv_monsters.qc.
References enemy, entity(), and Monster_ValidTarget().
Referenced by Monster_Spawn().
Definition at line 101 of file sv_monsters.qc.
References autocvar_g_monsters_lineofsight, autocvar_g_monsters_target_infront, autocvar_g_monsters_typefrag, checkpvs(), DAMAGE_NO, enemy, entity(), FL_NOTARGET, game_starttime, game_stopped, GetResource(), IS_DEAD, IS_OBSERVER, IS_SPEC, IS_VEHICLE, MON_FLAG_RANGED, monster_facing(), monster_follow, monsterdef, MONSTERFLAG_INFRONT, MOVE_NOMONSTERS, MUTATOR_CALLHOOK, origin, PHYS_INPUT_BUTTON_CHAT, SAME_TEAM, spawnflags, time, trace_ent, trace_fraction, vector, and view_ofs.
Referenced by Monster_Delay_Action(), Monster_Touch(), and Monster_Use().
Returns an origin that's near targetorigin and visible to this monster.
Definition at line 599 of file sv_monsters.qc.
References ang, entity(), FL_FLY, FL_SWIM, flags, makevectors, MONSTERFLAG_FLY_VERTICAL, MOVE_NORMAL, origin, random(), rint(), spawnflags, trace_endpos, v_forward, vector, view_ofs, and wander_distance.
Referenced by Monster_Move(), and Monster_Move_Target().
Definition at line 34 of file sv_monsters.qc.
References entity(), monsters_killed, monsters_total, and STAT.
Referenced by PlayerThink().
| entity draggedby |
Definition at line 780 of file sv_monsters.qc.
Referenced by havocbot_ai(), Monster_Move(), and Monster_Move_2D().
| vector pos1 |
Definition at line 560 of file sv_monsters.qc.
| vector pos2 |
Definition at line 560 of file sv_monsters.qc.
| int skin_for_monstersound |
Definition at line 358 of file sv_monsters.qc.
Referenced by Monster_Sounds_Update().