MCServer Development Discussion
#61
cClientHandle:
I added an if on line 644, it seems to create some issues, sometimes you can't place blocks, it turns out that packet contains wrong position! (negative rounding error) D:
Reply
Thanks given by:
#62
Where's the error at? UI don't see any sort of rounding in cPacket_BlockPlace. It just reads the packet and puts the information it into a variable as far as I can tell.

Is it in AbsoluteToRelative in cWorld.h?
Reply
Thanks given by:
#63
(11-08-2011, 05:55 AM)rs2k Wrote: Where's the error at? UI don't see any sort of rounding in cPacket_BlockPlace. It just reads the packet and puts the information it into a variable as far as I can tell.

I also was looking for rounding but it's just not there (could it be client bug? *notch coding*)
Put at case E_BLOCK_PLACE in cClientHandle, after cPacket_BlockPlace* PacketData = reinterpret_cast<cPacket_BlockPlace*>(a_Packet);
Code:
printf(" Placed block at %d, %d, %d\n", PacketData->m_PosX, PacketData->m_PosY, PacketData->m_PosZ);
And compare the coords with coords in-game.
Reply
Thanks given by:
#64
Hmm, that's odd. Certainly the wrong info, I wonder how the block is actually making it to the right place.

Edit:
Actually, I think that info is correct. When you floor a negative number its absolute value rises.
Reply
Thanks given by:
#65
Ahh, my bad, those coords are for the block that is being clicked, not where new one should be placed :V
I just wonder why would it work when I was testing it.
DIFF
Reply
Thanks given by:
#66
Code:
if ( (int)m_World->GetBlock( fillx, filly, fillz ) == E_BLOCK_REDSTONE_TORCH_OFF ) { //I don't think notch knows on from off. >.>
You've got E_BLOCK_REDSTONE_TORCH_OFF set to 76 which is torch onTongue
Reply
Thanks given by:
#67
Fixed.Big Grin

You can now also place colored wool.Big Grin

And when a redstone device is broken by a piston or the ground under it gives way, the redstone circuit will now recalculate.
Reply
Thanks given by:
#68
I am working on pickup physics in water and water-with-lava interaction. I will do some other stuff (block placement rules) but I will have my internet cut off today so I won't be able to commit for maybe week or two.
Reply
Thanks given by:
#69
D: No internet for more than a few hours? I'd die!

Good luck and see you in a few weeks.
Reply
Thanks given by:
#70
(11-10-2011, 10:07 AM)rs2k Wrote: D: No internet for more than a few hours? I'd die!

Internet at school keeps me alive. Wink
Reply
Thanks given by:




Users browsing this thread: 3 Guest(s)