Closed colinsheppard closed 11 years ago
Same for UTMHabitataSpace.m :: shouldFishMoveAt: I changed the following:
if( (daytimeStartTime <= theCurrentTime) && (daytimeEndTime > theCurrentTime)) ... if(daytimeEndTime <= theCurrentTime)
To the following:
if( ([solarManager getDawnHour] <= [timeManager getHourWithTimeT: theCurrentTime])
&& ([solarManager getDuskHour] > [timeManager getHourWithTimeT: theCurrentTime]))
... if([solarManager getDuskHour] <= [timeManager getHourWithTimeT: theCurrentTime])
Steve, the new code will probably flip things from day to night at the begging of the dawn hour, not necessarily at the moment dawn occurs. Is this ok? Otherwise I might have to added a method to SolarManager to give us the actual time_t instead of the hour.
in UTMTroutModelSwarm.m I had to rework the following code to make it draw on SolarManager instead of the original. Make sure we're ending up with the same values.
timeTillDaytimeStarts = modelTime - [timeManager getTimeTWithDate: [timeManager getDateWithTimeT: modelTime] withHour: (int) [SolarManager getSunriseHour] withMinute: (int) [SolarManager getSunriseHour]*60 withSecond: 0];