Good afternoon. Found a bug in a standard function. By default, time just changes. There is no check that the current time is more than new. I could add her. I can not add verification for the following case. For example, the time is 23 hours. And I put 9 hours. How to check such cases?
void SetCurrentTime(int hour, int minutes)
{
if(Environment.date.hour > hour)
{
AddDataToCurrent(0,0,1);
}
if(Environment.date.hour == hour && Environment.date.min > minutes)
{
AddDataToCurrent(0,0,1);
}
if(hour < Environment.date.hour)
{
// ???
}
Environment.date.hour = makefloat(hour);
Environment.date.min = makefloat(minutes);
Environment.time = makefloat(hour) + makefloat(minutes)/60.0;
worldMap.date.hour = makefloat(hour);
worldMap.date.min = makefloat(minutes);
DoQuestCheckDelay("restore_gun", 0.2);
}
void SetCurrentTime(int hour, int minutes)
{
if(Environment.date.hour > hour)
{
AddDataToCurrent(0,0,1);
}
if(Environment.date.hour == hour && Environment.date.min > minutes)
{
AddDataToCurrent(0,0,1);
}
if(hour < Environment.date.hour)
{
// ???
}
Environment.date.hour = makefloat(hour);
Environment.date.min = makefloat(minutes);
Environment.time = makefloat(hour) + makefloat(minutes)/60.0;
worldMap.date.hour = makefloat(hour);
worldMap.date.min = makefloat(minutes);
DoQuestCheckDelay("restore_gun", 0.2);
}