Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "PreRTS.h" // This must go first in EVERY cpp file int the GameEngine

#include "Common/GameAudio.h"
#include "Common/GameUtility.h"
#include "Common/GlobalData.h"
#include "Common/INI.h"
#include "Common/Player.h"
Expand Down Expand Up @@ -550,7 +551,8 @@ void SpecialPowerModule::aboutToDoSpecialPower( const Coord3D *location )
// Let EVA do her thing
SpecialPowerType type = getSpecialPowerModuleData()->m_specialPowerTemplate->getSpecialPowerType();

Player *localPlayer = ThePlayerList->getLocalPlayer();
Player *localPlayer = rts::getObservedOrLocalPlayer();
Relationship relationship = localPlayer->getRelationship(getObject()->getTeam());

// Only play the EVA sounds if this is not the local player, and the local player doesn't consider the
// person an enemy.
Expand All @@ -564,7 +566,7 @@ void SpecialPowerModule::aboutToDoSpecialPower( const Coord3D *location )
{
TheEva->setShouldPlay(EVA_SuperweaponLaunched_Own_ParticleCannon);
}
else if ( localPlayer->getRelationship(getObject()->getTeam()) != ENEMIES )
else if (relationship != ENEMIES)
{
// Note: counting relationship NEUTRAL as ally. Not sure if this makes a difference???
TheEva->setShouldPlay(EVA_SuperweaponLaunched_Ally_ParticleCannon);
Expand All @@ -580,7 +582,7 @@ void SpecialPowerModule::aboutToDoSpecialPower( const Coord3D *location )
{
TheEva->setShouldPlay(EVA_SuperweaponLaunched_Own_Nuke);
}
else if ( localPlayer->getRelationship(getObject()->getTeam()) != ENEMIES )
else if (relationship != ENEMIES)
{
// Note: counting relationship NEUTRAL as ally. Not sure if this makes a difference???
TheEva->setShouldPlay(EVA_SuperweaponLaunched_Ally_Nuke);
Expand All @@ -596,7 +598,7 @@ void SpecialPowerModule::aboutToDoSpecialPower( const Coord3D *location )
{
TheEva->setShouldPlay(EVA_SuperweaponLaunched_Own_ScudStorm);
}
else if ( localPlayer->getRelationship(getObject()->getTeam()) != ENEMIES )
else if (relationship != ENEMIES)
{
// Note: counting relationship NEUTRAL as ally. Not sure if this makes a difference???
TheEva->setShouldPlay(EVA_SuperweaponLaunched_Ally_ScudStorm);
Expand All @@ -614,7 +616,7 @@ void SpecialPowerModule::aboutToDoSpecialPower( const Coord3D *location )
{
TheEva->setShouldPlay(EVA_SuperweaponLaunched_Own_GPS_Scrambler);
}
else if ( localPlayer->getRelationship(getObject()->getTeam()) != ENEMIES )
else if (relationship != ENEMIES)
{
// Note: counting relationship NEUTRAL as ally. Not sure if this makes a difference???
TheEva->setShouldPlay(EVA_SuperweaponLaunched_Ally_GPS_Scrambler);
Expand All @@ -630,7 +632,7 @@ void SpecialPowerModule::aboutToDoSpecialPower( const Coord3D *location )
{
TheEva->setShouldPlay(EVA_SuperweaponLaunched_Own_Sneak_Attack);
}
else if ( localPlayer->getRelationship(getObject()->getTeam()) != ENEMIES )
else if (relationship != ENEMIES)
{
// Note: counting relationship NEUTRAL as ally. Not sure if this makes a difference???
TheEva->setShouldPlay(EVA_SuperweaponLaunched_Ally_Sneak_Attack);
Expand Down
Loading