From 9fd5df26d0c9e8c0f99a2a1dbf620f76eaa65be1 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 11 Sep 2014 10:28:48 +0200 Subject: Fixed a redstone sim failure with droppers. --- src/Chunk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Chunk.cpp') diff --git a/src/Chunk.cpp b/src/Chunk.cpp index 99e48df95..e75acb03b 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -2215,7 +2215,7 @@ bool cChunk::DoWithRedstonePoweredEntityAt(int a_BlockX, int a_BlockY, int a_Blo } } - if (a_Callback.Item((cRedstonePoweredEntity *)*itr)) + if (a_Callback.Item(dynamic_cast(*itr))) // Needs dynamic_cast due to multiple inheritance { return false; } -- cgit v1.2.3 From 3bd3ac2200392542b111d2bcd2951bd342edf721 Mon Sep 17 00:00:00 2001 From: Howaner Date: Thu, 11 Sep 2014 17:03:09 +0200 Subject: 1.8: Added ParticleEffect packet. --- src/Chunk.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Chunk.cpp') diff --git a/src/Chunk.cpp b/src/Chunk.cpp index 99e48df95..79602e64e 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -3043,7 +3043,7 @@ void cChunk::BroadcastEntityAnimation(const cEntity & a_Entity, char a_Animation -void cChunk::BroadcastParticleEffect(const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmmount, cClientHandle * a_Exclude) +void cChunk::BroadcastParticleEffect(const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount, cClientHandle * a_Exclude) { for (cClientHandleList::iterator itr = m_LoadedByClient.begin(); itr != m_LoadedByClient.end(); ++itr) { @@ -3051,7 +3051,7 @@ void cChunk::BroadcastParticleEffect(const AString & a_ParticleName, float a_Src { continue; } - (*itr)->SendParticleEffect(a_ParticleName, a_SrcX, a_SrcY, a_SrcZ, a_OffsetX, a_OffsetY, a_OffsetZ, a_ParticleData, a_ParticleAmmount); + (*itr)->SendParticleEffect(a_ParticleName, a_SrcX, a_SrcY, a_SrcZ, a_OffsetX, a_OffsetY, a_OffsetZ, a_ParticleData, a_ParticleAmount); } // for itr - LoadedByClient[] } -- cgit v1.2.3 From 0b044e1c83a62c266afaf0852ccbd5e7b01cec5e Mon Sep 17 00:00:00 2001 From: Tycho Date: Thu, 11 Sep 2014 17:48:21 +0100 Subject: Possibly decoupled IncrementalRedstoneSimulator from the rest of the server THis wil hopefully allow for unit testing --- src/Chunk.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Chunk.cpp') diff --git a/src/Chunk.cpp b/src/Chunk.cpp index 99e48df95..46520eb56 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -1366,9 +1366,9 @@ void cChunk::CreateBlockEntities(void) void cChunk::WakeUpSimulators(void) { - cSimulator * WaterSimulator = m_World->GetWaterSimulator(); - cSimulator * LavaSimulator = m_World->GetLavaSimulator(); - cSimulator * RedstoneSimulator = m_World->GetRedstoneSimulator(); + cSimulator * WaterSimulator = m_World->GetWaterSimulator(); + cSimulator * LavaSimulator = m_World->GetLavaSimulator(); + cSimulator * RedstoneSimulator = m_World->GetRedstoneSimulator(); int BaseX = m_PosX * cChunkDef::Width; int BaseZ = m_PosZ * cChunkDef::Width; for (int x = 0; x < Width; x++) -- cgit v1.2.3 From ad5d0eda9c35a7f4a00e11743f545d057d188a8c Mon Sep 17 00:00:00 2001 From: tycho Date: Fri, 26 Sep 2014 17:00:34 +0100 Subject: Fixed issue with casting --- src/Chunk.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Chunk.cpp') diff --git a/src/Chunk.cpp b/src/Chunk.cpp index a7dec3fe3..06260bead 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -91,6 +91,7 @@ cChunk::cChunk( m_NeighborZP(a_NeighborZP), m_WaterSimulatorData(a_World->GetWaterSimulator()->CreateChunkData()), m_LavaSimulatorData (a_World->GetLavaSimulator ()->CreateChunkData()), + m_RedstoneSimulatorData(NULL), m_AlwaysTicked(0) { if (a_NeighborXM != NULL) @@ -159,6 +160,8 @@ cChunk::~cChunk() m_WaterSimulatorData = NULL; delete m_LavaSimulatorData; m_LavaSimulatorData = NULL; + delete m_RedstoneSimulatorData; + m_RedstoneSimulatorData = NULL; } -- cgit v1.2.3