1
0

fixed warnings in World.cpp

This commit is contained in:
Tycho Bickerstaff 2013-12-22 14:55:24 +00:00 committed by madmaxoft
parent 2e113c63f9
commit 2e1588820d
4 changed files with 34 additions and 6 deletions

View File

@ -36,7 +36,14 @@ public:
/** Called on each block encountered along the path, including the first block (path start), if chunk data is not loaded /** Called on each block encountered along the path, including the first block (path start), if chunk data is not loaded
When this callback returns true, the tracing is aborted. When this callback returns true, the tracing is aborted.
*/ */
virtual bool OnNextBlockNoData(int a_BlockX, int a_BlockY, int a_BlockZ, char a_EntryFace) { return false; } virtual bool OnNextBlockNoData(int a_BlockX, int a_BlockY, int a_BlockZ, char a_EntryFace)
{
UNUSED(a_BlockX);
UNUSED(a_BlockY);
UNUSED(a_BlockZ);
UNUSED(a_EntryFace);
return false;
}
/** Called when the path goes out of world, either below (a_BlockY < 0) or above (a_BlockY >= cChunkDef::Height) /** Called when the path goes out of world, either below (a_BlockY < 0) or above (a_BlockY >= cChunkDef::Height)
The coords specify the exact point at which the path exited the world. The coords specify the exact point at which the path exited the world.
@ -44,7 +51,13 @@ public:
Note that some paths can go out of the world and come back again (parabola), Note that some paths can go out of the world and come back again (parabola),
in such a case this callback is followed by OnIntoWorld() and further OnNextBlock() calls in such a case this callback is followed by OnIntoWorld() and further OnNextBlock() calls
*/ */
virtual bool OnOutOfWorld(double a_BlockX, double a_BlockY, double a_BlockZ) { return false; } virtual bool OnOutOfWorld(double a_BlockX, double a_BlockY, double a_BlockZ)
{
UNUSED(a_BlockX);
UNUSED(a_BlockY);
UNUSED(a_BlockZ);
return false;
}
/** Called when the path goes into the world, from either below (a_BlockY < 0) or above (a_BlockY >= cChunkDef::Height) /** Called when the path goes into the world, from either below (a_BlockY < 0) or above (a_BlockY >= cChunkDef::Height)
The coords specify the exact point at which the path entered the world. The coords specify the exact point at which the path entered the world.
@ -52,7 +65,13 @@ public:
Note that some paths can go out of the world and come back again (parabola), Note that some paths can go out of the world and come back again (parabola),
in such a case this callback is followed by further OnNextBlock() calls in such a case this callback is followed by further OnNextBlock() calls
*/ */
virtual bool OnIntoWorld(double a_BlockX, double a_BlockY, double a_BlockZ) { return false; } virtual bool OnIntoWorld(double a_BlockX, double a_BlockY, double a_BlockZ)
{
UNUSED(a_BlockX);
UNUSED(a_BlockY);
UNUSED(a_BlockZ);
return false;
}
/** Called when the path is sure not to hit any more blocks. /** Called when the path is sure not to hit any more blocks.
Note that for some shapes this might never happen (line with constant Y) Note that for some shapes this might never happen (line with constant Y)

View File

@ -27,8 +27,14 @@ public:
} }
// cSimulator overrides: // cSimulator overrides:
virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override {} virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override
virtual void Simulate(float a_Dt) override {} {
UNUSED(a_BlockX);
UNUSED(a_BlockY);
UNUSED(a_BlockZ);
UNUSED(a_Chunk);
}
virtual void Simulate(float a_Dt) override { UNUSED(a_Dt);}
} ; } ;

View File

@ -723,6 +723,7 @@ void cWorld::Tick(float a_Dt, int a_LastTickDurationMSec)
void cWorld::TickWeather(float a_Dt) void cWorld::TickWeather(float a_Dt)
{ {
UNUSED(a_Dt);
// There are no weather changes anywhere but in the Overworld: // There are no weather changes anywhere but in the Overworld:
if (GetDimension() != dimOverworld) if (GetDimension() != dimOverworld)
{ {
@ -794,7 +795,7 @@ void cWorld::TickMobs(float a_Dt)
cMonster::mfAmbient, cMonster::mfAmbient,
cMonster::mfWater, cMonster::mfWater,
} ; } ;
for (int i = 0; i < ARRAYCOUNT(AllFamilies); i++) for (size_t i = 0; i < ARRAYCOUNT(AllFamilies); i++)
{ {
cMonster::eFamily Family = AllFamilies[i]; cMonster::eFamily Family = AllFamilies[i];
int SpawnDelay = cMonster::GetSpawnDelay(Family); int SpawnDelay = cMonster::GetSpawnDelay(Family);
@ -1643,6 +1644,7 @@ int cWorld::SpawnExperienceOrb(double a_X, double a_Y, double a_Z, int a_Reward)
void cWorld::SpawnPrimedTNT(double a_X, double a_Y, double a_Z, double a_FuseTimeInSec, double a_InitialVelocityCoeff) void cWorld::SpawnPrimedTNT(double a_X, double a_Y, double a_Z, double a_FuseTimeInSec, double a_InitialVelocityCoeff)
{ {
UNUSED(a_InitialVelocityCoeff);
cTNTEntity * TNT = new cTNTEntity(a_X, a_Y, a_Z, a_FuseTimeInSec); cTNTEntity * TNT = new cTNTEntity(a_X, a_Y, a_Z, a_FuseTimeInSec);
TNT->Initialize(this); TNT->Initialize(this);
// TODO: Add a bit of speed in horiz and vert axes, based on the a_InitialVelocityCoeff // TODO: Add a bit of speed in horiz and vert axes, based on the a_InitialVelocityCoeff

View File

@ -78,6 +78,7 @@ public:
class cTask class cTask
{ {
public: public:
virtual ~cTask(){};
virtual void Run(cWorld & a_World) = 0; virtual void Run(cWorld & a_World) = 0;
} ; } ;