Skip to content

Commit

Permalink
fix minor sprite error
Browse files Browse the repository at this point in the history
  • Loading branch information
Warboy1982 committed Mar 18, 2016
1 parent 30cb024 commit 5a36372
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Battlescape/BattlescapeState.cpp
Expand Up @@ -1570,7 +1570,7 @@ inline void BattlescapeState::handle(Action *action)
// "ctrl-j" - stun all aliens
else if (_save->getDebugMode() && action->getDetails()->key.keysym.sym == SDLK_j && (SDL_GetModState() & KMOD_CTRL) != 0)
{
debug(L"Deploying Celine Dione album");

This comment has been minimized.

Copy link
@MeridianOXC

MeridianOXC Mar 20, 2016

Member

This must have been the cause of all unexplainable bugs :D

debug(L"Deploying Celine Dion album");
for (std::vector<BattleUnit*>::iterator i = _save->getUnits()->begin(); i !=_save->getUnits()->end(); ++i)
{
if ((*i)->getOriginalFaction() == FACTION_HOSTILE && !(*i)->isOut())
Expand Down
5 changes: 2 additions & 3 deletions src/Battlescape/Map.cpp
Expand Up @@ -638,16 +638,15 @@ void Map::drawTerrain(Surface *surface)
{
Position offset;
calculateWalkingOffset(westUnit, &offset);
tmpSurface->blitNShade(surface, screenPosition.x - tileOffset.x + offset.x - _spriteWidth / 2, screenPosition.y + tileOffset.y + offset.y + getTerrainLevel(westUnit->getPosition(), westUnit->getArmor()->getSize()), tileWestShade, true);
tmpSurface->blitNShade(surface, screenPosition.x - tileOffset.x + offset.x - _spriteWidth / 2, screenPosition.y + tileOffset.y + offset.y, tileWestShade, true);
if (westUnit->getFire() > 0)
{
frameNumber = 4 + (_animFrame / 2);
tmpSurface = _game->getMod()->getSurfaceSet("SMOKE.PCK")->getFrame(frameNumber);
tmpSurface->blitNShade(surface, screenPosition.x - tileOffset.x + offset.x, screenPosition.y + tileOffset.y + offset.y + getTerrainLevel(westUnit->getPosition(), westUnit->getArmor()->getSize()), 0, true);
tmpSurface->blitNShade(surface, screenPosition.x - tileOffset.x + offset.x, screenPosition.y + tileOffset.y + offset.y, 0, true);
}
}
}

// Draw smoke/fire
if (tileWest->getSmoke() && tileWest->isDiscovered(2))
{
Expand Down

0 comments on commit 5a36372

Please sign in to comment.