Hi Leute,
diese Funktion löst bei mir beim Shutdownen oder Cores killen einen coredowner aus. Leider finde ich den Fehler nicht.. vielleicht zu müde? kann sich das jemand anschauen?
Code
- void CBattleZone::Update()
- {
- time_t iTime;
- time(&iTime);
- tm* pTimeInfo = localtime(&iTime);
- for (DWORD i = 0; i < sizeof(openTimeInfo) / sizeof(openTimeInfo[0]); i++)
- {
- if (openTimeInfo[i].bDay == pTimeInfo->tm_wday)
- {
- if (openTimeInfo[i].bOpenHour == pTimeInfo->tm_hour && openTimeInfo[i].bOpenMinute == pTimeInfo->tm_min && GetEnterStatus() == false)
- {
- bool isEvent = (GetEventMonth() == pTimeInfo->tm_mon && GetEventMonth() < 12 && GetEventDay() == pTimeInfo->tm_mday && GetEventDay() < 32) ? true : false;
- OpenEnter(isEvent);
- break;
- }
- else if (openTimeInfo[i].bCloseHour == pTimeInfo->tm_hour && openTimeInfo[i].bCloseMinute == pTimeInfo->tm_min && GetEnterStatus() == true)
- {
- CloseEnter();
- break;
- }
- }
- if (openTimeInfo[i].bDay == pTimeInfo->tm_wday && !s_pkNoticeEvent)
- {
- int tempHour = GetEnterStatus() == false ? openTimeInfo[i].bOpenHour : openTimeInfo[i].bCloseHour;
- int tempMinute = GetEnterStatus() == false ? openTimeInfo[i].bOpenMinute : openTimeInfo[i].bCloseMinute;
- int hourP = tempMinute < 15 ? tempHour - 1 : tempHour;
- int minuteP = tempMinute < 15 ? 60 + tempMinute - 15 : tempMinute - 15;
- if (pTimeInfo->tm_hour == hourP && pTimeInfo->tm_min == minuteP)
- {
- notice_event_data* info = AllocEventInfo<notice_event_data>();
- info->seconds = 15 * 60;
- info->isClose = GetEnterStatus();
- s_pkNoticeEvent = event_create(notice_event, info, 1);
- break;
- }
- }
- }
- }
Hier ist der Part in der main.cpp
Danke vielmals