Support for newer versions and light draw fix
Avoid drawing light under covered tiles.
This commit is contained in:
parent
8bd1293be7
commit
d080432e14
|
@ -54,7 +54,7 @@ function g_game.getSupportedClients()
|
||||||
940, 944, 953, 954, 960, 961, 963,
|
940, 944, 953, 954, 960, 961, 963,
|
||||||
970, 980, 981, 982, 983, 984, 985,
|
970, 980, 981, 982, 983, 984, 985,
|
||||||
986, 1001, 1002, 1010, 1020, 1021,
|
986, 1001, 1002, 1010, 1020, 1021,
|
||||||
1022, 1031
|
1022, 1031, 1034, 1035
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -376,6 +376,7 @@ namespace Otc
|
||||||
GamePVPMode = 50,
|
GamePVPMode = 50,
|
||||||
GameWritableDate = 51,
|
GameWritableDate = 51,
|
||||||
GameAdditionalVipInfo = 52,
|
GameAdditionalVipInfo = 52,
|
||||||
|
GameBaseSkillU16 = 53,
|
||||||
|
|
||||||
LastGameFeature = 101
|
LastGameFeature = 101
|
||||||
};
|
};
|
||||||
|
|
|
@ -1562,6 +1562,10 @@ void Game::setProtocolVersion(int version)
|
||||||
enableFeature(Otc::GamePVPMode);
|
enableFeature(Otc::GamePVPMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (version >= 1035) {
|
||||||
|
enableFeature(Otc::GameDoubleSkills);
|
||||||
|
enableFeature(Otc::GameBaseSkillU16);
|
||||||
|
}
|
||||||
m_protocolVersion = version;
|
m_protocolVersion = version;
|
||||||
|
|
||||||
Proto::buildMessageModesMap(version);
|
Proto::buildMessageModesMap(version);
|
||||||
|
|
|
@ -139,7 +139,10 @@ void MapView::draw(const Rect& rect)
|
||||||
else
|
else
|
||||||
++it;
|
++it;
|
||||||
|
|
||||||
tile->draw(transformPositionTo2D(tilePos, cameraPosition), scaleFactor, drawFlags, m_lightView.get());
|
if (g_map.isCovered(tilePos, m_cachedFirstVisibleFloor))
|
||||||
|
tile->draw(transformPositionTo2D(tilePos, cameraPosition), scaleFactor, drawFlags);
|
||||||
|
else
|
||||||
|
tile->draw(transformPositionTo2D(tilePos, cameraPosition), scaleFactor, drawFlags, m_lightView.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(drawFlags & Otc::DrawMissiles) {
|
if(drawFlags & Otc::DrawMissiles) {
|
||||||
|
|
|
@ -1125,7 +1125,10 @@ void ProtocolGame::parsePlayerSkills(const InputMessagePtr& msg)
|
||||||
|
|
||||||
int baseLevel;
|
int baseLevel;
|
||||||
if(g_game.getFeature(Otc::GameSkillsBase))
|
if(g_game.getFeature(Otc::GameSkillsBase))
|
||||||
baseLevel = msg->getU8();
|
if (g_game.getFeature(Otc::GameBaseSkillU16))
|
||||||
|
baseLevel = msg->getU16();
|
||||||
|
else
|
||||||
|
baseLevel = msg->getU8();
|
||||||
else
|
else
|
||||||
baseLevel = level;
|
baseLevel = level;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue