summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoannis <joannis.orlandos@gmail.com>2014-05-27 11:08:06 +0200
committerJoannis <joannis.orlandos@gmail.com>2014-05-27 11:08:06 +0200
commit1128dc783f4ee0913f3395c0a79ebdbbce2cfdee (patch)
treea439be7b5066d3118ce128b0e77f8634cb2fdb7d /src
parent- Added support for more types of projectiles in the Dispenser (diff)
downloadcuberite-1128dc783f4ee0913f3395c0a79ebdbbce2cfdee.tar
cuberite-1128dc783f4ee0913f3395c0a79ebdbbce2cfdee.tar.gz
cuberite-1128dc783f4ee0913f3395c0a79ebdbbce2cfdee.tar.bz2
cuberite-1128dc783f4ee0913f3395c0a79ebdbbce2cfdee.tar.lz
cuberite-1128dc783f4ee0913f3395c0a79ebdbbce2cfdee.tar.xz
cuberite-1128dc783f4ee0913f3395c0a79ebdbbce2cfdee.tar.zst
cuberite-1128dc783f4ee0913f3395c0a79ebdbbce2cfdee.zip
Diffstat (limited to 'src')
-rw-r--r--src/BlockEntities/DispenserEntity.cpp14
-rw-r--r--src/BlockEntities/DispenserEntity.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/BlockEntities/DispenserEntity.cpp b/src/BlockEntities/DispenserEntity.cpp
index e2032a041..0f64118ef 100644
--- a/src/BlockEntities/DispenserEntity.cpp
+++ b/src/BlockEntities/DispenserEntity.cpp
@@ -146,14 +146,14 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum)
case E_ITEM_FIRE_CHARGE:
{
- spawnProjectileFromDispenser(a_Chunk, DispX, DispY, DispZ, cProjectileEntity::pkFireCharge);
+ SpawnProjectileFromDispenser(a_Chunk, DispX, DispY, DispZ, cProjectileEntity::pkFireCharge);
break;
}
case E_ITEM_ARROW:
{
- spawnProjectileFromDispenser(a_Chunk, DispX, DispY, DispZ, cProjectileEntity::pkArrow);
+ SpawnProjectileFromDispenser(a_Chunk, DispX, DispY, DispZ, cProjectileEntity::pkArrow);
break;
}
@@ -161,7 +161,7 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum)
case E_ITEM_SNOWBALL:
{
// Not working as there is no such entity yet?
- spawnProjectileFromDispenser(a_Chunk, DispX, DispY, DispZ, cProjectileEntity::pkSnowball);
+ SpawnProjectileFromDispenser(a_Chunk, DispX, DispY, DispZ, cProjectileEntity::pkSnowball);
break;
}
@@ -169,14 +169,14 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum)
case E_ITEM_EGG:
{
// Not working as there is no such entity yet?
- spawnProjectileFromDispenser(a_Chunk, DispX, DispY, DispZ, cProjectileEntity::pkEgg);
+ SpawnProjectileFromDispenser(a_Chunk, DispX, DispY, DispZ, cProjectileEntity::pkEgg);
break;
}
case E_ITEM_FIREWORK_ROCKET:
{
- spawnProjectileFromDispenser(a_Chunk, DispX, DispY, DispZ, cProjectileEntity::pkFirework);
+ SpawnProjectileFromDispenser(a_Chunk, DispX, DispY, DispZ, cProjectileEntity::pkFirework);
break;
}
@@ -191,7 +191,7 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum)
-void cDispenserEntity::spawnProjectileFromDispenser(cChunk& a_Chunk, int& DispX, int& DispY, int& DispZ, cProjectileEntity::eKind kind)
+void cDispenserEntity::SpawnProjectileFromDispenser(cChunk & a_Chunk, int & DispX, int & DispY, int & DispZ, cProjectileEntity::eKind kind)
{
Vector3d Speed = GetProjectileLookVector(a_Chunk);
cChunk * DispChunk = a_Chunk.GetRelNeighborChunkAdjustCoords(DispX, DispZ);
@@ -199,7 +199,7 @@ void cDispenserEntity::spawnProjectileFromDispenser(cChunk& a_Chunk, int& DispX,
double EntityX = 0.5 + (DispX + DispChunk->GetPosX() * cChunkDef::Width);
double EntityZ = 0.5 + (DispZ + DispChunk->GetPosZ() * cChunkDef::Width);
- m_World->CreateProjectile((double) EntityX, (double) DispY, (double) EntityZ, cProjectileEntity::pkArrow, NULL, NULL, &Speed);
+ m_World->CreateProjectile((double) EntityX, (double) DispY, (double) EntityZ, cProjectileEntity::pkArrow, NULL, NULL, & Speed);
}
diff --git a/src/BlockEntities/DispenserEntity.h b/src/BlockEntities/DispenserEntity.h
index 9290bee5c..8bc2475c9 100644
--- a/src/BlockEntities/DispenserEntity.h
+++ b/src/BlockEntities/DispenserEntity.h
@@ -30,7 +30,7 @@ private:
bool ScoopUpLiquid(int a_SlotNum, short a_BucketItemType);
// Spawns a projectile of the given kind in front of the dispenser
- void spawnProjectileFromDispenser(cChunk& a_Chunk, int& DispX, int& DispY, int& DispZ, cProjectileEntity::eKind kind);
+ void SpawnProjectileFromDispenser(cChunk& a_Chunk, int& DispX, int& DispY, int& DispZ, cProjectileEntity::eKind kind);
// Returns how to aim the projectile
Vector3d GetProjectileLookVector(cChunk & a_Chunk);