1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

Apply suggestions from code review

Co-authored-by: Andrey Filipenkov <decapitator@ukr.net>
This commit is contained in:
Nordsoft91
2022-10-08 22:55:15 +04:00
committed by GitHub
parent b6c0fcabbd
commit 23f80c58dc
15 changed files with 33 additions and 35 deletions

View File

@ -191,7 +191,7 @@ void MapHandler::initObjectRects()
auto image = animation->getImage(0, obj->ID == Obj::HERO ? 2 : 0);
if(!image)
{
//workaound for prisons
//workaround for prisons
image = animation->getImage(0, 0);
if(!image)
continue;
@ -238,9 +238,9 @@ bool MapHandler::compareObjectBlitOrder(const CGObjectInstance * a, const CGObje
if(a->pos.y != b->pos.y)
return a->pos.y < b->pos.y;
if(b->ID==Obj::HERO && a->ID!=Obj::HERO)
if(b->ID == Obj::HERO && a->ID != Obj::HERO)
return true;
if(b->ID!=Obj::HERO && a->ID==Obj::HERO)
if(b->ID != Obj::HERO && a->ID == Obj::HERO)
return false;
if(!a->isVisitable() && b->isVisitable())