mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
Fix counter-attack counting
This commit is contained in:
@ -359,6 +359,8 @@ CUnitState & CUnitState::operator=(const CUnitState & other)
|
||||
waiting = other.waiting;
|
||||
waitedThisTurn = other.waitedThisTurn;
|
||||
casts = other.casts;
|
||||
counterAttacks = other.counterAttacks;
|
||||
shots = other.shots;
|
||||
health = other.health;
|
||||
cloneID = other.cloneID;
|
||||
position = other.position;
|
||||
|
@ -34,6 +34,19 @@ protected:
|
||||
{
|
||||
std::atomic<int64_t> version = 0;
|
||||
std::atomic<int64_t> value = 0;
|
||||
|
||||
BonusCacheEntry() = default;
|
||||
BonusCacheEntry(const BonusCacheEntry & other)
|
||||
: version(other.version.load())
|
||||
, value(other.value.load())
|
||||
{
|
||||
}
|
||||
BonusCacheEntry & operator =(const BonusCacheEntry & other)
|
||||
{
|
||||
version = other.version.load();
|
||||
value = other.value.load();
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
int getBonusValueImpl(BonusCacheEntry & currentValue, const CSelector & selector, BonusCacheMode) const;
|
||||
|
Reference in New Issue
Block a user