Fix isRaceOver in CTF
This commit is contained in:
parent
5104ffe0eb
commit
afe5bc2a16
@ -109,9 +109,14 @@ video::SColor CaptureTheFlag::getColor(unsigned int kart_id) const
|
||||
// ----------------------------------------------------------------------------
|
||||
bool CaptureTheFlag::isRaceOver()
|
||||
{
|
||||
if (NetworkConfig::get()->isServer() &&
|
||||
if (NetworkConfig::get()->isNetworking() &&
|
||||
NetworkConfig::get()->isClient())
|
||||
return false;
|
||||
|
||||
if ((m_count_down_reached_zero && race_manager->hasTimeTarget()) ||
|
||||
(m_red_scores >= race_manager->getHitCaptureLimit() ||
|
||||
m_blue_scores >= race_manager->getHitCaptureLimit()))
|
||||
return true;
|
||||
return FreeForAll::isRaceOver();
|
||||
|
||||
return false;
|
||||
} // isRaceOver
|
||||
|
@ -27,9 +27,10 @@ class NetworkString;
|
||||
|
||||
class FreeForAll : public WorldWithRank
|
||||
{
|
||||
private:
|
||||
protected:
|
||||
bool m_count_down_reached_zero;
|
||||
|
||||
private:
|
||||
std::vector<int> m_scores;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
*/
|
||||
enum MajorRaceModeType
|
||||
{
|
||||
MAJOR_MODE_GRAND_PRIX,
|
||||
MAJOR_MODE_GRAND_PRIX = 0,
|
||||
MAJOR_MODE_SINGLE,
|
||||
MAJOR_MODE_FREE_FOR_ALL,
|
||||
MAJOR_MODE_CAPTURE_THE_FLAG,
|
||||
|
Loading…
x
Reference in New Issue
Block a user