1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

- Fixed crash on creature window drawn for neutral faction

- Fixed sound parsing. Check forum for updated mod.

It is now possible to attack & fight new creatures without crash.
This commit is contained in:
DjWarmonger
2012-09-21 07:22:23 +00:00
parent 99dcb73a72
commit 16adfa3aa7
2 changed files with 8 additions and 4 deletions

View File

@ -241,7 +241,7 @@ CCreature * CModHandler::loadCreature (const JsonNode &node)
const JsonNode & sounds = node["sound"];
#define GET_SOUND_VALUE(value_name) do { value = &node[#value_name]; if (!value->isNull()) cre->sounds.value_name = sounds[#value_name].String(); } while(0)
#define GET_SOUND_VALUE(value_name) do { value = &sounds[#value_name]; if (!value->isNull()) cre->sounds.value_name = value->String(); } while(0)
GET_SOUND_VALUE(attack);
GET_SOUND_VALUE(defend);
GET_SOUND_VALUE(killed);