Fixed Corpses drawing order. Order was not determined with multiple corpses on the one tile

This commit is contained in:
mr-russ 2003-10-03 02:28:53 +00:00
parent 45e3bb41cb
commit e28e9d8aac

View file

@ -1903,7 +1903,9 @@ local int DrawLevelCompare(const void* v1, const void* v2) {
drawlevel2 = c2->Type->DrawLevel;
}
if( drawlevel1 == drawlevel2 ) {
return c1->Y*MaxMapWidth+c1->X < c2->Y*MaxMapWidth+c2->X ? -1 : 1;
return c1->Y*MaxMapWidth+c1->X - c2->Y*MaxMapWidth+c2->X ?
c1->Y*MaxMapWidth+c1->X - c2->Y*MaxMapWidth+c2->X :
c1->Slot - c2->Slot;
} else {
return drawlevel1 <= drawlevel2 ? -1 : 1;
}