diff options
| author | Petr Sykora <petr.sykora@gmail.com> | 2008-10-27 23:39:24 +0100 |
|---|---|---|
| committer | Petr Sykora <petr.sykora@gmail.com> | 2008-10-27 23:39:24 +0100 |
| commit | c2b99e31096f89c35ba3f143be1726730208a174 (patch) | |
| tree | 8ad6f08dc68ff4e101fdae9d737561232158b526 | |
| parent | 7eab9e3fe59e9b6893bc1404880073e42d3511ed (diff) | |
fixed "fixed" addLayer we should y-sort by y+h, not by y+h/2
| -rw-r--r-- | src/client/layer.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; }; |