mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 14:18:37 +00:00
ULTIMA8: Fix offset to Crusader attack data
This commit is contained in:
parent
2b3864e2ce
commit
ba4e20b075
@ -815,14 +815,14 @@ bool AttackProcess::checkTimer2PlusDelayElapsed(int now) {
|
||||
|
||||
void AttackProcess::setAttackData(uint16 off, uint16 val) {
|
||||
if (off >= MAGIC_DATA_OFF && off < MAGIC_DATA_OFF + ARRAYSIZE(_dataArray) - 1)
|
||||
_dataArray[off] = val;
|
||||
_dataArray[off - MAGIC_DATA_OFF] = val;
|
||||
|
||||
warning("Invalid offset to setAttackDataArray %d %d", off, val);
|
||||
}
|
||||
|
||||
uint16 AttackProcess::getAttackData(uint16 off) const {
|
||||
if (off >= MAGIC_DATA_OFF && off < MAGIC_DATA_OFF + ARRAYSIZE(_dataArray) - 1)
|
||||
return _dataArray[off];
|
||||
return _dataArray[off - MAGIC_DATA_OFF];
|
||||
|
||||
warning("Invalid offset to getAttackDataArray: %d", off);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user