From: <wel...@us...> - 2011-04-19 17:15:44
|
Revision: 7159 http://planeshift.svn.sourceforge.net/planeshift/?rev=7159&view=rev Author: weltall2 Date: 2011-04-19 17:15:38 +0000 (Tue, 19 Apr 2011) Log Message: ----------- fixed compilation warnings on the previous patch. patch by triglav Modified Paths: -------------- trunk/src/server/combatmanager.cpp Modified: trunk/src/server/combatmanager.cpp =================================================================== --- trunk/src/server/combatmanager.cpp 2011-04-19 15:53:43 UTC (rev 7158) +++ trunk/src/server/combatmanager.cpp 2011-04-19 17:15:38 UTC (rev 7159) @@ -243,14 +243,12 @@ const Stance & CombatManager::GetLoweredActorStance(CacheManager* cachemanager, gemActor* attacker) { - Stance currentStance; + Stance currentStance = attacker->GetCombatStance(); - currentStance = attacker->GetCombatStance(); - if(currentStance.stance_id == (cachemanager->stances.GetSize()-1)) // The lowest possible stance is already choosen { // Propably nothing to do here - return currentStance; + return cachemanager->stances.Get(currentStance.stance_id); } return cachemanager->stances.Get(currentStance.stance_id+1); @@ -259,14 +257,12 @@ const Stance & CombatManager::GetRaisedActorStance(CacheManager* cachemanager, gemActor* attacker) { - Stance currentStance; + Stance currentStance = attacker->GetCombatStance(); - currentStance = attacker->GetCombatStance(); - if(currentStance.stance_id == 1) // The greatest possible stance is already choosen { // Propably nothing to do here - return currentStance; + return cachemanager->stances.Get(currentStance.stance_id); } return cachemanager->stances.Get(currentStance.stance_id-1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |