From c2b99e31096f89c35ba3f143be1726730208a174 Mon Sep 17 00:00:00 2001 From: Petr Sykora Date: Mon, 27 Oct 2008 23:39:24 +0100 Subject: fixed "fixed" addLayer we should y-sort by y+h, not by y+h/2 --- src/client/layer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/layer.c') diff --git a/src/client/layer.c b/src/client/layer.c index 8807c35..a4e3c48 100644 --- a/src/client/layer.c +++ b/src/client/layer.c @@ -72,9 +72,9 @@ addLayer(image_t * img, int x, int y, int px, int py, int w, int h, int player) //here we are sure, that we want to insert it somewhere else than the begining for (i = 0; i < listLayer->count; i ++) { actual = getList(listLayer, i); - //if we are at the same layer, we apply insert sort in (y+h/2) + //if we are at the same layer, we apply insert sort in (y+h) while ((actual->layer == new->layer)) { - if ((new->y + new->h / 2) < (actual->y + actual->h/2)) { + if ((new->y + new->h) < (actual->y + actual->h)) { insList(listLayer, i, new); return; }; -- cgit v1.2.3