Remove copying historyholder for now, as it causes issues.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
parent
e2cc20d1c5
commit
ba5e937dbd
|
@ -67,20 +67,6 @@ namespace CreatureLib::Battling {
|
|||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
void CloneOnto(HistoryHolder& other) const {
|
||||
if (other._top != nullptr) {
|
||||
other._top->Clear();
|
||||
}
|
||||
free(other._memory);
|
||||
other._offset = _offset;
|
||||
other._capacity = _capacity;
|
||||
other._memory = static_cast<uint8_t*>(malloc(_capacity));
|
||||
memcpy(other._memory, _memory, _capacity);
|
||||
if (_top != nullptr) {
|
||||
other._top = reinterpret_cast<HistoryElement*>(other._memory + ((u8*)_top - _memory));
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -204,7 +204,6 @@ Battle* Battle::Clone() const {
|
|||
battle->_random = _random;
|
||||
battle->_hasEnded = _hasEnded;
|
||||
battle->_battleResult = _battleResult;
|
||||
_historyHolder.CloneOnto(battle->_historyHolder);
|
||||
battle->_currentTurn = _currentTurn;
|
||||
_volatile.Clone(battle->_volatile);
|
||||
|
||||
|
|
Loading…
Reference in New Issue