Random Chitchat 2012-2016
(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.
Thanks given by:
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.
Thanks given by: tonibm19
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 Smile

Of course, Linux doesn't have this, so SendMessageA is an unknown symbol there.
Thanks given by: NiLSPACE
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.*".
Thanks given by:
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 Sad
Thanks given by: NiLSPACE
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);
Thanks given by:
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.
Thanks given by:
I know it is not much of a fix but I thought that for now it looks better then suddenly bedrock.
Thanks given by:
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:
.patch   BroadcastExperienceOrb.patch (Size: 11.73 KB / Downloads: 216)
Thanks given by:
Well you did erase those two functions from the cpp files, no wonder the linker can't find themTongue

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.
Thanks given by:




Users browsing this thread: 16 Guest(s)