Changeset View
Changeset View
Standalone View
Standalone View
source/tools/atlas/GameInterface/Handlers/ObjectHandlers.cpp
/* Copyright (C) 2017 Wildfire Games. | /* Copyright (C) 2018 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | if (cmpOwnership) | ||||
if (colorMap.find(owner) != colorMap.end()) | if (colorMap.find(owner) != colorMap.end()) | ||||
return colorMap[owner]; | return colorMap[owner]; | ||||
else | else | ||||
{ | { | ||||
CmpPtr<ICmpPlayerManager> cmpPlayerManager(sim, SYSTEM_ENTITY); | CmpPtr<ICmpPlayerManager> cmpPlayerManager(sim, SYSTEM_ENTITY); | ||||
entity_id_t playerEnt = cmpPlayerManager->GetPlayerByID(owner); | entity_id_t playerEnt = cmpPlayerManager->GetPlayerByID(owner); | ||||
CmpPtr<ICmpPlayer> cmpPlayer(sim, playerEnt); | CmpPtr<ICmpPlayer> cmpPlayer(sim, playerEnt); | ||||
if (cmpPlayer) | if (cmpPlayer) | ||||
color = colorMap[owner] = cmpPlayer->GetColor(); | { | ||||
colorMap[owner] = cmpPlayer->GetDisplayedColor(); | |||||
color = colorMap[owner]; | |||||
} | |||||
temple: separate lines here too | |||||
} | } | ||||
} | } | ||||
return color; | return color; | ||||
} | } | ||||
MESSAGEHANDLER(SetSelectionPreview) | MESSAGEHANDLER(SetSelectionPreview) | ||||
{ | { | ||||
CSimulation2& sim = *g_Game->GetSimulation2(); | CSimulation2& sim = *g_Game->GetSimulation2(); | ||||
▲ Show 20 Lines • Show All 962 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
separate lines here too