Xonotic
|
Go to the source code of this file.
Macros | |
#define | APPEND_TO_STRING(list, sep, add) ((list) = (((list) != "") ? strcat(list, sep, add) : (add))) |
#define | bprintf(...) bprint(sprintf(__VA_ARGS__)) |
#define | COMPARE_INCREASING(to, from) (to < from ? from + to + 2 : to - from) |
#define | CTF_RECORD "/ctf100record/" |
#define | CTS_RECORD "/cts100record/" |
#define | fprintf(file, ...) fputs(file, sprintf(__VA_ARGS__)) |
#define | RACE_RECORD "/race100record/" |
#define | TIME_DECODE(n) ((n) / TIME_FACTOR) |
#define | TIME_ENCODE(t) TIME_TO_NTHS(t, TIME_FACTOR) |
#define | TIME_ENCODED_TOSTRING(n) mmssth(n) |
#define | TIME_TO_NTHS(t, n) floor((t) * (n) + 0.5) |
#define | XPD(...) __VA_ARGS__ |
Typedefs | |
using | findNextEntityNearFunction_t = entity(entity cur, entity near, entity pass) |
using | isConnectedFunction_t = float(entity a, entity b, entity pass) |
using | textLengthUpToLength_lenFunction_t = float(string s) |
using | textLengthUpToWidth_widthFunction_t = float(string s, vector size) |
#define APPEND_TO_STRING | ( | list, | |
sep, | |||
add | |||
) | ((list) = (((list) != "") ? strcat(list, sep, add) : (add))) |
Definition at line 225 of file util.qh.
Referenced by UpdateNotification_URI_Get_Callback().
#define bprintf | ( | ... | ) | bprint(sprintf(__VA_ARGS__)) |
Definition at line 192 of file util.qh.
Referenced by CheatsAllowed().
Definition at line 228 of file util.qh.
Referenced by HitSound(), and UpdateDamage().
#define CTF_RECORD "/ctf100record/" |
Definition at line 60 of file util.qh.
Referenced by ctf_Initialize().
#define CTS_RECORD "/cts100record/" |
Definition at line 59 of file util.qh.
Referenced by cts_Initialize(), getladder(), and HUD_Mod_Race().
#define fprintf | ( | file, | |
... | |||
) | fputs(file, sprintf(__VA_ARGS__)) |
#define RACE_RECORD "/race100record/" |
Definition at line 58 of file util.qh.
Referenced by getladder(), HUD_Mod_Race(), rc_SetLimits(), and spawnfunc().
#define TIME_DECODE | ( | n | ) | ((n) / TIME_FACTOR) |
Definition at line 62 of file util.qh.
Referenced by race_setTime().
#define TIME_ENCODE | ( | t | ) | TIME_TO_NTHS(t, TIME_FACTOR) |
Definition at line 61 of file util.qh.
Referenced by ctf_CaptureRecord(), ctf_CheckFlagReturn(), ctf_Handle_Capture(), race_ImposePenaltyTime(), race_SendTime(), and write_recordmarker().
#define TIME_ENCODED_TOSTRING | ( | n | ) | mmssth(n) |
Definition at line 57 of file util.qh.
Referenced by getrankings(), HUD_Score(), MUTATOR_HOOKFUNCTION(), race_showTime(), Scoreboard_Rankings_Draw(), and write_recordmarker().
using textLengthUpToLength_lenFunction_t = float(string s) |
using textLengthUpToWidth_widthFunction_t = float(string s, vector size) |
Definition at line 2044 of file util.qc.
References blink_synced().
Referenced by HUD_HealthArmor(), HUD_Mod_Keepaway(), HUD_Mod_KH(), and Item_ItemsTime_Allow().
Definition at line 406 of file util.qc.
References error(), floor(), invertLengthLog(), vectoangles(), vector(), and vlen().
Referenced by STATIC_INIT().
Definition at line 696 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(), CSQCPlayer_PostUpdate(), CSQCPlayer_Remove(), GameCommand_bot_cmd(), GameCommand_setbots(), GenericCommand_settemp(), NET_HANDLE(), REGISTER_MUTATOR(), View_EventChase(), and View_Ortho().
float cvar_settemp_restore | ( | ) |
Definition at line 736 of file util.qc.
References classname, cvar_set(), entity(), find(), FOREACH_ENTITY_CLASS, LOG_INFOF, NULL, and print().
Referenced by DoNextMapOverride(), GenericCommand_settemp_restore(), and MapInfo_LoadMap().
void depthfirst | ( | entity | start, |
.entity | up, | ||
.entity | downleft, | ||
.entity | right, | ||
void(entity, entity) | funcPre, | ||
void(entity, entity) | funcPost, | ||
entity | pass | ||
) |
Definition at line 281 of file util.qc.
References count_ordinal(), entity(), floor(), SFL_HIDE_ZERO, SFL_RANK, and SFL_TIME.
Referenced by forAllDescendants(), and GameCommand().
Definition at line 206 of file util.qc.
References draw_currentSkin, strcat(), strlen(), and substring().
Referenced by draw_BorderPicture(), draw_ButtonPicture(), draw_Picture(), draw_PictureSize(), draw_PreloadPicture(), draw_PreloadPictureWithFlags(), draw_setMousePointer(), draw_VertButtonPicture(), and MapVote_DrawMapItem().
void execute_next_frame | ( | ) |
Definition at line 1612 of file util.qc.
References localcmd, and strfree.
Referenced by CSQC_UpdateView(), m_draw(), and StartFrame().
void FindConnectedComponent | ( | entity | e, |
.entity | fld, | ||
findNextEntityNearFunction_t | nxt, | ||
isConnectedFunction_t | iscon, | ||
entity | pass | ||
) |
Definition at line 1630 of file util.qc.
References AnglesTransform_FromAngles(), AnglesTransform_FromVAngles(), AnglesTransform_ToAngles(), AnglesTransform_ToVAngles(), bound(), CONTENT_EMPTY, CONTENT_LAVA, CONTENT_SKY, CONTENT_SLIME, CONTENT_SOLID, CONTENT_WATER, DPCONTENTS_BODY, DPCONTENTS_LAVA, DPCONTENTS_NODROP, DPCONTENTS_OPAQUE, DPCONTENTS_SKY, DPCONTENTS_SLIME, DPCONTENTS_SOLID, DPCONTENTS_WATER, entity(), ERASEABLE, error(), fixedmakevectors, fixedvectoangles2, gettagindex, gettaginfo, intermission_running, IS_PLAYER, max(), min(), MOVETYPE_FLY, MOVETYPE_FOLLOW, MOVETYPE_NONE, NULL, PROJECTILE_MAKETRIGGER, set_movetype(), setorigin(), SOLID_NOT, strcat(), strunzone(), strzone(), substring(), TC, Team_ColorCode(), teamplay, to, v_forward, v_right, v_up, vector(), and vlen().
Referenced by LinkDoors().
Definition at line 485 of file util.qc.
References argv(), floor(), ftos(), REGISTRY_GET, stof(), strcat(), strlen(), substring(), tokenize_console, and WEP_FLAG_SPECIALATTACK.
Referenced by W_FixWeaponOrder().
Definition at line 1245 of file util.qc.
References ftos(), and strcat().
Referenced by get_model_parameters(), UpdatePlayerSounds(), and XonoticPlayerModelSelector_loadModels().
Definition at line 1258 of file util.qc.
References car(), cdr(), fgets(), FILE_READ, fopen(), 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_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, 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 1081 of file util.qc.
References bound(), solve_quadratic(), and vector().
Referenced by W_CalculateProjectileVelocity().
string getcurrentmod | ( | ) |
Definition at line 1191 of file util.qc.
References argv(), cvar_string(), and tokenize_console.
Referenced by resolvemod().
string getWrappedLine | ( | float | w, |
vector | size, | ||
textLengthUpToWidth_widthFunction_t | tw | ||
) |
Definition at line 880 of file util.qc.
References find_last_color_code(), getWrappedLine_remaining, strcat(), string_null, strlen(), substring(), and textLengthUpToWidth().
Referenced by GameTypeVote_DrawGameTypeItem(), InfoMessages_drawstring(), Label_draw(), Label_recalcPositionWithText(), m_tooltip(), rewrapCampaign(), and XonoticTextBox_setText().
string getWrappedLineLen | ( | float | w, |
textLengthUpToLength_lenFunction_t | tw | ||
) |
Definition at line 918 of file util.qc.
References find_last_color_code(), getWrappedLine_remaining, strcat(), string_null, strlen(), substring(), and textLengthUpToLength().
Referenced by Say().
Definition at line 527 of file util.qc.
References argv(), strcat(), strlen(), substring(), and tokenize_console.
Referenced by W_NameWeaponOrder(), and W_NumberWeaponOrder().
Definition at line 1203 of file util.qc.
References car(), cdr(), ERASEABLE, strlen(), and substring().
Referenced by _MapInfo_Parse_Settemp().
Definition at line 1620 of file util.qc.
References strcat(), and strcpy.
Referenced by GenericCommand_nextframe().
void Shutdown | ( | ) |
Definition at line 152 of file main.qc.
References __init_dedicated_server_shutdown(), autocvar_chase_active, autocvar_cl_db_saveasdump, autocvar_developer, autocvar_r_drawviewmodel, autocvar_sessionid, autocvar_sv_db_saveasdump, Ban_SaveBans(), binddb, bot_endgame(), calledhooks, camera_active, chase_active_backup, cheatcount_total, CheatShutdown(), ClientProgsDB, cvar_defstring(), cvar_set(), db_close(), db_dump(), db_save(), deactivate_minigame(), FOREACH_ENTITY_ORDERED, ftos(), HOOK_END, HOOK_START, HUD_MinigameMenu_Close(), isdemo(), localcmd, LOG_INFO, LOG_TRACE, m_hide(), MapInfo_Shutdown(), NULL, orig_slowmo, players, ServerProgsDB, strcat(), strfree, sv_termsofservice_url_escaped, teams, tempdb, TemporaryDB, TIMEOUT_ACTIVE, WarpZone_Shutdown(), WeaponStats_Shutdown(), and world_initialized.
vector solve_shotdirection | ( | vector | myorg, |
vector | myvel, | ||
vector | eorg, | ||
vector | evel, | ||
float | spd, | ||
float | newton_style | ||
) |
Definition at line 1018 of file util.qc.
References normalize(), solve_quadratic(), and vector().
STATIC_INIT | ( | g_saved_cvars | ) |
Definition at line 34 of file util.qh.
References entity(), IL_NEW, to, wordwrap(), and wordwrap_cb().
Definition at line 540 of file util.qc.
References argv(), MapInfo_Get_ByName(), MapInfo_Map_maxs, MapInfo_Map_mins, mapname, MOVE_WORLDONLY, NULL, strcasecmp, strcat(), strcpy, strlen(), substring(), tokenize_console, trace_endpos, trace_startsolid, vector(), and world.
Referenced by WeaponsList_MoveDown_Click(), WeaponsList_MoveUp_Click(), XonoticPlayList_mouseDrag(), and XonoticWeaponsList_mouseDrag().
float textLengthUpToLength | ( | string | theText, |
float | maxWidth, | ||
textLengthUpToLength_lenFunction_t | tw | ||
) |
Definition at line 809 of file util.qc.
References checkColorCode(), floor(), strlen(), substring(), and vector().
Referenced by getWrappedLineLen(), PlayerPreThink(), and textShortenToLength().
float textLengthUpToWidth | ( | string | theText, |
float | maxWidth, | ||
vector | size, | ||
textLengthUpToWidth_widthFunction_t | tw | ||
) |
Definition at line 773 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 964 of file util.qc.
References strcat(), substring(), and textLengthUpToLength().
string textShortenToWidth | ( | string | theText, |
float | maxWidth, | ||
vector | size, | ||
textLengthUpToWidth_widthFunction_t | tw | ||
) |
Definition at line 956 of file util.qc.
References strcat(), substring(), and textLengthUpToWidth().
Referenced by Draw_ShowNames(), draw_TextShortenToWidth(), HUD_Chat(), HUD_Quickmenu_DrawEntry(), minigame_drawcolorcodedstring_trunc(), minigame_drawstring_trunc(), Scoreboard_DrawOthers(), Scoreboard_FixColumnWidth(), and Scoreboard_Rankings_Draw().
Definition at line 1376 of file util.qc.
References prvm_language, and substring().
Referenced by _getcommandkey(), and XonoticKeyBinder_drawListBoxItem().
Definition at line 170 of file util.qc.
References entity(), NULL, sprint(), strcat(), to, wordwrap_buffer, wordwrap_buffer_put(), and wordwrap_cb().
Referenced by STATIC_INIT().
Definition at line 215 of file util.qc.
References strlen(), strunzone(), strzone(), and substring().
Referenced by STATIC_INIT(), and wordwrap().
Definition at line 1546 of file util.qc.
References strlen(), strstrofs, and substring().
string draw_currentSkin |
Definition at line 45 of file util.qh.
Referenced by draw_cursor(), draw_UseSkinFor(), LoadMenuSkinValues(), and m_init_delayed().
IntrusiveList g_saved_cvars |
Definition at line 33 of file util.qh.
Referenced by cvar_settemp().
float get_model_parameters_age |
Definition at line 143 of file util.qh.
Referenced by get_model_parameters(), and XonoticPlayerModelSelector_loadModels().
string get_model_parameters_bone_aim[MAX_AIM_BONES] |
Definition at line 149 of file util.qh.
Referenced by get_model_parameters(), and skeleton_loadinfo().
float get_model_parameters_bone_aimweight[MAX_AIM_BONES] |
Definition at line 150 of file util.qh.
Referenced by get_model_parameters(), and skeleton_loadinfo().
string get_model_parameters_bone_upperbody |
Definition at line 146 of file util.qh.
Referenced by get_model_parameters(), and skeleton_loadinfo().
string get_model_parameters_bone_weapon |
Definition at line 147 of file util.qh.
Referenced by get_model_parameters(), and skeleton_loadinfo().
string get_model_parameters_desc |
Definition at line 152 of file util.qh.
Referenced by get_model_parameters(), and XonoticPlayerModelSelector_loadModels().
string get_model_parameters_description |
Definition at line 145 of file util.qh.
Referenced by XonoticPlayerModelSelector_loadModels().
float get_model_parameters_fixbone |
Definition at line 151 of file util.qh.
Referenced by get_model_parameters(), and skeleton_loadinfo().
bool get_model_parameters_hidden |
Definition at line 144 of file util.qh.
Referenced by get_model_parameters(), and XonoticPlayerModelSelector_loadModels().
string get_model_parameters_modelname |
Definition at line 137 of file util.qh.
Referenced by get_model_parameters(), and XonoticPlayerModelSelector_loadModels().
float get_model_parameters_modelskin |
Definition at line 138 of file util.qh.
Referenced by get_model_parameters(), and XonoticPlayerModelSelector_loadModels().
string get_model_parameters_name |
Definition at line 139 of file util.qh.
Referenced by get_model_parameters(), and XonoticPlayerModelSelector_loadModels().
string get_model_parameters_sex |
Definition at line 141 of file util.qh.
Referenced by get_model_parameters(), and XonoticPlayerModelSelector_loadModels().
float get_model_parameters_species |
Definition at line 140 of file util.qh.
Referenced by get_model_parameters(), and player_getspecies().
float get_model_parameters_weight |
Definition at line 142 of file util.qh.
Referenced by get_model_parameters(), and XonoticPlayerModelSelector_loadModels().
string getWrappedLine_remaining |
Definition at line 108 of file util.qh.
Referenced by GameTypeVote_DrawGameTypeItem(), getWrappedLine(), getWrappedLineLen(), InfoMessages_drawstring(), Label_draw(), Label_recalcPositionWithText(), m_tooltip(), minigame_drawcolorcodedstring_wrapped(), minigame_drawstring_wrapped(), minigame_getWrappedLine(), rewrapCampaign(), Say(), and XonoticTextBox_setText().
const int MAX_AIM_BONES = 4 |
Definition at line 148 of file util.qh.
Referenced by get_model_parameters(), skeleton_from_frames(), and skeleton_loadinfo().
const int TIME_DECIMALS = 2 |
Definition at line 55 of file util.qh.
Referenced by HUD_Score(), and MakeRaceString().