X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Flib%2Fsortlist.qc;h=6748b60cd77954e84064e072a6d6cef715be0804;hb=17b2adabf26ae062a323bb0d2016bf2eea6aea14;hp=fecc79bdff0900068d804b8f36273662bd890106;hpb=c741e6b3f012aa525f23e1df30d1d933b383fbc5;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/sortlist.qc b/qcsrc/lib/sortlist.qc index fecc79bdf..6748b60cd 100644 --- a/qcsrc/lib/sortlist.qc +++ b/qcsrc/lib/sortlist.qc @@ -2,8 +2,7 @@ entity Sort_Spawn() { - entity sort = new(sortlist); - make_pure(sort); + entity sort = new_pure(sortlist); sort.sort_next = NULL; sort.chain = sort; return sort; @@ -14,7 +13,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; } @@ -57,7 +56,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) @@ -68,7 +67,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;