Add a flag for idle animation game feature.

master
Nailson 9 years ago
parent ae25dbf6a5
commit f1fdbd56e9

@ -131,6 +131,7 @@ GameAuthenticator = 67
GameUnjustifiedPoints = 68
GameSessionKey = 69
GameDeathType = 70
GameIdleAnimations = 71
TextColors = {
red = '#f55e5e', --'#c83200'

@ -403,6 +403,7 @@ namespace Otc
GameUnjustifiedPoints = 68,
GameSessionKey = 69,
GameDeathType = 70,
GameIdleAnimations = 71,
LastGameFeature = 101
};

@ -1600,6 +1600,10 @@ void Game::setClientVersion(int version)
enableFeature(Otc::GameDeathType);
}
if(version >= 1057) {
enableFeature(Otc::GameIdleAnimations);
}
if(version >= 1061) {
enableFeature(Otc::GameOGLInformation);
}

@ -268,15 +268,13 @@ void ThingType::unserialize(uint16 clientId, ThingCategory category, const FileS
stdext::throw_exception(stdext::format("corrupt data (id: %d, category: %d, count: %d, lastAttr: %d)",
m_id, m_category, count, attr));
uint8 groupCount = 1;
if(category == ThingCategoryCreature && g_game.getClientVersion() >= 1057)
groupCount = fin->getU8();
bool hasFrameGroups = (category == ThingCategoryCreature && g_game.getFeature(Otc::GameIdleAnimations));
uint8 groupCount = hasFrameGroups ? fin->getU8() : 1;
for(int i = 0; i < groupCount; ++i) {
uint8 frameGroup = FrameGroupDefault;
if(category == ThingCategoryCreature && g_game.getClientVersion() >= 1057) {
frameGroup = fin->getU8();
}
uint8 frameGroupType = FrameGroupDefault;
if(hasFrameGroups)
frameGroupType = fin->getU8();
uint8 width = fin->getU8();
uint8 height = fin->getU8();

@ -33,10 +33,10 @@
#include <framework/luaengine/luaobject.h>
#include <framework/net/server.h>
enum FrameGroup : uint8 {
FrameGroupIdle = 0,
FrameGroupMoving,
FrameGroupDefault = FrameGroupIdle
enum FrameGroupType : uint8 {
FrameGroupDefault = 0,
FrameGroupIdle = FrameGroupDefault,
FrameGroupMoving
};
enum ThingCategory : uint8 {

Loading…
Cancel
Save