MCServer Development Discussion
#42
(10-24-2011, 09:29 AM)FakeTruth Wrote: - Moved this thread to a more suitable forum -

nice










Watching these kids talk on the server thinking it's a bukkit server is hilarious.

The health message is definitely causing crashes. I can't see what's causing it though.

The the message "Entity was not in chunk..." comes up there's also a bit of lag the the server stops responding.





I found this in cClientHandle.cpp

Code:
        case E_BLOCK_DIG:
            {
                cPacket_BlockDig* PacketData = reinterpret_cast<cPacket_BlockDig*>(a_Packet);
                //LOG("OnBlockDig: %i %i %i Dir: %i Stat: %i", PacketData->m_PosX, PacketData->m_PosY, PacketData->m_PosZ, PacketData->m_Direction, PacketData->m_Status );
                if( PacketData->m_Status == 0x04 )    // Drop block
                {
                    m_Player->TossItem( false );
                }
                else
                {
                    cWorld* World = cRoot::Get()->GetWorld();
                    char OldBlock = World->GetBlock(PacketData->m_PosX, PacketData->m_PosY, PacketData->m_PosZ);
                    char MetaData = World->GetBlockMeta(PacketData->m_PosX, PacketData->m_PosY, PacketData->m_PosZ);
                    bool bBroken = (PacketData->m_Status == 0x02) || g_BlockOneHitDig[(int)OldBlock];

                    cItem PickupItem;
                    if( bBroken ) // broken
                    {
                        ENUM_ITEM_ID PickupID = cBlockToPickup::ToPickup( (ENUM_BLOCK_ID)OldBlock, m_Player->GetInventory().GetEquippedItem().m_ItemID );
                        PickupItem.m_ItemID = PickupID;
                        PickupItem.m_ItemHealth = MetaData;
                        PickupItem.m_ItemCount = 1;
                    }
                    if(!cRoot::Get()->GetPluginManager()->CallHook( cPluginManager::E_PLUGIN_BLOCK_DIG, 2, PacketData, m_Player, &PickupItem ) )
                    {
                        if( bBroken ) // Block broken
                        {
                            if( cRoot::Get()->GetWorld()->DigBlock( PacketData->m_PosX, PacketData->m_PosY, PacketData->m_PosZ, PickupItem ) )
                            {
                                m_Player->GetInventory().GetEquippedItem().m_ItemHealth ++;
                                LOG("Health: %i", m_Player->GetInventory().GetEquippedItem().m_ItemHealth);
                            }
                        }
                    }
                    else
                    {
                        cRoot::Get()->GetWorld()->SendBlockTo( PacketData->m_PosX, PacketData->m_PosY, PacketData->m_PosZ, m_Player );
                    }
                }
            }
            break;



I *think* that's cause by using a client nuke with a tool in hand.
Reply
Thanks given by:


Messages In This Thread
MCServer Development Discussion - by rs2k - 10-21-2011, 11:24 AM
RE: MCServer Development Discussion - by rs2k - 10-24-2011, 09:34 AM
RE: MCServer Development Discussion - by rs2k - 10-24-2011, 09:50 AM
RE: MCServer Development Discussion - by Sebi - 11-06-2011, 05:28 AM
RE: MCServer Development Discussion - by rs2k - 11-06-2011, 05:38 AM
RE: MCServer Development Discussion - by Sebi - 11-06-2011, 06:45 AM
RE: MCServer Development Discussion - by Sebi - 11-06-2011, 08:12 AM
RE: MCServer Development Discussion - by rs2k - 11-06-2011, 08:18 AM
RE: MCServer Development Discussion - by Sebi - 11-06-2011, 12:34 PM
RE: MCServer Development Discussion - by rs2k - 11-06-2011, 07:27 PM
RE: MCServer Development Discussion - by Sebi - 11-07-2011, 11:32 PM
RE: MCServer Development Discussion - by rs2k - 11-08-2011, 03:27 AM
RE: MCServer Development Discussion - by Sebi - 11-08-2011, 04:51 AM
RE: MCServer Development Discussion - by rs2k - 11-08-2011, 05:17 AM
RE: MCServer Development Discussion - by Sebi - 11-08-2011, 05:29 AM
RE: MCServer Development Discussion - by rs2k - 11-08-2011, 05:55 AM
RE: MCServer Development Discussion - by Sebi - 11-08-2011, 06:03 AM
RE: MCServer Development Discussion - by rs2k - 11-08-2011, 06:09 AM
RE: MCServer Development Discussion - by Sebi - 11-08-2011, 06:40 AM
RE: MCServer Development Discussion - by Sebi - 11-08-2011, 08:09 AM
RE: MCServer Development Discussion - by rs2k - 11-08-2011, 09:03 AM
RE: MCServer Development Discussion - by Sebi - 11-10-2011, 06:12 AM
RE: MCServer Development Discussion - by rs2k - 11-10-2011, 10:07 AM
RE: MCServer Development Discussion - by Sebi - 11-10-2011, 10:55 PM
RE: MCServer Development Discussion - by rs2k - 11-11-2011, 02:33 AM
RE: MCServer Development Discussion - by rs2k - 11-11-2011, 10:23 AM
RE: MCServer Development Discussion - by Boo - 02-05-2012, 02:31 AM
RE: MCServer Development Discussion - by tbar - 02-05-2012, 04:08 AM
RE: MCServer Development Discussion - by Boo - 02-05-2012, 04:39 PM
RE: MCServer Development Discussion - by rs2k - 02-05-2012, 05:41 PM
RE: MCServer Development Discussion - by Boo - 02-05-2012, 09:19 PM
RE: MCServer Development Discussion - by Boo - 02-05-2012, 11:21 PM
RE: MCServer Development Discussion - by tbar - 02-06-2012, 04:21 AM
RE: MCServer Development Discussion - by xoft - 02-06-2012, 01:42 AM
RE: MCServer is open source! - by AJIeKCaHDp - 10-21-2011, 08:04 PM
RE: MCServer is open source! - by rs2k - 10-21-2011, 08:23 PM
RE: MCServer is open source! - by AJIeKCaHDp - 10-21-2011, 09:00 PM
RE: MCServer is open source! - by rs2k - 10-21-2011, 10:23 PM
RE: MCServer is open source! - by AJIeKCaHDp - 10-21-2011, 10:29 PM
RE: MCServer is open source! - by FakeTruth - 10-21-2011, 11:51 PM
RE: MCServer is open source! - by AJIeKCaHDp - 10-21-2011, 11:55 PM
RE: MCServer is open source! - by FakeTruth - 10-22-2011, 12:18 AM
RE: MCServer is open source! - by AJIeKCaHDp - 10-22-2011, 12:56 AM
RE: MCServer is open source! - by FakeTruth - 10-22-2011, 01:51 AM
RE: MCServer is open source! - by rs2k - 10-22-2011, 04:21 AM
RE: MCServer is open source! - by AJIeKCaHDp - 10-22-2011, 06:21 AM
RE: MCServer is open source! - by vcnnews - 10-22-2011, 07:04 AM
RE: MCServer is open source! - by FakeTruth - 10-22-2011, 07:27 AM
RE: MCServer is open source! - by rs2k - 10-22-2011, 08:15 AM
RE: MCServer is open source! - by FakeTruth - 10-22-2011, 08:24 AM
RE: MCServer is open source! - by AJIeKCaHDp - 10-22-2011, 09:04 AM
RE: MCServer is open source! - by rs2k - 10-22-2011, 09:20 AM
RE: MCServer is open source! - by FakeTruth - 10-22-2011, 10:20 AM
RE: MCServer is open source! - by rs2k - 10-23-2011, 01:05 AM
RE: MCServer is open source! - by FakeTruth - 10-23-2011, 05:09 AM
RE: MCServer is open source! - by rs2k - 10-23-2011, 05:18 AM
RE: MCServer is open source! - by necavi - 10-23-2011, 03:27 PM
RE: MCServer is open source! - by rs2k - 10-24-2011, 02:20 AM
RE: MCServer is open source! - by FakeTruth - 10-24-2011, 03:59 AM
RE: MCServer is open source! - by rs2k - 10-24-2011, 05:04 AM
RE: MCServer is open source! - by FakeTruth - 10-24-2011, 06:51 AM
RE: MCServer is open source! - by rs2k - 10-24-2011, 06:55 AM
RE: MCServer is open source! - by necavi - 10-24-2011, 07:02 AM
RE: MCServer is open source! - by rs2k - 10-24-2011, 07:05 AM
RE: MCServer is open source! - by necavi - 10-24-2011, 07:08 AM
RE: MCServer is open source! - by rs2k - 10-24-2011, 07:40 AM
RE: MCServer is open source! - by FakeTruth - 10-24-2011, 08:03 AM
RE: MCServer is open source! - by rs2k - 10-24-2011, 08:11 AM
RE: MCServer is open source! - by FakeTruth - 10-24-2011, 08:29 AM
RE: MCServer is open source! - by rs2k - 10-24-2011, 08:30 AM
RE: MCServer is open source! - by FakeTruth - 10-24-2011, 08:55 AM
RE: MCServer is open source! - by rs2k - 10-24-2011, 09:04 AM
RE: MCServer is open source! - by FakeTruth - 10-24-2011, 09:20 AM



Users browsing this thread: 2 Guest(s)