mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +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:
@@ -185,6 +185,12 @@ struct StackLocation
|
||||
army = const_cast<CArmedInstance*>(Army); //we are allowed here to const cast -> change will go through one of our packages... do not abuse!
|
||||
slot = Slot;
|
||||
}
|
||||
|
||||
bool validSlot() const
|
||||
{
|
||||
return slot >= 0 && slot < GameConstants::ARMY_SIZE;
|
||||
}
|
||||
|
||||
DLL_LINKAGE const CStackInstance *getStack();
|
||||
template <typename Handler> void serialize(Handler &h, const int version)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user