1
0
Fork 0

model: simplification using the new values() function

This commit is contained in:
mfranz 2009-02-16 23:35:54 +00:00
parent 5409ff66ad
commit 2618b98b88

View file

@ -402,9 +402,7 @@ var model = {
append(available ? me.available : me.unavailable, data);
}
me.list = sort(keys(me.data), func(a, b) cmp(me.data[a].sort, me.data[b].sort));
forindex (var i; me.list)
me.list[i] = me.data[me.list[i]];
me.list = sort(values(me.data), func(a, b) cmp(a.sort, b.sort));
setprop("ai/models/num-players", size(me.list));
setprop("sim/signals/multiplayer-updated", 1);