mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Fixed # 109 from r1416
This commit is contained in:
@ -3389,19 +3389,13 @@ bool CGameHandler::buildBoat( ui32 objid )
|
|||||||
NewObject no;
|
NewObject no;
|
||||||
no.ID = 8;
|
no.ID = 8;
|
||||||
if (obj->o->ID == TOWNI_TYPE)
|
if (obj->o->ID == TOWNI_TYPE)
|
||||||
{
|
{ //check what kind of creatures are avaliable in town
|
||||||
switch ((static_cast<const CGTownInstance*>(obj))->alignment)
|
if (VLC->creh->creatures[(static_cast<const CGTownInstance*>(obj))->creatures[0].second[0]].isGood())
|
||||||
{
|
|
||||||
case 1: //good - standard
|
|
||||||
boatType = 1;
|
boatType = 1;
|
||||||
break;
|
else if (VLC->creh->creatures[(static_cast<const CGTownInstance*>(obj))->creatures[0].second[0]].isEvil())
|
||||||
case -1: //evil
|
|
||||||
boatType = 0;
|
boatType = 0;
|
||||||
break;
|
else //neutral
|
||||||
case 0: //neutral
|
|
||||||
boatType = 2;
|
boatType = 2;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
no.subID = boatType;
|
no.subID = boatType;
|
||||||
no.pos = tile + int3(1,0,0);
|
no.pos = tile + int3(1,0,0);
|
||||||
|
Reference in New Issue
Block a user