mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
* servers will not allow using out-of-range slots ( #1061 )
* server won't crash on some scenarios when they're used * fixed some minor discrepancies with creature placement in creature banks
This commit is contained in:
@ -82,6 +82,12 @@ void CArmyTooltip::init(const InfoAboutArmy &army)
|
||||
|
||||
BOOST_FOREACH(auto & slot, army.army)
|
||||
{
|
||||
if(slot.first >= GameConstants::ARMY_SIZE)
|
||||
{
|
||||
tlog3 << "Warning: " << army.name << " has stack in slot " << slot.first << std::endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
new CAnimImage("CPRSMALL", slot.second.type->idNumber + 2, 0, slotsPos[slot.first].x, slotsPos[slot.first].y);
|
||||
|
||||
std::string subtitle;
|
||||
|
Reference in New Issue
Block a user