Change sleep(0) to sleep(0.05) for CraftOS-PC #54

Closed
LDDestroier wants to merge 1 commits from patch-2 into develop-1.8
LDDestroier commented 2021-05-17 20:04:03 -04:00 (Migrated from github.com)

CraftOS-PC handles sleep(0) by not sleeping at all, which makes icon animations go too fast to actually see. Changing this will fix animations in CraftOS-PC, while not changing how it acts in other (more accurate) emulators.

CraftOS-PC handles sleep(0) by not sleeping at all, which makes icon animations go too fast to actually see. Changing this will fix animations in CraftOS-PC, while not changing how it acts in other (more accurate) emulators.
kepler155c commented 2021-05-17 23:21:10 -04:00 (Migrated from github.com)

Would 0.01 work ? Wouldn't want to miss ticks when the tick rate is lower than 20/s.

Would 0.01 work ? Wouldn't want to miss ticks when the tick rate is lower than 20/s.
hugeblank commented 2021-05-18 04:46:32 -04:00 (Migrated from github.com)

Would 0.01 work ?

I think you mean 0.1, right?

> Would 0.01 work ? I think you mean 0.1, right?
LDDestroier commented 2021-05-18 11:37:46 -04:00 (Migrated from github.com)

A single tick is for 0.05 seconds, so changing the number to 0.05 would just give parity between ccemux and craftos-pc, right? Changing it to 0.1 would slow animations to half the speed they currently play at.

A single tick is for 0.05 seconds, so changing the number to 0.05 would just give parity between ccemux and craftos-pc, right? Changing it to 0.1 would slow animations to half the speed they currently play at.
kepler155c commented 2021-05-19 02:51:28 -04:00 (Migrated from github.com)

I don't know if the issue is just with 0 - that's why I suggested .01 - this would not affect animation speed and is > 0

I don't know if the issue is just with 0 - that's why I suggested .01 - this would not affect animation speed and is > 0
LDDestroier commented 2021-05-19 16:50:44 -04:00 (Migrated from github.com)

I should have been more specific -- what I meant to say was that CraftOS-PC is completely untethered by Minecraft ticks, so if you try sleeping for 0.01 seconds, it will actually sleep for 0.01 seconds instead of 0.05, as CCEmuX or CC:Tweaked would.

I should have been more specific -- what I meant to say was that CraftOS-PC is completely untethered by Minecraft ticks, so if you try sleeping for 0.01 seconds, it will actually sleep for 0.01 seconds instead of 0.05, as CCEmuX or CC:Tweaked would.
kepler155c commented 2021-05-26 16:23:59 -04:00 (Migrated from github.com)

There should be ways around this issue for that emulator - not going to change as it could affect animation speed in normal mc

There should be ways around this issue for that emulator - not going to change as it could affect animation speed in normal mc

Pull request closed

Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MayaTheShy/Opus#54