Posts: 1,162
Threads: 68
Joined: Mar 2013
Thanks: 245
Given 125 thank(s) in 100 post(s)
(06-16-2013, 03:43 AM)STR_Warrior Wrote: (06-16-2013, 03:36 AM)tonibm19 Wrote: Latest rev compilation fails in linux http://ci.berboe.co.uk/job/MCServer%20Linux-x86-64/524/
It compiles fine for me. Are you in linux? Maybe is an error of Bearbin's server.
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
06-16-2013, 04:08 AM
(This post was last modified: 06-16-2013, 04:26 AM by NiLSPACE.)
No i'm on Windows, but the change is so small I don't think it should break the compilation for linux.
Should be fixed in r1595.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1075 thank(s) in 852 post(s)
06-16-2013, 06:04 AM
(This post was last modified: 06-16-2013, 06:07 AM by xoft.)
The problem with SendMessage is based in Windows.
Windows traditionally has two sets of APIs, Unicode and Ansi. Functions that handle text in any way therefore have two variants, -W suffix for Unicode and -A suffix for Ansi. So there's a GetWindowTextW() and a GetWindowTextA() function; both return the text of the window, one returns a Unicode string, the other returns an Ansi string.
To make using them easier, the application sets a setting in the project and it causes the windows SDK to define a function name to either to those functions. Basically it does this:
#ifdef UNICODE
#define GetWindowText GetWindowTextW
#else
#define GetWindowText GetWindowTextA
#endif
Unfortunately, SendMessage is a Windows API function that has this same behavior, therefore the Windows SDK does
#define SendMessage SendMessageA
for MCServer (since we're an Ansi app). Unfortunately this also fools the MSVC IntelliSense to offer SendMessageA, instead of SendMessage. You just need to remember this
Of course, Linux doesn't have this, so SendMessageA is an unknown symbol there.
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
Is there a way to bind commands with multiple permissions? For example I want the //set command in my worldedit plugin to have the permission "worldedit.region.set" but "also worldedit.*".
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1075 thank(s) in 852 post(s)
06-16-2013, 07:00 PM
(This post was last modified: 06-16-2013, 07:05 PM by xoft.)
Wildcards are used in the permissions matcher by default, so if someone has a "worldedit.*" permission, they already have the "worldedit.region.set" permission.
Otherwise, there's no way to specify two distinct permissions for a command, only one permission string is matched.
I think we've gone too far with the permissions - there's usually no need to subdivide them as far as we do. I don't think admins need that much of power. Either someone has the complete worldedit permission, or they don't.
I wanted to add at least deadlock detection to the code, so that if MCS becomes deadlocked, it could at least print a message about it, or even restart. Turns out we can't do that easily, the OS primitives used for synchronization don't support "Acquire with timeout" semantics. We could use other OS primitives that do support the timeout, but they have performance penalties that are unacceptable
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
So i tried some multiple worlds and I've noticed that when you use /gotoworld you don't get the moving to "world" message like this: http://media.pcgamer.com/files/2010/12/M...90x339.jpg . I have an easy fix for it: add HandleRespawn before the StreamChunks in the MoveToWorld function.
Also I have an easy fix for the bedrock in the Nether.
a_ChunkDesc.SetBlockType(x, 0, z, E_BLOCK_BEDROCK);
a_ChunkDesc.SetBlockType(x, 1, z, E_BLOCK_NETHERRACK);
a_ChunkDesc.SetBlockType(x, a_ChunkDesc.GetHeight(x, z), z, E_BLOCK_BEDROCK);
a_ChunkDesc.SetBlockType(x, a_ChunkDesc.GetHeight(x, z) - 1, z, E_BLOCK_NETHERRACK);
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1075 thank(s) in 852 post(s)
The respawn fix is alright, commit that one.
As for the bedrock fix, that's not much of a fix - there's still a flat ceiling in at the top, simply covering one more layer is not much help. There's a much better fix for that - adjust the composition to add the height to the noise value, so that the further away from the center Y, the less holes it generates.
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
I know it is not much of a fix but I thought that for now it looks better then suddenly bedrock.
Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
While I was messing around in the protocol I thought: I'd like to try to spawn experience orbs. So i started but I now have these errors: Code: 2>World.obj : error LNK2019: unresolved external symbol "public: void __thiscall cChunkMap::BroadcastEntRelMoveLook(class cEntity const &,char,char,char,class cClientHandle const *)" (?BroadcastEntRelMoveLook@cChunkMap@@QAEXABVcEntity@@DDDPBVcClientHandle@@@Z) referenced in function "public: void __thiscall cWorld::BroadcastEntRelMoveLook(class cEntity const &,char,char,char,class cClientHandle const *)" (?BroadcastEntRelMoveLook@cWorld@@QAEXABVcEntity@@DDDPBVcClientHandle@@@Z)
2>Entity.obj : error LNK2019: unresolved external symbol "public: void __thiscall cWorld::BroadcastEntRelMove(class cEntity const &,char,char,char,class cClientHandle const *)" (?BroadcastEntRelMove@cWorld@@QAEXABVcEntity@@DDDPBVcClientHandle@@@Z) referenced in function "public: virtual void __thiscall cEntity::BroadcastMovementUpdate(class cClientHandle const *)" (?BroadcastMovementUpdate@cEntity@@UAEXPBVcClientHandle@@@Z)
Patch file:
BroadcastExperienceOrb.patch (Size: 11.73 KB / Downloads: 224)
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1075 thank(s) in 852 post(s)
06-17-2013, 02:13 AM
(This post was last modified: 06-17-2013, 02:14 AM by xoft.)
Well you did erase those two functions from the cpp files, no wonder the linker can't find them
Also, you pasted the function declaration in the header file right under a different function's doxycomment header, you need to update the doxycomment as well
(doxycomments are the ones starting with triple slash, "///", and they're used by doxygen to generate the documentation, as well as VisualStudio to give you tooltip hints on the functions.
|