mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix date lagging behind 1 turn
This commit is contained in:
parent
9dd25e933e
commit
97c65cfefa
@ -187,7 +187,7 @@ class Game:
|
|||||||
def generate_conditions(self, forced_time: time | None = None) -> Conditions:
|
def generate_conditions(self, forced_time: time | None = None) -> Conditions:
|
||||||
return Conditions.generate(
|
return Conditions.generate(
|
||||||
self.theater,
|
self.theater,
|
||||||
self.current_day,
|
self.conditions.start_time.date(),
|
||||||
self.current_turn_time_of_day,
|
self.current_turn_time_of_day,
|
||||||
self.settings,
|
self.settings,
|
||||||
forced_time=forced_time,
|
forced_time=forced_time,
|
||||||
|
|||||||
@ -91,6 +91,8 @@ class Conditions:
|
|||||||
day += datetime.timedelta(days=1.0)
|
day += datetime.timedelta(days=1.0)
|
||||||
hours %= 24
|
hours %= 24
|
||||||
else:
|
else:
|
||||||
|
if start == 0:
|
||||||
|
day += datetime.timedelta(days=1.0)
|
||||||
hours = random.randint(start, end)
|
hours = random.randint(start, end)
|
||||||
return day, hours
|
return day, hours
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user