1
0

Added OnExploding() and OnExploded() hooks.

As requested in FS 413, with extra parameters:
World, BlockX, BlockY, BlockZ, Size, CanCauseFire, Source, SourceData

OnExploding() can return 3 values:
StopHook, CanCauseFire, ExplosionSize
This commit is contained in:
madmaxoft
2013-08-09 14:58:43 +02:00
parent 6f2c099f70
commit d4a3c451c4
16 changed files with 686 additions and 62 deletions

View File

@@ -53,10 +53,13 @@ void cBlockBedHandler::OnDestroyed(cWorld * a_World, int a_BlockX, int a_BlockY,
void cBlockBedHandler::OnUse(cWorld *a_World, cPlayer *a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ)
{
if (a_World->GetDimension() != 0)
if (a_World->GetDimension() != dimOverworld)
{
Vector3i Coords(a_BlockX, a_BlockY, a_BlockZ);
a_World->DoExplosiontAt(5, a_BlockX, a_BlockY, a_BlockZ, true, esBed, &Coords);
}
else
{
a_World->DoExplosiontAt(5, a_BlockX, a_BlockY, a_BlockZ);
} else {
if (a_World->GetTimeOfDay() > 13000)
{
NIBBLETYPE Meta = a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);