Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/components/CCmpMinimap.cpp
/* Copyright (C) 2019 Wildfire Games. | /* Copyright (C) 2021 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 180 Lines • ▼ Show 20 Lines | virtual bool GetRenderData(u8& r, u8& g, u8& b, entity_pos_t& x, entity_pos_t& z) const | ||||
r = m_R; | r = m_R; | ||||
g = m_G; | g = m_G; | ||||
b = m_B; | b = m_B; | ||||
x = m_X; | x = m_X; | ||||
z = m_Z; | z = m_Z; | ||||
return true; | return true; | ||||
} | } | ||||
virtual bool UsesPlayerColor() const | |||||
{ | |||||
return m_UsePlayerColor; | |||||
} | |||||
virtual bool CheckPing(double currentTime, double pingDuration) | virtual bool CheckPing(double currentTime, double pingDuration) | ||||
{ | { | ||||
if (!m_Active || !m_IsPinging) | if (!m_Active || !m_IsPinging) | ||||
return false; | return false; | ||||
// We're currently pinging | // We're currently pinging | ||||
if (m_PingEndTime == 0.0) | if (m_PingEndTime == 0.0) | ||||
m_PingEndTime = currentTime + pingDuration; | m_PingEndTime = currentTime + pingDuration; | ||||
Show All 38 Lines |
Wildfire Games · Phabricator