From 6aacc95945c5759caa7b784067af4d8938b9651e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=2E=20Urba=C5=84czyk?= Date: Sun, 3 May 2009 23:43:07 +0000 Subject: [PATCH] Patch from Ubuntux: * Revert a change from rev 826 that breaks compilation under gcc. ( vcmi_fix_linux_no_compile.diff ) --- server/CGameHandler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index 8493e3362..07395c2f6 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -469,7 +469,11 @@ void CGameHandler::prepareAttack(BattleAttack &bat, CStack *att, CStack *def) bat.bsa.clear(); bat.stackAttacking = att->ID; std::set::iterator i = bat.bsa.insert(BattleStackAttacked()).first; - BattleStackAttacked *bsa = &*i; + #ifdef __GNUC__ + BattleStackAttacked *bsa = (BattleStackAttacked *)&*i; + #else + BattleStackAttacked *bsa = &*i; + #endif bsa->stackAttacked = def->ID; bsa->damageAmount = BattleInfo::calculateDmg(att, def, gs->getHero(att->attackerOwned ? gs->curB->hero1 : gs->curB->hero2), gs->getHero(def->attackerOwned ? gs->curB->hero1 : gs->curB->hero2), bat.shot());//counting dealt damage