X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Flib%2Fsortlist.qc;h=e800bc4576ae8d81ca1c4a37838e5ae6db2c0bf7;hb=9d5295bb4213f6c703d43d158605efe893514ee4;hp=1d8726c89847681802ce2f3656aa37f850174ca6;hpb=42e255d014f2c6a1871177ea511f630624cdfb57;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/sortlist.qc b/qcsrc/lib/sortlist.qc index 1d8726c89..e800bc457 100644 --- a/qcsrc/lib/sortlist.qc +++ b/qcsrc/lib/sortlist.qc @@ -1,5 +1,6 @@ #include "sortlist.qh" +ERASEABLE entity Sort_Spawn() { entity sort = new_pure(sortlist); @@ -13,7 +14,7 @@ entity Sort_New(float(entity,entity) cmp) entity sort; sort = spawn(); sort.sort_cmp = cmp; - sort.sort_next = world; + sort.sort_next = NULL; sort.chain = sort; return sort; } @@ -56,7 +57,7 @@ void Sort_Reset(entity sort) float Sort_HasNext(entity sort) { - return (sort.chain.sort_next != world); + return (sort.chain.sort_next != NULL); } entity Sort_Next(entity sort) @@ -67,7 +68,7 @@ entity Sort_Next(entity sort) next = spawn(); sort.chain.sort_next = next; next.sort_prev = sort.chain; - next.sort_next = world; + next.sort_next = NULL; } sort.chain = next; return next;