Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
sortlist.qh File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SORT_SWAP(a, b)
 Swap two neighbours in a sortlist.

Functions

 classfield (Sort).entity chain
 entityclass (Sort)
entity Sort_Spawn ()

Variables

 sort_next
 sort_prev

Macro Definition Documentation

◆ SORT_SWAP

#define SORT_SWAP ( a,
b )
Value:
MACRO_BEGIN \
b.sort_prev = a.sort_prev; \
a.sort_next = b.sort_next; \
if (b.sort_next) b.sort_next.sort_prev = a; \
a.sort_prev = b; \
b.sort_next = a; \
#define MACRO_END
Definition macro.qh:7
sort_next
Definition sortlist.qh:5
sort_prev
Definition sortlist.qh:5
if(frag_attacker.flagcarried)
Definition sv_ctf.qc:2325

Swap two neighbours in a sortlist.

Parameters
aFIRST entity
bentity after a

Definition at line 14 of file sortlist.qh.

14#define SORT_SWAP(a, b) MACRO_BEGIN \
15 b.sort_prev = a.sort_prev; \
16 a.sort_next = b.sort_next; \
17 if (b.sort_next) b.sort_next.sort_prev = a; \
18 if (a.sort_prev) a.sort_prev.sort_next = b; \
19 a.sort_prev = b; \
20 b.sort_next = a; \
21MACRO_END

Referenced by MoveToLast(), Scoreboard_UpdatePlayerPos(), and Scoreboard_UpdateTeamPos().

Function Documentation

◆ classfield()

classfield ( Sort )

References chain, entity(), sort_next, and sort_prev.

◆ entityclass()

entityclass ( Sort )

◆ Sort_Spawn()

entity Sort_Spawn ( )

Definition at line 4 of file sortlist.qc.

5{
6 entity sort = new_pure(sortlist);
7 sort.sort_next = NULL;
8 sort.chain = sort;
9 return sort;
10}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define new_pure(class)
purely logical entities (not linked to the area grid)
Definition oo.qh:67
#define NULL
Definition post.qh:14

References entity(), new_pure, and NULL.

Referenced by CSQC_Init().

Variable Documentation

◆ sort_next

sort_next

Definition at line 5 of file sortlist.qh.

Referenced by classfield().

◆ sort_prev

sort_prev

Definition at line 5 of file sortlist.qh.

Referenced by classfield().