OpenEnroth / OpenEnroth

Open reimplementation of Might and Magic 6 7 8 game engine
GNU Lesser General Public License v3.0
724 stars 87 forks source link

BLV_GetFloorLevel and IndoorLocation::GetSector fail too much #216

Open CkNoSFeRaTU opened 2 years ago

CkNoSFeRaTU commented 2 years ago

Describe the bug Both of these functions are failing too much and spamming to logging. In severe cases by thousands messages in a second.

To Reproduce

  1. Load attach savegame file
  2. You will be immediately flooded with Sector/Floorlvl fail messages

Expected behavior GetFloorlevel fail should occur more rarely and GetSector never fail.

Screenshots snap085

Saved game file save004.zip

Additional context Savegame file also triggers #195. So it requires to be resolved before undertaking this issue.

pskelton commented 2 years ago

mountain goats

So the errors from this save file are because of these two hanging out halfway up the wall.

Additionally getsector can be allowed to fail in certain circumstances (such as line of sight checks).