Open James-Burns-Dundee opened 6 years ago
The flagpole didn't award points when touching it. I added the following code to event.cpp in the eENDPOINTS case:
if (CCore::getMap()->getFlag()->bPointsAwarded == false) { CCore::getMap()->getPlayer()->setScore(CCore::getMap()->getPlayer()->getScore() + CCore::getMap()->getFlag()->iPoints); CCore::getMap()->getFlag()->bPointsAwarded = true; }
As well as creating a boolean public variable in flag.h:
bool bPointsAwarded;
Which I defined in the Flag constructor in flag.cpp:
this->bPointsAwarded = false;
The flagpole didn't award points when touching it. I added the following code to event.cpp in the eENDPOINTS case:
if (CCore::getMap()->getFlag()->bPointsAwarded == false) { CCore::getMap()->getPlayer()->setScore(CCore::getMap()->getPlayer()->getScore() + CCore::getMap()->getFlag()->iPoints); CCore::getMap()->getFlag()->bPointsAwarded = true; }
As well as creating a boolean public variable in flag.h:
bool bPointsAwarded;
Which I defined in the Flag constructor in flag.cpp:
this->bPointsAwarded = false;