Random Chitchat 2012-2016
(06-17-2013, 02:13 AM)xoft Wrote: Well you did erase those two functions from the cpp files, no wonder the linker can't find themTongue
Thanks. Didn't noticed I deleted them.

xoft Wrote: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.
Yea I wasn't realy focusing on the documentation Wink

So.. I have it working now but I now need to know where to put the cWorld::BroadcastExperienceOrb function when a entity gets killed.
Thanks given by:
You really need to update the documentation as soon as you touch the functions, otherwise you will forget, believe me, I've been there. It pays to be stringent with self about this.

Similar thing - before committing anything, check the changes you made by comparing each file with the original (dblclick in TortoiseSvn's Commit dlg). I've almost committed so many blunders, this saved my dignity Smile

The exp orbs will be spawned client-side, but the server won't be tracking them, you need to first create an object (a cEntity descendant) to represent the orbs in the server. Then that object's SpawnOn() method should call the SendExperienceOrb() function.
Thanks given by:
How to create an object? Could I use the TNTEntity as an example?
Thanks given by:
I suppose you could.
Thanks given by:
Ok. Now its getting too complicated:
Code:
..\source\Mobs\Monster.cpp(209) : error C2664: 'cWorld::BroadcastExperienceOrb' : cannot convert parameter 1 from 'cExperienceOrb *' to 'const cEntity &'
2>        Reason: cannot convert from 'cExperienceOrb *' to 'const cEntity'
2>        No constructor could take the source type, or constructor overload resolution was ambiguous


Attached Files
.patch   BroadcastExperienceOrb.patch (Size: 14.86 KB / Downloads: 177)
Thanks given by:
Dereference the pointer:
m_World->BroadcastExperienceOrb(*XP, (int)(GetPosX() * 8), (int)(GetPosY() * 8), (int)(GetPosZ() * 8), 2 );

Still, this is no good - you created an XP object and then forgot about it. The server is leaking memory. You need to add the XP object into the world's list of entities, so that the world object will keep track of it and eventually destroy it.

Finally, I got this megacommit off my chest. I've more or less rewritten the entire furnace entity, and it was pain in the ***. Who would've thought furnaces are so complicated?

Note that the furnace.txt file has changed, too, the time units used are different now, so unless you want to spend ages waiting for items to smelt, you need to update yours to the svn version, too. Furnaces now use integral ticks, rather than seconds, to measure time for smelting and burning.
Thanks given by:
I made a post talking about MCServer in the Minecraft forum. FakeTruth's post is outdated so I made a new one: http://www.minecraftforum.net/topic/1852...en-source/
Thanks given by:
I need to rewrite the TNT code. Right now, the cTNTBlockHandler makes the TNT block "usable", so that it can detect a "use" by FlintAndSteel. However, this disallows placing any block by clicking on the side of a TNT block. So instead, I'll make the cItemLighterHandler aware of TNTs, so that using a FlintAndSteel will ignite the TNT, not the TNT block by itself.
Thanks given by:
Minecraft client just decided that I'm not worthy of logging in. It's just stuck on the launcher screen, with "logging in..."
Thanks given by:
(06-19-2013, 04:53 AM)xoft Wrote: Minecraft client just decided that I'm not worthy of logging in. It's just stuck on the launcher screen, with "logging in..."
I also had this error, only with MCServer, hosted in the same computer I have minecraft. Now it works.
Thanks given by:




Users browsing this thread: 16 Guest(s)