time_update
< Newer Topic
:: Older Topic >
Pages:<< prev 1 next >>
#1 Jan 12, 2025 11:17 am
Geomancer
GroupAdministrators
Posts1,994
JoinedJul 26, 2005
If you take a look at time_update in update.c you'll notice they are using the sysdata stuff at the top but not in the switching of the hours inside the function.
#2 Jan 12, 2025 12:53 pm
Black Hand
GroupAdministrators
Posts3,719
JoinedJan 1, 2002
I think that was because of horseshit like this from the compiler:
It didn't like using things such as "sysdata.hourdaybegin" in the switch block, but magically somehow it's ok with using it in a set of if blocks. So it'll be if blocks now
update.c: In function ‘void time_update()’: update.c:2372:21: error: the value of ‘sysdata’ is not usable in a constant expression 2372 | case sysdata.hourdaybegin: | ^~~~~~~
It didn't like using things such as "sysdata.hourdaybegin" in the switch block, but magically somehow it's ok with using it in a set of if blocks. So it'll be if blocks now
#3 Jan 12, 2025 4:11 pm
Geomancer
GroupAdministrators
Posts1,994
JoinedJul 26, 2005
lol dont you love how crazy it acts sometimes.
#4 Jan 12, 2025 9:44 pm
Black Hand
GroupAdministrators
Posts3,719
JoinedJan 1, 2002
Indeed, either way, good catch. I bet that's why we left it like it was at the time that code was added to the base. It's not native Smaug.
#5 Jan 12, 2025 9:53 pm
Geomancer
GroupAdministrators
Posts1,994
JoinedJul 26, 2005
yeah I noticed lol. I only seen it because I spent all day adding it into LOP and then I was looking around to see maybe where it came from found the snippet for it and while reading it I was like blah i don't feel like getting permission so I did a difference of my code and the one i last released and added all the changes not weather related back in lol just finished doing all that.
Pages:<< prev 1 next >>