Redstone Simulator Rewrite
#1
Привет!

I am rewriting the redstone simulator because the current one doesn't work.

However, I am encountering a difficulty (namely, an assert fired by deque) trying to get blocks to be powered or changed as a result of being powered. This only happens in DEBUG and not release.

The assert fired tells me: Expression: deque iterator not incrementable

What is the cause of this?

This code, for example, breaks:

void cRedstoneSimulator::HandleTNT(const Vector3i & a_BlockPos)
{
	if (AreCoordsPowered(a_BlockPos))
	{
		m_World.BroadcastSoundEffect("random.fuse", a_BlockPos.x * 8, a_BlockPos.y * 8, a_BlockPos.z * 8, 0.5f, 0.6f);
		m_World.SpawnPrimedTNT(a_BlockPos.x + 0.5, a_BlockPos.y + 0.5, a_BlockPos.z + 0.5, 4);  // 4 seconds to boom
		m_World.SetBlock(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, E_BLOCK_AIR, 0);
	}
	return;
}
bool cRedstoneSimulator::AreCoordsPowered(const Vector3i & a_BlockPos)
{
	for (PoweredBlocksList::iterator itr = m_PoweredBlocks.begin(); itr != m_PoweredBlocks.end(); ++itr)
	{
		sPoweredBlocks & Change = *itr;

		if (Change.a_BlockPos.Equals(a_BlockPos))
		{
			return true;
		}
	}
	return false;
}
Reply
Thanks given by:


Messages In This Thread
Redstone Simulator Rewrite - by tigerw - 09-21-2013, 11:10 PM
RE: Redstone Simulator Rewrite - by xoft - 09-22-2013, 12:55 AM
RE: Redstone Simulator Rewrite - by tigerw - 09-22-2013, 01:14 AM
RE: Redstone Simulator Rewrite - by xoft - 09-22-2013, 02:32 AM
RE: Redstone Simulator Rewrite - by tigerw - 09-22-2013, 05:12 AM
RE: Redstone Simulator Rewrite - by tigerw - 09-24-2013, 05:15 AM
RE: Redstone Simulator Rewrite - by xoft - 09-24-2013, 05:37 AM
RE: Redstone Simulator Rewrite - by tigerw - 09-24-2013, 06:27 AM
RE: Redstone Simulator Rewrite - by xoft - 09-24-2013, 11:04 PM
RE: Redstone Simulator Rewrite - by tigerw - 09-24-2013, 11:19 PM
RE: Redstone Simulator Rewrite - by tigerw - 09-25-2013, 03:22 AM
RE: Redstone Simulator Rewrite - by tigerw - 09-26-2013, 02:18 AM
RE: Redstone Simulator Rewrite - by xoft - 09-26-2013, 05:17 AM
RE: Redstone Simulator Rewrite - by tigerw - 09-26-2013, 07:27 AM
RE: Redstone Simulator Rewrite - by FakeTruth - 09-26-2013, 10:18 AM
RE: Redstone Simulator Rewrite - by xoft - 09-26-2013, 03:38 PM
RE: Redstone Simulator Rewrite - by tigerw - 10-23-2013, 12:01 AM
RE: Redstone Simulator Rewrite - by FakeTruth - 10-23-2013, 01:02 AM
RE: Redstone Simulator Rewrite - by tigerw - 10-23-2013, 02:35 AM
RE: Redstone Simulator Rewrite - by tigerw - 11-19-2013, 03:05 AM
RE: Redstone Simulator Rewrite - by SamJBarney - 11-19-2013, 10:01 AM
RE: Redstone Simulator Rewrite - by SamJBarney - 11-20-2013, 02:51 AM
RE: Redstone Simulator Rewrite - by xoft - 11-20-2013, 03:40 AM
RE: Redstone Simulator Rewrite - by NiLSPACE - 11-20-2013, 04:27 AM
RE: Redstone Simulator Rewrite - by tigerw - 11-20-2013, 06:30 AM
RE: Redstone Simulator Rewrite - by NiLSPACE - 11-20-2013, 06:36 AM
RE: Redstone Simulator Rewrite - by NiLSPACE - 11-20-2013, 06:54 PM
RE: Redstone Simulator Rewrite - by tonibm19 - 11-21-2013, 12:06 AM
RE: Redstone Simulator Rewrite - by tigerw - 11-21-2013, 05:59 AM
RE: Redstone Simulator Rewrite - by NiLSPACE - 11-21-2013, 06:12 AM
RE: Redstone Simulator Rewrite - by tigerw - 11-21-2013, 07:05 AM
RE: Redstone Simulator Rewrite - by NiLSPACE - 11-21-2013, 07:37 AM
RE: Redstone Simulator Rewrite - by tigerw - 11-30-2013, 09:29 PM
RE: Redstone Simulator Rewrite - by tigerw - 12-04-2013, 07:57 AM
RE: Redstone Simulator Rewrite - by tonibm19 - 12-08-2013, 07:40 AM
RE: Redstone Simulator Rewrite - by tigerw - 12-08-2013, 08:30 AM
RE: Redstone Simulator Rewrite - by tigerw - 12-11-2013, 03:44 AM
RE: Redstone Simulator Rewrite - by SamJBarney - 12-11-2013, 04:27 AM
RE: Redstone Simulator Rewrite - by tigerw - 12-11-2013, 04:33 AM
RE: Redstone Simulator Rewrite - by SamJBarney - 12-11-2013, 08:26 AM
RE: Redstone Simulator Rewrite - by tonibm19 - 12-11-2013, 07:08 PM
RE: Redstone Simulator Rewrite - by NiLSPACE - 12-12-2013, 01:56 AM
RE: Redstone Simulator Rewrite - by tigerw - 12-12-2013, 03:36 AM
RE: Redstone Simulator Rewrite - by xoft - 12-12-2013, 06:38 AM
RE: Redstone Simulator Rewrite - by ThuGie - 12-13-2013, 02:15 AM
RE: Redstone Simulator Rewrite - by tigerw - 12-13-2013, 04:02 AM
RE: Redstone Simulator Rewrite - by xoft - 12-13-2013, 08:07 AM
RE: Redstone Simulator Rewrite - by tigerw - 12-13-2013, 10:19 AM
RE: Redstone Simulator Rewrite - by NiLSPACE - 12-14-2013, 12:18 AM
RE: Redstone Simulator Rewrite - by tigerw - 12-14-2013, 07:04 AM
RE: Redstone Simulator Rewrite - by tigerw - 12-14-2013, 08:40 AM
RE: Redstone Simulator Rewrite - by tigerw - 12-16-2013, 03:06 AM
RE: Redstone Simulator Rewrite - by tonibm19 - 12-16-2013, 05:40 AM
RE: Redstone Simulator Rewrite - by tigerw - 12-16-2013, 06:31 AM
RE: Redstone Simulator Rewrite - by NiLSPACE - 02-24-2014, 07:21 AM
RE: Redstone Simulator Rewrite - by NiLSPACE - 02-24-2014, 08:44 PM
RE: Redstone Simulator Rewrite - by tigerw - 02-25-2014, 06:42 AM
RE: Redstone Simulator Rewrite - by tigerw - 07-16-2014, 01:22 AM
RE: Redstone Simulator Rewrite - by tigerw - 10-17-2015, 10:09 PM
RE: Redstone Simulator Rewrite - by NiLSPACE - 10-17-2015, 11:37 PM
RE: Redstone Simulator Rewrite - by Jammet - 10-18-2015, 05:42 AM
RE: Redstone Simulator Rewrite - by tonibm19 - 10-18-2015, 08:08 AM
RE: Redstone Simulator Rewrite - by worktycho - 10-18-2015, 08:45 AM
RE: Redstone Simulator Rewrite - by LO1ZB - 10-18-2015, 11:37 PM



Users browsing this thread: 7 Guest(s)