|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "util.qh"#include <client/mutators/_mod.qh>#include <common/constants.qh>#include <common/deathtypes/all.qh>#include <common/gametypes/_mod.qh>#include <common/mapinfo.qh>#include <common/notifications/all.qh>#include <common/scores.qh>Go to the source code of this file.
Variables | |
| entity | _wordwrap_buffer_sprint_ent |
| string | aiment_classname |
| float | aiment_deadflag |
| float | FindConnectedComponent_processing |
| float | lengthLogTable [128] |
| float | shutdown_running |
| float | skeleton_bones_index |
| string | to_execute_next_frame |
| float | trace_hits_box_a0 |
| float | trace_hits_box_a1 |
| string | wordwrap_buffer |
| const string | XENCODE_2 = "xX" |
| const string | XENCODE_22 = "0123456789abcdefABCDEF" |
Definition at line 1808 of file util.qc.
References entity(), and vector.
Referenced by animdecide_load_if_needed(), CL_WeaponEntity_SetModel(), and monsters_animoverride().
| Notification Announcer_PickNumber | ( | int | type, |
| int | num ) |
Definition at line 1827 of file util.qc.
References CNT_GAMESTART, CNT_KILL, CNT_NORMAL, CNT_RESPAWN, CNT_ROUNDSTART, and NULL.
Referenced by Announcer_Countdown(), instagib_countdown(), KillIndicator_Think(), and ShowRespawnCountdown().
Definition at line 1960 of file util.qc.
References AnglesTransform_FromAngles(), AnglesTransform_FromVAngles(), AnglesTransform_ToAngles(), AnglesTransform_ToVAngles(), entity(), fixedmakevectors(), fixedvectoangles2, gettagindex, gettaginfo, org, substring(), v_forward, v_right, v_up, vector, and vlen().
Referenced by follow_init().
Definition at line 2178 of file util.qc.
References blink_synced(), and freq.
Referenced by DrawItemsTimeItem(), HUD_Get_Num_Color(), HUD_HealthArmor(), HUD_Mod_Keepaway(), HUD_Mod_KH(), HUD_Mod_TeamKeepaway(), and HUD_Radar_InputEvent().
| ERASEABLE float blink_synced | ( | float | base, |
| float | range, | ||
| float | freq, | ||
| float | start_time, | ||
| int | start_pos ) |
Definition at line 582 of file util.qc.
References entity(), trace_fraction, and vector.
Referenced by Portal_Spawn(), and Porto_Draw().
Definition at line 521 of file util.qc.
References ang, error, floor(), invertLengthLog(), vectoangles(), vector, vlen(), and y.
Referenced by pointparticles_SendEntity(), rainsnow_SendEntity(), SpawnCasing(), STATIC_INIT(), and Violence_GibSplash_At().
Definition at line 1248 of file util.qc.
References BIT, bound(), fabs(), LOG_DEBUG, rint(), vector, and vtos().
Referenced by CL_WeaponEntity_SetModel(), and ClientInit_misc().
Definition at line 2150 of file util.qc.
References cvar_string(), and stof().
Definition at line 811 of file util.qc.
References cvar_set(), cvar_string(), entity(), g_saved_cvars, IL_EACH, IL_PUSH(), LOG_INFOF, LOG_TRACE, new_pure, and strzone().
Referenced by _MapInfo_Parse_Settemp(), CampaignPreInit(), CSQC_Init(), CSQCPlayer_PostUpdate(), CSQCPlayer_Remove(), GameCommand_bot_cmd(), GameCommand_nospectators(), GameCommand_setbots(), GenericCommand_settemp(), NET_HANDLE(), NET_HANDLE(), REGISTER_MUTATOR(), REGISTER_MUTATOR(), View_EventChase(), and View_Ortho().
| int cvar_settemp_restore | ( | ) |
Definition at line 851 of file util.qc.
References classname, cvar_set(), entity(), find(), FOREACH_ENTITY_CLASS, LOG_INFOF, NULL, print(), and strunzone().
Referenced by DoNextMapOverride(), GenericCommand_settemp_restore(), MapInfo_LoadMap(), and SV_Shutdown().
Definition at line 486 of file util.qc.
References cos(), lengthLogTable, M_PI, M_PI_2, sin(), and vector.
Referenced by NET_HANDLE(), NET_HANDLE(), and STATIC_INIT().
Definition at line 1275 of file util.qc.
Referenced by CL_WeaponEntity_SetModel(), NET_HANDLE(), and TrueAimCheck().
| void depthfirst | ( | entity | start, |
| .entity | up, | ||
| .entity | downleft, | ||
| .entity | right, | ||
| void(entity, entity) | funcPre, | ||
| void(entity, entity) | funcPost, | ||
| entity | pass ) |
Definition at line 393 of file util.qc.
References entity(), and pass.
Referenced by forAllDescendants().
Definition at line 2000 of file util.qc.
References AnglesTransform_ToAngles(), AnglesTransform_ToVAngles(), entity(), fixedvectoangles2, gettaginfo, NULL, org, substring(), v_forward, v_up, and vector.
Referenced by Drag().
| void execute_next_frame | ( | ) |
Definition at line 1748 of file util.qc.
References localcmd(), strfree, and to_execute_next_frame.
Referenced by CSQC_UpdateView(), m_draw(), and StartFrame().
Definition at line 960 of file util.qc.
References IS_DIGIT, IS_HEXDIGIT, strlen, strstrofs, and substring().
Referenced by getWrappedLine(), getWrappedLineLen(), hash_replace(), and minigame_getWrappedLine().
Definition at line 117 of file util.qc.
References NULL, org, trace_endpos, trace_fraction, and vector.
Referenced by nade_boom(), and W_Seeker_Tag_Touch().
| void FindConnectedComponent | ( | entity | e, |
| .entity | fld, | ||
| findNextEntityNearFunction_t | nxt, | ||
| isConnectedFunction_t | iscon, | ||
| entity | pass ) |
Definition at line 1766 of file util.qc.
References entity(), error, NULL, and pass.
Referenced by LinkDoors().
Definition at line 600 of file util.qc.
References argv(), floor(), ftos(), REGISTRY_GET, stof(), strcat(), strlen, substring(), tokenize_console, Weapons, and WEP_FLAG_SPECIALATTACK.
Referenced by W_FixWeaponOrder().
Definition at line 2014 of file util.qc.
References entity(), MOVETYPE_FOLLOW, and set_movetype().
Referenced by follow_init().
Definition at line 678 of file util.qc.
References MapInfo_Get_ByName(), MapInfo_Map_maxs, MapInfo_Map_mins, mapname, mi_max, mi_min, mi_shortname, MOVE_WORLDONLY, NULL, strcasecmp, strcpy, strlen, substring(), trace_endpos, trace_startsolid, vector, and world.
Referenced by get_mi_min_max_texcoords(), and InitGameplayMode().
Definition at line 768 of file util.qc.
References get_mi_min_max(), mi_max, mi_min, mi_picmax, mi_picmin, mi_pictexcoord0, mi_pictexcoord1, mi_pictexcoord2, mi_pictexcoord3, and vector.
Referenced by CSQC_Init().
Definition at line 1381 of file util.qc.
References ftos(), and strcat().
Referenced by get_model_parameters(), UpdatePlayerSounds(), and XonoticPlayerModelSelector_loadModels().
Definition at line 1394 of file util.qc.
References car(), cdr(), fclose(), fgets(), FILE_READ, fopen(), ftos(), get_model_datafilename(), get_model_parameters_age, get_model_parameters_bone_aim, get_model_parameters_bone_aimweight, get_model_parameters_bone_upperbody, get_model_parameters_bone_weapon, get_model_parameters_desc, get_model_parameters_description, get_model_parameters_fixbone, get_model_parameters_hidden, get_model_parameters_modelname, get_model_parameters_modelskin, get_model_parameters_name, get_model_parameters_sex, get_model_parameters_species, get_model_parameters_weight, MAX_AIM_BONES, MUTATOR_CALLHOOK, SPECIES_ALIEN, SPECIES_ANIMAL, SPECIES_HUMAN, SPECIES_RESERVED, SPECIES_ROBOT_RUSTY, SPECIES_ROBOT_SHINY, SPECIES_ROBOT_SOLID, stob, stof(), strcat(), string_null, and substring().
Referenced by player_getspecies(), skeleton_loadinfo(), and XonoticPlayerModelSelector_loadModels().
| vector get_shotvelocity | ( | vector | myvel, |
| vector | mydir, | ||
| float | spd, | ||
| float | newton_style, | ||
| float | mi, | ||
| float | ma ) |
Definition at line 1196 of file util.qc.
References bound(), solve_quadratic(), and vector.
Referenced by W_CalculateProjectileVelocity().
| string getcurrentmod | ( | ) |
Definition at line 1327 of file util.qc.
References argv(), cvar_string(), and tokenize_console.
Referenced by resolvemod().
| string getWrappedLine | ( | float | maxWidth, |
| vector | theFontSize, | ||
| textLengthUpToWidth_widthFunction_t | tw ) |
Definition at line 995 of file util.qc.
References find_last_color_code(), getWrappedLine_remaining, strcat(), string_null, strlen, substring(), textLengthUpToWidth(), and vector.
Referenced by Checkpoints_drawstring(), GameTypeVote_DrawGameTypeItem(), HUD_CenterPrint(), InfoMessages_drawstring(), Label_draw(), Label_recalcPositionWithText(), m_tooltip(), rewrapCampaign(), wrapGuideText(), XonoticEntryList_drawListBoxItem(), and XonoticTextBox_setText().
| string getWrappedLineLen | ( | int | maxLength, |
| textLengthUpToLength_lenFunction_t | tw ) |
Definition at line 1033 of file util.qc.
References find_last_color_code(), getWrappedLine_remaining, strcat(), string_null, strlen, substring(), and textLengthUpToLength().
Referenced by Say().
Definition at line 1313 of file util.qc.
References bound(), DEATH_IS, HITTYPE_ARMORPIERCE, and vector.
Referenced by Damage(), Monster_Damage(), PlayerCorpseDamage(), and PlayerDamage().
Definition at line 1289 of file util.qc.
References DEATH_IS, and vector.
Referenced by crosshair_getcolor(), ctf_FlagcarrierWaypoints(), HUD_HealthArmor(), if(), and WaypointSprite_AttachCarrier().
Definition at line 457 of file util.qc.
References floor(), and lengthLogTable.
Referenced by compressShortVector().
Definition at line 1087 of file util.qc.
References MapInfo_Type_ToString(), strcat(), string_null, strlen, strstrofs, and substring().
Referenced by Cmd_Scoreboard_SetFields(), and SV_OnEntityPreSpawnFunction().
Definition at line 2063 of file util.qc.
References entity().
Referenced by GrapplingHookThink(), W_Electro_Orb_Follow_Think(), and W_MineLayer_Think().
Definition at line 642 of file util.qc.
References argv(), strcat(), strlen, substring(), and tokenize_console.
Referenced by W_NameWeaponOrder(), and W_NumberWeaponOrder().
Definition at line 1339 of file util.qc.
References car(), cdr(), strlen, and substring().
Referenced by _MapInfo_Parse_Settemp().
Definition at line 1943 of file util.qc.
References CONTENT_EMPTY, CONTENT_LAVA, CONTENT_SKY, CONTENT_SLIME, CONTENT_SOLID, CONTENT_WATER, DPCONTENTS_BODY, DPCONTENTS_LAVA, DPCONTENTS_SKY, DPCONTENTS_SLIME, DPCONTENTS_SOLID, and DPCONTENTS_WATER.
Definition at line 1923 of file util.qc.
References CONTENT_EMPTY, CONTENT_LAVA, CONTENT_SKY, CONTENT_SLIME, CONTENT_SOLID, CONTENT_WATER, DPCONTENTS_LAVA, DPCONTENTS_NODROP, DPCONTENTS_OPAQUE, DPCONTENTS_SKY, DPCONTENTS_SLIME, DPCONTENTS_SOLID, and DPCONTENTS_WATER.
Referenced by _Movetype_CheckWater(), and racer_frame().
Definition at line 2082 of file util.qc.
References intermission_running, strcat(), TC, Team_ColorCode(), and teamplay.
Referenced by CheatsAllowed(), ClientCommand_ready(), ClientConnect(), Draw_ShowNames(), DumpStats(), GameCommand_adminmsg(), GameCommand_defer_clear(), GameCommand_moveplayer(), GetCallerName(), MatchEnd_RestoreSpectatorAndTeamStatus(), NextLevel(), OriginalCallerName(), PlayerFrame(), PlayerStats_GameReport_FinalizePlayer(), Remove_Countdown(), Say(), Score_NicePrint_Player(), Score_NicePrint_Spectator(), TeamBalance_RemoveExcessPlayers(), and W_HitPlotOpen().
Definition at line 1756 of file util.qc.
References strcat(), strcpy, and to_execute_next_frame.
Referenced by GenericCommand_nextframe().
Definition at line 148 of file util.qc.
References entity(), and vector.
Referenced by bumblebee_gunner_exit(), bumblebee_gunner_frame(), bumblebee_pilot_frame(), racer_frame(), raptor_frame(), turret_aim_generic(), turret_do_updates(), turret_targetscore_generic(), turret_validate_target(), and vehicles_damage().
Definition at line 423 of file util.qc.
References count_ordinal(), floor(), ftos(), rounds_played, SFL_HIDE_ZERO, SFL_RANK, SFL_TIME, and TIME_ENCODED_TOSTRING.
Referenced by Score_NicePrint_Player(), Score_NicePrint_Team(), Scoreboard_Fraglimit_Draw(), and Scoreboard_GetField().
Definition at line 2033 of file util.qc.
References bound(), entity(), IS_PLAYER, MOVETYPE_FOLLOW, set_movetype(), and SOLID_NOT.
Referenced by GrapplingHookTouch(), W_Electro_Orb_Stick(), and W_MineLayer_Stick().
Definition at line 1733 of file util.qc.
References entity().
| vector solve_shotdirection | ( | vector | myorg, |
| vector | myvel, | ||
| vector | eorg, | ||
| vector | evel, | ||
| float | spd, | ||
| float | newton_style ) |
Definition at line 1133 of file util.qc.
References normalize(), solve_quadratic(), and vector.
| STATIC_INIT | ( | compressShortVector | ) |
Definition at line 553 of file util.qc.
References compressShortVector(), cvar(), decompressShortVector(), ftos(), lengthLogTable, LOG_FATALF, LOG_TRACE, and vtos().
| void SV_Shutdown | ( | ) |
Definition at line 1709 of file util.qc.
References cvar_settemp_restore(), LOG_INFO, Shutdown(), shutdown_running, and shutdownhooks.
Definition at line 655 of file util.qc.
References argv(), strcat(), strlen, substring(), and tokenize_console.
Referenced by WeaponsList_MoveDown_Click(), WeaponsList_MoveUp_Click(), XonoticPlayList_mouseDrag(), and XonoticWeaponsList_mouseDrag().
| float textLengthUpToLength | ( | string | theText, |
| int | maxLength, | ||
| textLengthUpToLength_lenFunction_t | w ) |
Definition at line 924 of file util.qc.
References checkColorCode(), floor(), strlen, substring(), and vector.
Referenced by getWrappedLineLen(), PlayerFrame(), and textShortenToLength().
| float textLengthUpToWidth | ( | string | theText, |
| float | maxWidth, | ||
| vector | theSize, | ||
| textLengthUpToWidth_widthFunction_t | w ) |
Definition at line 888 of file util.qc.
References checkColorCode(), floor(), strlen, substring(), and vector.
Referenced by draw_TextLengthUpToWidth(), getWrappedLine(), minigame_getWrappedLine(), and textShortenToWidth().
| string textShortenToLength | ( | string | theText, |
| float | maxWidth, | ||
| textLengthUpToLength_lenFunction_t | tw ) |
Definition at line 1079 of file util.qc.
References strcat(), substring(), and textLengthUpToLength().
| string textShortenToWidth | ( | string | theText, |
| float | maxWidth, | ||
| vector | theFontSize, | ||
| textLengthUpToWidth_widthFunction_t | tw ) |
Definition at line 1071 of file util.qc.
References strcat(), substring(), textLengthUpToWidth(), and vector.
Referenced by centerprint_SetDuelTitle(), Draw_ShowNames(), draw_TextShortenToWidth(), HUD_Chat(), HUD_Mod_Race(), HUD_Notify(), HUD_Pickup(), HUD_Quickmenu_DrawEntry(), HUD_Score_Rankings(), HUD_Vote(), MakeRaceString(), MapVote_FormatMapItem(), minigame_drawcolorcodedstring_trunc(), minigame_drawstring_trunc(), minigame_show_allspecs(), Scoreboard_Draw(), Scoreboard_DrawOthers(), Scoreboard_FixColumnWidth(), and Scoreboard_Rankings_Draw().
Definition at line 2123 of file util.qc.
References trace_hits_box_1d(), trace_hits_box_a0, trace_hits_box_a1, and vector.
Referenced by Headshot(), and tracebox_hits_box().
Definition at line 2101 of file util.qc.
References max(), min(), trace_hits_box_a0, and trace_hits_box_a1.
Referenced by trace_hits_box().
| float tracebox_hits_box | ( | vector | start, |
| vector | mi, | ||
| vector | ma, | ||
| vector | end, | ||
| vector | thmi, | ||
| vector | thma ) |
Definition at line 2143 of file util.qc.
References trace_hits_box(), and vector.
Referenced by tracebox_hits_trigger_hurt().
| float tracebox_inverted | ( | vector | v1, |
| vector | mi, | ||
| vector | ma, | ||
| vector | v2, | ||
| float | nomonsters, | ||
| entity | forent, | ||
| float | stopatentity, | ||
| entity | ignorestopatentity ) |
Definition at line 23 of file util.qc.
References dir, entity(), ftos(), LOG_TRACE, normalize(), trace_endpos, trace_ent, trace_fraction, trace_startsolid, vector, vlen(), and vtos().
Referenced by traceline_inverted().
| void traceline_inverted | ( | vector | v1, |
| vector | v2, | ||
| float | nomonsters, | ||
| entity | forent, | ||
| float | stopatentity, | ||
| entity | ignorestopatentity ) |
Definition at line 101 of file util.qc.
References entity(), tracebox_inverted(), and vector.
Referenced by fireBullet_falloff().
Definition at line 1512 of file util.qc.
References IS_DIGIT, prvm_language, stof(), and substring().
Referenced by _getcommandkey(), KeyBinds_BuildList(), Scoreboard_Draw(), W_Guide_Keybinds(), and XonoticKeyBinder_drawListBoxItem().
Definition at line 2053 of file util.qc.
References entity(), MOVETYPE_FLY, PROJECTILE_MAKETRIGGER, set_movetype(), and string_null.
Referenced by W_MineLayer_Think().
Definition at line 170 of file util.qc.
References wordwrap_buffer, wordwrap_buffer_put(), and wordwrap_cb().
Definition at line 165 of file util.qc.
References strcat(), and wordwrap_buffer.
Referenced by wordwrap().
Definition at line 182 of file util.qc.
References _wordwrap_buffer_sprint_ent, sprint(), strcat(), and wordwrap_buffer.
Referenced by wordwrap_sprint().
Definition at line 327 of file util.qc.
References strlen, strunzone(), strzone(), and substring().
Referenced by wordwrap(), and wordwrap_sprint().
Definition at line 192 of file util.qc.
References _wordwrap_buffer_sprint_ent, entity(), NULL, sprint(), strcat(), wordwrap_buffer, wordwrap_buffer_sprint(), and wordwrap_cb().
Referenced by CommonCommand_info(), and VoteCommand_macro_help().
Definition at line 1682 of file util.qc.
References strlen, strstrofs, substring(), XENCODE_2, and XENCODE_22.
Definition at line 1667 of file util.qc.
References floor(), strcat(), substring(), XENCODE_2, and XENCODE_22.
| entity _wordwrap_buffer_sprint_ent |
Definition at line 181 of file util.qc.
Referenced by wordwrap_buffer_sprint(), and wordwrap_sprint().
| float lengthLogTable[128] |
Definition at line 455 of file util.qc.
Referenced by decompressShortVector(), invertLengthLog(), and STATIC_INIT().
| float shutdown_running |
Definition at line 1707 of file util.qc.
Referenced by SV_Shutdown().
| string to_execute_next_frame |
Definition at line 1747 of file util.qc.
Referenced by execute_next_frame(), and queue_to_execute_next_frame().
| float trace_hits_box_a0 |
Definition at line 2099 of file util.qc.
Referenced by trace_hits_box(), and trace_hits_box_1d().
| float trace_hits_box_a1 |
Definition at line 2099 of file util.qc.
Referenced by trace_hits_box(), and trace_hits_box_1d().
| string wordwrap_buffer |
Definition at line 163 of file util.qc.
Referenced by wordwrap(), wordwrap_buffer_put(), wordwrap_buffer_sprint(), and wordwrap_sprint().
| const string XENCODE_2 = "xX" |