A heads up
#1
Current trunk compiles fine with zlib updated to 1.2.7.

It should be time to kill
Code:
cServer * cServer::GetServer()
perfectly possible in current trunk.

I commented the function and pointed Bindings.cpp to
Code:
cRoot::Get()->GetServer()
instead, which seems to work fine in my limited testing.

I've been looking for the item metadata, since I wanted to fix upside down steps and stairs. Any hints as to where it's hiding?
Reply
Thanks given by:
#2
Is there any advantage in moving to the newer zlib? If not, why fix something that's not broken? Wink

Did you manually edit Bindings.cpp? You shouldn't - it's an automatically generated file, re-generate it using source/AllToLua.bat. Functions get into that file if the respective C++ function is marked with a "// tolua_export" comment (and is in one of the processed files).

What do you mean by item metadata? WHat exactly is it that you're looking for? An example would really help Smile
As for some block metadata definitions, I've started a section in the BlockID.h header, defining the metadata I needed for trees generation etc. Is that what you need?
Reply
Thanks given by:
#3
I did edit Bindings.cpp by hand, since my shell can't execute the bat file.
I might look into porting it actually.

About the metadata:
Minecraft wiki has information that I believe pertains to this issue.

Specifically, in newer versions some items has another two bits of metadata (I'm not entirely sure though, thus I wanted to inspect the source.)
Reply
Thanks given by:
#4
Items don't have metadata bits, items have damage value (16 bits, afaik). Blocks have metadata, always 4 bits.

MCServer handles some of the metadata information. For example, torches, doors, ladders are handled; you can check that yourself in the client, as the metadata defines those blocks' appearance clientside.
However, MCServer does almost no metadata handling when placing slabs or stairs. If you want to touch that, you need to make yourself comfortable with the cClientHandle::HandleBlockPlace() function, that's the place that it should be implemented at.
Reply
Thanks given by:
#5
Got tolua++ compiled and made a shell script doing the same thing as your batch file.

I've started out by attempting to fix the upside down stairs, since I think I'll be able to reuse the direction code for slabs.
Reply
Thanks given by:
#6
Great news. Welcome to the team Smile
Reply
Thanks given by:
#7
Got stairs working as expected Smile

(Debugged for so long... I had made the error of setting the bit at 0x8 instead of 0x4)


Will post a patch once I fix the steps too.
Reply
Thanks given by:
#8
Good job!

Send PM to FakeTruth to add you to the developers, so that you can directly commit to SVN.
Reply
Thanks given by:
#9
Congratulations on your first commit. And on your first breaking of MCS build on Windows Smile The MSVC project file defines the include path for zlib, too, so it has to be changed. I'll fix that later today, I need to go to work now.
Reply
Thanks given by:
#10
There, fixed.
Hmm, now I see that your Bindings are different than mine, and I found out why. We have a bit hacked ToLua, which treats AString the same as std::string. You might want to hack yours, too.
Unfortunately I can't provide the sources for that hack, because I used hex editor to hack it directly into the executableTongue However, if you manage to do that in some way, perhaps you could share the sources with us, so that we can have a proper dev chain.
Reply
Thanks given by:




Users browsing this thread: 4 Guest(s)