| 975 | } |
| 976 | |
| 977 | void KartChecker::calcRabbitTime() |
| 978 | { |
| 979 | GeoRabbitMarkSupervisor *supervisor = GeoRabbitMark::getSupervisor(); |
| 980 | if (supervisor == nullptr) |
| 981 | return; |
| 982 | if (mRabbitWinFrame > 0) |
| 983 | { |
| 984 | if (mTargetKartNo == supervisor->getRabbitKartNo()) |
| 985 | { |
| 986 | if (!tstStillRabbitTimer()) |
| 987 | { |
| 988 | mRabbitWinFrame--; |
| 989 | RaceTime rabbitTime; |
| 990 | rabbitTime.setFrame(mRabbitWinFrame); |
| 991 | int ms = rabbitTime.getUpwardMSec() / 1000; |
| 992 | if (!(rabbitTime.get() % 1000)) |
| 993 | { |
| 994 | if (ms == 0) |
| 995 | GetGameAudioMain()->startSystemSe(0x20027); |
| 996 | else if (ms <= 10) |
| 997 | { |
| 998 | GetGameAudioMain()->startSystemSe(0x20026); |
| 999 | } |
| 1000 | else if ((ms > 10) && ms <= GeoRabbitMark::getSupervisor()->getWinTime() - 2) |
| 1001 | { |
| 1002 | GetGameAudioMain()->startSystemSe(0x20025); |
| 1003 | } |
| 1004 | } |
| 1005 | } |
| 1006 | } |
| 1007 | else |
| 1008 | { |
| 1009 | mRabbitWinFrame = GeoRabbitMark::getSupervisor()->getWinFrame(); |
| 1010 | resumeRabbitTimer(); |
| 1011 | } |
| 1012 | } |
| 1013 | else |
| 1014 | { |
| 1015 | supervisor->startWinnerEffect(); |
| 1016 | } |
| 1017 | } |
| 1018 | |
| 1019 | LapChecker::LapChecker() |
| 1020 | { |
nothing calls this directly
no test coverage detected