cannot eat food
#11
I now believe I know the cause of this. On Windows, the clock() function returns some kind of a measure of real time elapsed, which is what we want. But on Linux, it returns the CPU time elapsed, which counts each thread's time separately (so you can have 2 seconds when the program is running 2 threads for 1 second each) and doesn't include the time spent in syscalls (so it can report 0.01 seconds if all the threads are sleeping in a syscall for a minute).
This is probably the cause of both the eating issues and the pickup collection issues, because they both rely on world age, instead of number of ticks; and world age depends on the clock() function. I'll try fixing it now.
Reply
Thanks given by:
#12
(08-20-2013, 05:52 AM)STR_Warrior Wrote: hmm, Realy weird. It works normal for me. Maybe it is an Fedora/Linux only thing. Does anyone else have the same problem?

Same problem with Ubuntu 11 64-bit, both when connecting to Fedora Server, and when connecting to a server compiled same way on Ubuntu.

I got the source last night used to build both.

I'll try the smelting next.
Reply
Thanks given by:
#13
Please try the newest sources (commit fdbe835131059579b429cbcc3cd4d06c3bed512e or newer), they should be fixed.
Reply
Thanks given by:
#14
(08-20-2013, 06:00 AM)xoft Wrote: An idea here. Can you test if smelting things in a furnace works? If the fuel gives the proper length of smelting, and items take the proper amount of time to smelt? I have a hunch about the cause of all this.

Smelting gold seems to work fine, and about the time you expect it to. Produced 20 Gold Ingots using 3 coals so far.
Reply
Thanks given by:
#15
That sounds about right, and supports the hypothesis - the ticks come in correct amounts, but bad delta-time value. I think my fix should work for you, give it a try.
Reply
Thanks given by:
#16
(08-20-2013, 06:26 AM)xoft Wrote: Please try the newest sources (commit fdbe835131059579b429cbcc3cd4d06c3bed512e or newer), they should be fixed.

That fixed it! I can eat food and pick-up items without waiting 10 seconds.

BTW, that's an ugly commit #. I'm used to SVN. As you can imagine, "git checkout" didn't work as planned. lol

There are other "less critical" issues. I'll post them in new threads to keep the forum organized.
Reply
Thanks given by:
#17
Please have a look at the issue tracker at GitHub and FlySpray to avoid posting issues we already know about.
GitHub: https://github.com/mc-server/MCServer/is...state=open
FlySpray: http://www.mc-server.org/support/index.p...sort2=desc

Yeah, the mindset change from svn to git is a difficult one, I'm on the same path and still wrapping my head around it after a year of using it dailyTongue
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)