Fix a stackpos bug in 9.6

master
Eduardo Bart 12 years ago
parent c795eb91ab
commit 98c279c10b

@ -41,7 +41,7 @@
Creature::Creature() : Thing()
{
m_id = 1;
m_id = 0;
m_healthPercent = 100;
m_speed = 200;
m_direction = Otc::South;

@ -226,7 +226,8 @@ namespace Proto {
ClientMarketBrowse = 245, // 944
ClientMarketCreate = 246, // 944
ClientMarketCancel = 247, // 944
ClientMarketAccept = 248 // 944
ClientMarketAccept = 248, // 944
ClientAnswerModalDialog = 249 // 960
};
enum ServerSpeakType {

@ -442,13 +442,7 @@ void ProtocolGame::parseMapMoveWest(const InputMessagePtr& msg)
void ProtocolGame::parseUpdateTile(const InputMessagePtr& msg)
{
Position tilePos = getPosition(msg);
int thingId = msg->peekU16();
if(thingId == 0xFF01) {
msg->getU16();
} else {
setTileDescription(msg, tilePos);
msg->getU16();
}
setTileDescription(msg, tilePos);
}
void ProtocolGame::parseTileAddThing(const InputMessagePtr& msg)

@ -163,6 +163,9 @@ ThingPtr Tile::addThing(const ThingPtr& thing, int stackPos)
return nullptr;
}
if(stackPos == 255)
stackPos = -1;
// the items stackpos follows this order:
// 0 - ground
// 1 - ground borders

Loading…
Cancel
Save