draw yells outside screen range
This commit is contained in:
parent
82dc42dc26
commit
a4546942d2
|
@ -210,7 +210,6 @@ void Game::processCreatureTeleport(const CreaturePtr& creature)
|
|||
{
|
||||
// stop walking on creature teleports
|
||||
creature->stopWalk();
|
||||
dump << "stop walk" << creature->getName();
|
||||
|
||||
if(creature == m_localPlayer)
|
||||
m_localPlayer->lockWalk();
|
||||
|
|
|
@ -128,9 +128,6 @@ void Map::addThing(const ThingPtr& thing, const Position& pos, int stackPos)
|
|||
Position oldPos = thing->getPosition();
|
||||
tile->addThing(thing, stackPos);
|
||||
|
||||
// creature teleported
|
||||
if(creature == g_game.getLocalPlayer())
|
||||
dump << "creature move from" << oldPos << "to" << pos;
|
||||
if(oldPos.isValid() && !oldPos.isInRange(pos,1,1))
|
||||
g_game.processCreatureTeleport(creature);
|
||||
} else if(MissilePtr missile = thing->asMissile()) {
|
||||
|
|
|
@ -39,7 +39,6 @@ bool SpriteManager::load(const std::string& file)
|
|||
g_resources.loadFile(file, m_fin);
|
||||
m_signature = Fw::getU32(m_fin);
|
||||
m_spritesCount = Fw::getU16(m_fin);
|
||||
dump << m_spritesCount;
|
||||
m_sprites.resize(m_spritesCount);
|
||||
m_loaded = true;
|
||||
return true;
|
||||
|
|
|
@ -37,7 +37,8 @@ void StaticText::draw(const Point& dest, const Rect& parentRect)
|
|||
Rect boundRect = rect;
|
||||
boundRect.bind(parentRect);
|
||||
|
||||
if((boundRect.center() - rect.center()).length() < parentRect.width() / 15) {
|
||||
// draw only if the real center is not too far from the parent center, or its a yell
|
||||
if((boundRect.center() - rect.center()).length() < parentRect.width() / 15 || m_yell) {
|
||||
//TODO: cache into a framebuffer
|
||||
m_font->renderText(m_text, boundRect, Fw::AlignCenter, m_color);
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ bool UIGame::onKeyPress(uchar keyCode, int keyboardModifiers, bool wouldFilter)
|
|||
|
||||
UILineEditPtr chatLineEdit = std::dynamic_pointer_cast<UILineEdit>(getParent()->recursiveGetChildById("consoleLineEdit"));
|
||||
|
||||
//TODO: move this whole shit to lua
|
||||
if(keyboardModifiers == Fw::KeyboardNoModifier) {
|
||||
if(keyCode == Fw::KeyUp || keyCode == Fw::KeyNumpad8) {
|
||||
g_game.walk(Otc::North);
|
||||
|
|
Loading…
Reference in New Issue