1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Removed unused value from creature config

This commit is contained in:
Ivan Savenko 2023-01-28 13:56:51 +02:00
parent d34efaeb81
commit a853045509
3 changed files with 3 additions and 9 deletions

View File

@ -172,7 +172,7 @@
"animationTime": {
"type":"object",
"additionalProperties" : false,
"required" : [ "attack", "flight", "walk", "idle" ],
"required" : [ "attack", "walk", "idle" ],
"description": "Length of several animations",
"properties":{
"attack": {
@ -183,10 +183,6 @@
"type":"number",
"description": "idle"
},
"flight": {
"type":"number",
"description": "flight"
},
"walk": {
"type":"number",
"description": "walk"

View File

@ -812,7 +812,7 @@ void CCreatureHandler::loadUnitAnimInfo(JsonNode & graphics, CLegacyConfigParser
JsonNode & animationTime = graphics["animationTime"];
animationTime["walk"].Float() = parser.readNumber();
animationTime["attack"].Float() = parser.readNumber();
animationTime["flight"].Float() = parser.readNumber();
parser.readNumber(); // unused value "Flight animation time" - H3 actually uses "Walk animation time" even for flying creatures
animationTime["idle"].Float() = 10.0;
JsonNode & missile = graphics["missile"];
@ -851,7 +851,6 @@ void CCreatureHandler::loadJsonAnimation(CCreature * cre, const JsonNode & graph
cre->animation.walkAnimationTime = animationTime["walk"].Float();
cre->animation.idleAnimationTime = animationTime["idle"].Float();
cre->animation.attackAnimationTime = animationTime["attack"].Float();
cre->animation.missileVelocityFactor = animationTime["missile"].Float();
const JsonNode & missile = graphics["missile"];
const JsonNode & offsets = missile["offset"];

View File

@ -73,7 +73,7 @@ public:
};
double timeBetweenFidgets, idleAnimationTime,
walkAnimationTime, attackAnimationTime, missileVelocityFactor;
walkAnimationTime, attackAnimationTime;
int upperRightMissleOffsetX, rightMissleOffsetX, lowerRightMissleOffsetX,
upperRightMissleOffsetY, rightMissleOffsetY, lowerRightMissleOffsetY;
@ -90,7 +90,6 @@ public:
h & idleAnimationTime;
h & walkAnimationTime;
h & attackAnimationTime;
h & missileVelocityFactor;
h & upperRightMissleOffsetX;
h & rightMissleOffsetX;
h & lowerRightMissleOffsetX;