XEEN: Fix outdoors monsters disappearing from view
This commit is contained in:
parent
75102d4274
commit
61a33af8b4
3 changed files with 11 additions and 3 deletions
|
@ -128,7 +128,7 @@ Combat::Combat(XeenEngine *vm): _vm(vm), _missVoc("miss.voc"), _pow1Voc("pow1.vo
|
|||
}
|
||||
|
||||
void Combat::clear() {
|
||||
Common::fill(&_attackMonsters[0], &_attackMonsters[26], -1);
|
||||
Common::fill(&_attackMonsters[0], &_attackMonsters[ATTACK_MONSTERS_COUNT], -1);
|
||||
}
|
||||
|
||||
void Combat::giveCharDamage(int damage, DamageType attackType, int charIndex) {
|
||||
|
|
|
@ -32,6 +32,7 @@ namespace Xeen {
|
|||
|
||||
#define MAX_NUM_MONSTERS 107
|
||||
#define PARTY_AND_MONSTERS 12
|
||||
#define ATTACK_MONSTERS_COUNT 26
|
||||
|
||||
enum DamageType {
|
||||
DT_PHYSICAL = 0, DT_MAGICAL = 1, DT_FIRE = 2, DT_ELECTRICAL = 3,
|
||||
|
@ -106,7 +107,7 @@ public:
|
|||
Common::Array<bool> _charsBlocked;
|
||||
Common::Array<int> _charsGone;
|
||||
SpriteResource _powSprites;
|
||||
int _attackMonsters[26];
|
||||
int _attackMonsters[ATTACK_MONSTERS_COUNT];
|
||||
int _monster2Attack;
|
||||
int _charsArray1[PARTY_AND_MONSTERS];
|
||||
bool _monPow[PARTY_AND_MONSTERS];
|
||||
|
|
|
@ -2315,7 +2315,10 @@ void InterfaceScene::setIndoorsMonsters() {
|
|||
Common::Point mazePos = _vm->_party->_mazePosition;
|
||||
Direction dir = _vm->_party->_mazeDirection;
|
||||
|
||||
// Reset the list of attacking monsters
|
||||
combat.clear();
|
||||
|
||||
// Iterate through the monsters list checking for proximity to party
|
||||
for (uint monsterIdx = 0; monsterIdx < map._mobData._monsters.size(); ++monsterIdx) {
|
||||
MazeMonster &monster = map._mobData._monsters[monsterIdx];
|
||||
SpriteResource *sprites = monster._sprites;
|
||||
|
@ -3097,6 +3100,10 @@ void InterfaceScene::setOutdoorsMonsters() {
|
|||
Direction dir = party._mazeDirection;
|
||||
Common::Point pt = party._mazePosition;
|
||||
|
||||
// Reset the list of attacking monsters
|
||||
combat.clear();
|
||||
|
||||
// Iterate through the monsters list checking for proximity to party
|
||||
for (uint idx = 0; idx < map._mobData._monsters.size(); ++idx) {
|
||||
MazeMonster &monster = map._mobData._monsters[idx];
|
||||
|
||||
|
@ -3309,7 +3316,7 @@ void InterfaceScene::setOutdoorsMonsters() {
|
|||
_outdoorList[45]._x = -16;
|
||||
}
|
||||
|
||||
for (int idx = 0; idx < 26; ++idx) {
|
||||
for (int idx = 0; idx < ATTACK_MONSTERS_COUNT; ++idx) {
|
||||
DrawStruct &ds = _outdoorList[Res.OUTDOOR_MONSTER_INDEXES[idx]];
|
||||
|
||||
if (ds._frame != -1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue