Random Chitchat 2012-2016
Ah, that's just a "logging malfunction" - the log message is produced in the constructor. You can safely ignore that and I'll fix that somehow, later.

I like the patch now, just cosmetics remain: the #include-s for crypto can be left out. And the "login packet" that you're getting is probably just a leftover from some other packet (could be 0xfe - server list ping); in any case the constant for it needn't be defined ('cause you're not sending it).

Oh, and in cProtocolRecognizer, I've introduced names for the "magic number constants" - protocol versions. If you used that instead of "47", that'd be nice.

Now that you have all my criticism, you can commit the changes Smile
Dinner's over, that concludes my today's involvement with MCS
Thanks given by:
Commited my changes as r1019. Smile

EDIT: Pickups fixed in r1020.
Thanks given by:
I'm cleaning up the time-related code. It has accumulated a lot of WTFs, so it needs refactoring. There are six variables that hold a world age / time (!?). That needs to go, or at least get properly documented.
With this change, we'll be able to properly send the world age / time of day to the new clients
Done in rev 1022.

Now we have two "times" for a world: The WorldAge and the TimeOfDay. The WorldAge is managed entirely by MCServer and is only incremented; no plugin is allowed to touch it. The TimeOfDay is manipulatable by plugins, and it wraps around each day.

The weird thing is, we need to accumulate sub-tick precision in the cWorld::Tick() function, so each of the times is actually stored in two forms: fractional seconds and integral ticks. The fractional seconds are primary, each tick they are incremented by the true amount of time passed, and then the tick values are calculated off of them (so that later the integral tick values can be used for performance reasons).

This also meant changing the Lua interface. I tried doing it the safest way - old functions will either map to new functions or return constants. Each obsolete function will emit a warning on the console with the instructions on how to fix it. So for example cWorld:GetTime() is obsoleted, always returns zero and says it should be replaced by cWorld:GetWorldAge() or cWorld:GetTimeOfDay().

I hope I didn't break too many things Smile The one thing that broke was Core's /time command, I fixed that.
Thanks given by:
is there a way to turn off the fire simulator?
i found another bug. first its usefull (but cheating) after that the client crashes.
Thanks given by:
Oh wow WTF! That's very surprising
Thanks given by:
I can confirm that this bug exist, and it does crash clients. "It was all fun and games until someone had memory outrun" Smile
Thanks given by:
When you move your cursor from one block to another while holding your left mouse button the clients sends a "Player Digging" packet with status "2" - that means the digging is finished (at least in 1.3). There were probably some changes in 1.4.2. No updated documentation on wiki.vg yet.
Thanks given by:
I fixed the bug! I don't think my solution is the most optimal so I'll show you the patch first.
https://dl.dropbox.com/u/21041937/Bugfix.patch
Thanks given by:
I think the patch is alright; I only have an issue with the condition - could you put some extra parenthesis in there, so that it's immediately clear what compares to what?
I really hate stuff like "if (A || B && C)" - does it first do the || or the &&? And why should I have to think about it? "if ((A || B) && C)" is so much clearer. Smile
Also, a comment about why the condition is so complicated would be welcome.
Thanks given by:
OK. Bug fixed in r1038. Wink
Thanks given by:




Users browsing this thread: 14 Guest(s)