1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

- catapult attacks should be identical to H3

- catapult may miss and attack another part of wall instead (this is how it works in H3)
- minor fixes
This commit is contained in:
Ivan Savenko
2013-08-06 11:20:28 +00:00
parent 6057226665
commit c81a31c74a
15 changed files with 245 additions and 121 deletions

View File

@ -476,10 +476,9 @@ MusicEntry::~MusicEntry()
{
logGlobal->traceStream()<<"Del-ing music file "<<currentName;
if (music)
{
Mix_FreeMusic(music);
SDL_FreeRW(musicFile);
}
/*if (musicFile) // Mix_FreeMusic will also free file data? Needs checking
SDL_FreeRW(musicFile);*/
}
void MusicEntry::load(std::string musicURI)
@ -488,8 +487,13 @@ void MusicEntry::load(std::string musicURI)
{
logGlobal->traceStream()<<"Del-ing music file "<<currentName;
Mix_FreeMusic(music);
SDL_FreeRW(musicFile);
music = nullptr;
}
/*if (musicFile) // Mix_FreeMusic will also free file data? Needs checking
{
SDL_FreeRW(musicFile);
musicFile = nullptr;
}*/
currentName = musicURI;
@ -502,6 +506,7 @@ void MusicEntry::load(std::string musicURI)
if(!music)
{
SDL_FreeRW(musicFile);
musicFile = nullptr;
logGlobal->warnStream() << "Warning: Cannot open " << currentName << ": " << Mix_GetError();
return;
}