bjaraujo / Bombermaaan

Bombermaaan is inspired on the classic Bomberman game.
GNU General Public License v3.0
108 stars 13 forks source link

Assertion failed Sprite >= 0 && Sprite < (int)m_SpriteTables[SpriteTable].size() #10

Closed bjaraujo closed 8 years ago

bjaraujo commented 8 years ago

Microsoft Visual C++ Runtime Library

Assertion failed!

Program: ...maaan\build\msvc12-win32\src\Debug\BomberMaaan.exe File: \trunk\src\CSDLVideo.cpp Line: 340

Expression: Sprite >= 0 && Sprite < (int)m_SpriteTables[SpriteTable].size()

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts

bjaraujo commented 8 years ago

Seems to request a sprite index equal to the sprite table size.

Player seems to be in a sick and throwing state.

Check CBomber.cpp where index is incremented.

    m_Sprite += SICK_SPRITE_ROW_SHADOW * m_BomberSpriteTables[m_BomberState].NumberOfSpritesPerColor;

m_Page = 5 m_Sprite = 84 (int)m_SpriteTables[SpriteTable].size() = 84 m_Sickness = SICK_INVISIBILITY m_BomberState = BOMBERSTATE_THROW m_SickTimer = 0.0644255877

bjaraujo commented 8 years ago

fixed by commit 924cb12798fc67ff23e9504ed006bceab4143a44