1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00
Possibly also #344, #353.
Allowed switching heroes with l-click when another hero is selected. (works for not accessible heroes)
This commit is contained in:
Michał W. Urbańczyk
2010-02-13 04:47:31 +00:00
parent 8637b021cc
commit 96819379c5
9 changed files with 50 additions and 27 deletions

View File

@@ -3616,16 +3616,7 @@ bool CGameHandler::buildBoat( ui32 objid )
//create boat
NewObject no;
no.ID = 8;
if (obj->o->ID == TOWNI_TYPE)
{ //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;
else if (VLC->creh->creatures[(static_cast<const CGTownInstance*>(obj))->creatures[0].second[0]].isEvil())
boatType = 0;
else //neutral
boatType = 2;
}
no.subID = boatType;
no.subID = obj->getBoatType();
no.pos = tile + int3(1,0,0);
sendAndApply(&no);