Xonotic
|
#include "iter.qh"
Go to the source code of this file.
Classes | |
class | IntrusiveList |
limitations: NULL cannot be present elements can only be present once a maximum of IL_MAX lists can exist at one time freed entities must be removed from the list More... | |
Macros | |
#define | IL_CEIL(n) IL_FLOOR((n) + 0.5) |
#define | IL_CLEAR(this) |
Remove all elements. More... | |
#define | IL_DELETE(this) |
Delete the list. More... | |
#define | IL_EACH(this, cond, body) |
#define | IL_EMPTY(this) (this.il_head == NULL) |
#define | IL_FIRST(this) (this.il_head) |
#define | IL_FLOOR(n) ((n) | 0) |
#define | IL_LAST(this) (this.il_tail) |
#define | IL_LISTS_PER_BIT IL_CEIL(IL_MAX / (3 * 24)) |
#define | IL_NEW() NEW(IntrusiveList) |
#define | IL_PEEK(this) (this.il_tail) |
Functions | |
ERASEABLE bool | IL_CONTAINS (IntrusiveList this, entity it) |
ERASEABLE void | IL_DTOR (entity this) |
ERASEABLE void | IL_DTOR (IntrusiveList this) |
ERASEABLE void | IL_ENDFRAME () |
ERASEABLE void | IL_INIT (entity this) |
ERASEABLE void | IL_INIT (IntrusiveList this) |
ERASEABLE entity | IL_POP (IntrusiveList this) |
Pop from tail. More... | |
ERASEABLE entity | IL_PUSH (IntrusiveList this, entity it) |
Push to tail. More... | |
ERASEABLE void | IL_REMOVE (IntrusiveList this, entity it) |
Remove any element, anywhere in the list. More... | |
ERASEABLE entity | IL_SHIFT (IntrusiveList this) |
Pop from head. More... | |
ERASEABLE entity | IL_UNSHIFT (IntrusiveList this, entity it) |
Push to head. More... | |
void | ONREMOVE (entity this) |
Variables | |
int | il_id |
IntrusiveList | il_links [IL_MAX] |
entity | il_links_flds [IL_MAX *2] |
int | il_links_ptr |
vector | il_listmask |
vector | il_lists |
const int | IL_MAX = 128 |
Maximum amount of creatable lists. More... | |
#define IL_CEIL | ( | n | ) | IL_FLOOR((n) + 0.5) |
Definition at line 189 of file intrusivelist.qh.
#define IL_CLEAR | ( | this | ) |
Remove all elements.
Definition at line 151 of file intrusivelist.qh.
Referenced by _Movetype_PushMove(), CommonCommand_editmob(), crosshair_trace_plusvisibletriggers__is_wz(), FireRailgunBullet(), IL_DTOR(), Invasion_CheckWinner(), and pathlib_cleanup().
#define IL_DELETE | ( | this | ) |
Delete the list.
Definition at line 163 of file intrusivelist.qh.
Referenced by Promise_reject(), Promise_resolve(), and REGISTER_MUTATOR().
#define IL_EACH | ( | this, | |
cond, | |||
body | |||
) |
Definition at line 169 of file intrusivelist.qh.
Referenced by _Movetype_PushMove(), antilag_restore_all(), antilag_takeback_all(), assault_new_round(), assault_objective_use(), assault_roundstart_use(), assault_setenemytoobjective(), bot_serverframe(), botframe_autowaypoints_createwp(), botframe_autowaypoints_fix_from(), botframe_deleteuselesswaypoints(), botframe_updatedangerousobjects(), buff_Inferno_CalculateTime(), checkpoint_passed(), client_hasweapon(), ClientConnect(), ClientDisconnect(), ClientKill_TeamChange(), CommonCommand_editmob(), conveyor_think(), CreatureFrame_All(), crosshair_trace_plusvisibletriggers__is_wz(), crosshair_trace_waypoints(), CSQC_UpdateView(), cvar_settemp(), Domination_count_controlpoints(), dompoint_captured(), EndFrame(), findnearest(), Fire_ApplyDamage(), FireRailgunBullet(), func_ladder_think(), havocbot_ai(), havocbot_chooseenemy(), havocbot_gettarget(), havocbot_goalrating_ast_targets(), havocbot_goalrating_ball(), havocbot_goalrating_controlpoints(), havocbot_goalrating_items(), havocbot_goalrating_ons_controlpoints_attack(), havocbot_goalrating_ons_generator_attack(), havocbot_goalrating_waypoints(), havocbot_moveto(), havocbot_movetogoal(), havocbot_role_cts(), havocbot_role_race(), havocbot_select_an_item_of_group(), HUD_Radar(), Invasion_CheckWinner(), invasion_GetWaveEntity(), invasion_PickSpawn(), Item_FindTeam(), Item_ItemsTime_Allow(), Item_Touch(), ka_RemoveBalls(), Local_Notification_WOVA(), Monster_FindTarget(), MoveToRandomLocationWithinBounds(), MUTATOR_HOOKFUNCTION(), navigation_checkladders(), navigation_findnearestwaypoint_withdist_except(), navigation_get_really_close_waypoint(), navigation_markroutes(), navigation_markroutes_inverted(), navigation_markroutes_nearestwaypoints(), navigation_routerating(), navigation_unstuck(), NET_HANDLE(), onslaught_updatelinks(), pathlib_cleanup(), pathlib_nodeatpoint(), pathlib_waypointpath(), Physics_Frame(), Promise_reject(), Promise_resolve(), PutPlayerInServer(), race_GetFractionalLapCount(), RandomItems_GetRandomInstagibItemClassName(), RandomItems_GetRandomOverkillItemClassName(), sandbox_Database_Save(), sandbox_ObjectAttach_Remove(), sandbox_ObjectPort_Save(), Scoreboard_ItemStats_Draw(), Scoreboard_ItemStats_WouldDraw(), SelectSpawnPoint(), setItemGroupCount(), spawner_use(), StartFrame(), STATIC_INIT(), target_give_init(), target_items_use(), Teleport_Find(), trigger_race_checkpoint_verify(), vehicles_clearreturn(), WarpZone_Find(), WarpZone_MakeAllOther(), WarpZone_MakeAllSolid(), WarpZone_Projectile_Touch(), waypoint_addlink_for_custom_jumppad(), waypoint_get(), waypoint_get_type_name(), waypoint_load_links(), waypoint_remove(), waypoint_save_hardwiredlinks(), waypoint_save_links(), waypoint_saveall(), waypoint_schedulerelinkall(), waypoint_showlinks_to(), waypoint_spawn(), waypoint_spawn_fromeditor(), waypoint_spawnforitem_force(), waypoint_think(), waypoint_unreachable(), waypoint_updatecost_foralllinks(), weapon_prepareattack_checkammo(), Weapon_whereis(), WinningCondition_Invasion(), and WinningCondition_RanOutOfSpawns().
Definition at line 41 of file intrusivelist.qh.
Referenced by draw_ClearClip(), and ka_Handler_CheckBall().
#define IL_FIRST | ( | this | ) | (this.il_head) |
Definition at line 43 of file intrusivelist.qh.
Referenced by SelectSpawnPoint().
#define IL_FLOOR | ( | n | ) | ((n) | 0) |
Definition at line 188 of file intrusivelist.qh.
Referenced by IL_INIT().
#define IL_LAST | ( | this | ) | (this.il_tail) |
Definition at line 44 of file intrusivelist.qh.
Definition at line 191 of file intrusivelist.qh.
Referenced by IL_INIT().
#define IL_NEW | ( | ) | NEW(IntrusiveList) |
Definition at line 39 of file intrusivelist.qh.
Referenced by _Promise_handle(), dom_Initialize(), GENERIC_COMMAND(), ka_Initialize(), ons_Initialize(), REGISTER_MUTATOR(), spawnfunc(), STATIC_INIT(), and target_checkpoint_setup().
#define IL_PEEK | ( | this | ) | (this.il_tail) |
Definition at line 45 of file intrusivelist.qh.
Referenced by _draw_SetClip(), and draw_ClearClip().
ERASEABLE bool IL_CONTAINS | ( | IntrusiveList | this, |
entity | it | ||
) |
Definition at line 48 of file intrusivelist.qh.
References assert, and ERASEABLE.
Referenced by IL_PUSH(), IL_UNSHIFT(), kh_Key_Attach(), kh_Key_Detach(), ONREMOVE(), and ons_GeneratorReset().
Referenced by IntrusiveList::IntrusiveList ::~ IntrusiveList().
ERASEABLE void IL_DTOR | ( | IntrusiveList | this | ) |
Definition at line 230 of file intrusivelist.qh.
References entity(), IL_MAX, IntrusiveList::il_nextfld, IL_REMOVE(), and next.
Referenced by CSQC_UpdateView(), EndFrame(), and m_draw().
Referenced by IntrusiveList::IntrusiveList ::IntrusiveList().
ERASEABLE void IL_INIT | ( | IntrusiveList | this | ) |
Definition at line 194 of file intrusivelist.qh.
References assert, ERASEABLE, IL_FLOOR, il_id, il_links_flds, il_links_ptr, il_listmask, IL_LISTS_PER_BIT, IL_MAX, and LOG_WARN.
ERASEABLE entity IL_POP | ( | IntrusiveList | this | ) |
ERASEABLE entity IL_PUSH | ( | IntrusiveList | this, |
entity | it | ||
) |
Push to tail.
Definition at line 58 of file intrusivelist.qh.
References assert, entity(), ERASEABLE, IL_CONTAINS(), il_listmask, and NULL.
Referenced by _draw_SetClip(), _Movetype_PushMove(), _Promise_handle(), _StartItem(), buff_Init(), conveyor_think(), CopyBody(), cpicon_construct(), ctf_FlagSetup(), cvar_settemp(), DamageText::DamageText ::DamageText(), dom_controlpoint_setup(), FireGrapplingHook(), FireRailgunBullet(), func_ladder_think(), generator_construct(), GENERIC_COMMAND(), ka_DropEvent(), ka_SpawnBall(), kh_Key_Detach(), Local_Notification_WOVA(), LocalCommand_debugmodel(), monster_changeteam(), Monster_Spawn(), Monster_Spawn_Setup(), NET_HANDLE(), ons_CaptureShield_Spawn(), ons_ControlPoint_Icon_Spawn(), ons_generator_ray_spawn(), ons_GeneratorReset(), ons_GeneratorSetup(), onslaught_updatelinks(), pathlib_mknode(), Player::Player ::Player(), PutPlayerInServer(), REGISTER_MUTATOR(), relocate_spawnpoint(), sandbox_ObjectSpawn(), spawnfunc(), STATIC_INIT(), SV_OnEntityPreSpawnFunction(), target_checkpoint_setup(), Teleport_Touch(), train_next(), trigger_push_findtarget(), turret_construct(), Unfreeze(), vehicle_initialize(), vehicles_projectile(), vehicles_setreturn(), vehicles_spawn(), W_Nexball_Attack2(), WarpZone_Projectile_Touch(), and waypoint_spawn().
ERASEABLE void IL_REMOVE | ( | IntrusiveList | this, |
entity | it | ||
) |
Remove any element, anywhere in the list.
Definition at line 132 of file intrusivelist.qh.
References assert, entity(), LOG_DEBUGF, next, NULL, and prev.
Referenced by draw_ClearClip(), dumpnode(), Freeze(), IL_ENDFRAME(), invasion_SpawnChosenMonster(), ka_TouchEvent(), kh_Key_Attach(), MUTATOR_HOOKFUNCTION(), ONREMOVE(), ons_generator_ray_draw(), onslaught_updatelinks(), Player::Player ::~ Player(), PlayerCorpseDamage(), PutObserverInServer(), and PutPlayerInServer().
ERASEABLE entity IL_SHIFT | ( | IntrusiveList | this | ) |
ERASEABLE entity IL_UNSHIFT | ( | IntrusiveList | this, |
entity | it | ||
) |
Push to head.
Definition at line 77 of file intrusivelist.qh.
References assert, entity(), ERASEABLE, IL_CONTAINS(), il_listmask, and NULL.
Definition at line 251 of file intrusivelist.qh.
References IL_CONTAINS(), il_lists, IL_MAX, IL_REMOVE(), and vector().
Referenced by ClientDisconnect(), and CSQC_Ent_Update().
int il_id |
Definition at line 183 of file intrusivelist.qh.
IntrusiveList il_links[IL_MAX] |
Definition at line 184 of file intrusivelist.qh.
Definition at line 185 of file intrusivelist.qh.
Referenced by IL_INIT().
int il_links_ptr |
Definition at line 186 of file intrusivelist.qh.
Referenced by IL_INIT().
vector il_listmask |
Definition at line 37 of file intrusivelist.qh.
Referenced by IL_INIT(), IL_PUSH(), and IL_UNSHIFT().
vector il_lists |
Definition at line 35 of file intrusivelist.qh.
Referenced by ONREMOVE().
const int IL_MAX = 128 |
Maximum amount of creatable lists.
Lists can be given endless amount of entities, only restricted by engine limitations.
Definition at line 9 of file intrusivelist.qh.
Referenced by IL_ENDFRAME(), IL_INIT(), and ONREMOVE().