forked from mirror/OpenTTD
Fix #12973: Don't exclude high score after using sandbox
This commit is contained in:
@@ -20,20 +20,3 @@ void InitializeCheats()
|
||||
{
|
||||
memset(&_cheats, 0, sizeof(Cheats));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if any cheat has been used, false otherwise
|
||||
* @return has a cheat been used?
|
||||
*/
|
||||
bool CheatHasBeenUsed()
|
||||
{
|
||||
/* Cannot use lengthof because _cheats is of type Cheats, not Cheat */
|
||||
const Cheat *cht = (Cheat*)&_cheats;
|
||||
const Cheat *cht_last = &cht[sizeof(_cheats) / sizeof(Cheat)];
|
||||
|
||||
for (; cht != cht_last; cht++) {
|
||||
if (cht->been_used) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user