1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Fixed # 109 from r1416

This commit is contained in:
DjWarmonger 2010-01-11 09:18:52 +00:00
parent f5b5da348b
commit a058832862

View File

@ -3389,19 +3389,13 @@ bool CGameHandler::buildBoat( ui32 objid )
NewObject no;
no.ID = 8;
if (obj->o->ID == TOWNI_TYPE)
{
switch ((static_cast<const CGTownInstance*>(obj))->alignment)
{
case 1: //good - standard
{ //check what kind of creatures are avaliable in town
if (VLC->creh->creatures[(static_cast<const CGTownInstance*>(obj))->creatures[0].second[0]].isGood())
boatType = 1;
break;
case -1: //evil
else if (VLC->creh->creatures[(static_cast<const CGTownInstance*>(obj))->creatures[0].second[0]].isEvil())
boatType = 0;
break;
case 0: //neutral
else //neutral
boatType = 2;
break;
}
}
no.subID = boatType;
no.pos = tile + int3(1,0,0);