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:
parent
f5b5da348b
commit
a058832862
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user