1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

* attacking and capturing towns

* r-click popups on selected town/hero.bonus and teams in pregame
* disabled music due to bugs in SDL_mixer and smpeg (probably it was the source of reported random crashes / hangups)
* minor fixes
This commit is contained in:
Michał W. Urbańczyk
2009-08-22 13:59:15 +00:00
parent 5256038dc3
commit 66dd31fd8a
22 changed files with 483 additions and 113 deletions

View File

@@ -552,9 +552,26 @@ DLL_EXPORT void SetObjectProperty::applyGs( CGameState *gs )
{
CGObjectInstance *obj = gs->map->objects[id];
if(!obj)
{
tlog1 << "Wrong object ID - property cannot be set!\n";
else
obj->setProperty(what,val);
return;
}
if(what == 1)
{
if(obj->ID == TOWNI_TYPE)
{
CGTownInstance *t = static_cast<CGTownInstance*>(obj);
if(t->tempOwner < PLAYER_LIMIT)
gs->getPlayer(t->tempOwner)->towns -= t;
if(val < PLAYER_LIMIT)
gs->getPlayer(val)->towns.push_back(t);
}
}
obj->setProperty(what,val);
}
DLL_EXPORT void SetHoverName::applyGs( CGameState *gs )