effect fix, spr assert
This commit is contained in:
		
							parent
							
								
									7d419d49e4
								
							
						
					
					
						commit
						d4244be464
					
				|  | @ -16,11 +16,13 @@ void Effect::draw(int x, int y) | |||
|     if(!m_finished) { | ||||
|         if(g_platform.getTicks() - m_lastTicks > 75) { | ||||
|             const ThingAttributes& attributes = getAttributes(); | ||||
|             m_animation++; | ||||
|             if(m_animation == attributes.animcount) { | ||||
| 
 | ||||
|             if(m_animation+1 == attributes.animcount) { | ||||
|                 g_dispatcher.addEvent(std::bind(&Map::removeThing, &g_map, asThing())); | ||||
|                 m_finished = true; | ||||
|             } | ||||
|             else | ||||
|                 m_animation++; | ||||
|             m_lastTicks = g_platform.getTicks(); | ||||
|         } | ||||
| 
 | ||||
|  |  | |||
|  | @ -93,7 +93,7 @@ TexturePtr SpriteManager::getSpriteTexture(int id) | |||
|     if(id == 0) | ||||
|         return g_graphics.getEmptyTexture(); | ||||
| 
 | ||||
|     assert(id <= m_spritesCount); | ||||
|     assert(id > 0 && id <= m_spritesCount); | ||||
| 
 | ||||
|     // load sprites on demand
 | ||||
|     TexturePtr texture = m_sprites[id-1]; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Henrique
						Henrique