| 435 | |
| 436 | |
| 437 | void cBlockHandler::Check(cChunkInterface & a_ChunkInterface, cBlockPluginInterface & a_PluginInterface, int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk) |
| 438 | { |
| 439 | if (!CanBeAt(a_ChunkInterface, a_RelX, a_RelY, a_RelZ, a_Chunk)) |
| 440 | { |
| 441 | if (DoesDropOnUnsuitable()) |
| 442 | { |
| 443 | int BlockX = a_RelX + a_Chunk.GetPosX() * cChunkDef::Width; |
| 444 | int BlockZ = a_RelZ + a_Chunk.GetPosZ() * cChunkDef::Width; |
| 445 | DropBlock(a_ChunkInterface, *a_Chunk.GetWorld(), a_PluginInterface, NULL, BlockX, a_RelY, BlockZ); |
| 446 | } |
| 447 | |
| 448 | a_Chunk.SetBlock(a_RelX, a_RelY, a_RelZ, E_BLOCK_AIR, 0); |
| 449 | } |
| 450 | else |
| 451 | { |
| 452 | // Wake up the simulators for this block: |
| 453 | int BlockX = a_RelX + a_Chunk.GetPosX() * cChunkDef::Width; |
| 454 | int BlockZ = a_RelZ + a_Chunk.GetPosZ() * cChunkDef::Width; |
| 455 | a_Chunk.GetWorld()->GetSimulatorManager()->WakeUp(BlockX, a_RelY, BlockZ, &a_Chunk); |
| 456 | } |
| 457 | } |
| 458 | |
| 459 | |
| 460 |
no test coverage detected