Skip to content

Ensure doDaylightCycle is set to correct value on match start#917

Merged
Electroid merged 3 commits into
PGMDev:devfrom
calcastor:timelock
Sep 9, 2021
Merged

Ensure doDaylightCycle is set to correct value on match start#917
Electroid merged 3 commits into
PGMDev:devfrom
calcastor:timelock

Conversation

@calcastor

Copy link
Copy Markdown
Contributor

#879 ensures that game rules like doDaylightCycle and doFireTick are only enabled once a match starts, if the map has them enabled. However, it seems that the definition of doDaylightCycle from the level.dat files of maps unintentionally takes precedence over the default setting of <timelock> to off, when <timelock> and doDaylightCycle are both undefined within a map's XML. This PR ensures that the default <timelock> setting of off again takes precedence over the map world's setting, while also fixing an overlooked albeit small error that ensures doFireTick is disabled once a match ends.

calcastor and others added 2 commits September 6, 2021 07:54
Signed-off-by: BT (calcastor/mame) <43831917+calcastor@users.noreply.github.com>
Co-authored-by: William Jeffcock <jeffcockw@gmail.com>
Signed-off-by: BT (calcastor/mame) <43831917+calcastor@users.noreply.github.com>
@calcastor calcastor requested a review from Electroid as a code owner September 7, 2021 23:47
@Pablete1234

Copy link
Copy Markdown
Member

Double-check that gamerules module has world module as a dependency, otherwise the world time module may silently just be null

@Electroid

Copy link
Copy Markdown
Member

Double-check that gamerules module has world module as a dependency, otherwise the world time module may silently just be null

Yea, a quick check shows that the dependency is not setup properly.

Signed-off-by: BT (calcastor/mame) <43831917+calcastor@users.noreply.github.com>
@Electroid Electroid merged commit 2972397 into PGMDev:dev Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants