summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-04-18 13:54:17 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-04-18 13:54:17 +0200
commit200ea6254c28b73d419001ea1be7d2d4d1d1ee88 (patch)
tree509859b7241e36a62c312fa2a3086684c125048a /src/World.cpp
parentRemoved unsupported C++11 features. (diff)
downloadcuberite-200ea6254c28b73d419001ea1be7d2d4d1d1ee88.tar
cuberite-200ea6254c28b73d419001ea1be7d2d4d1d1ee88.tar.gz
cuberite-200ea6254c28b73d419001ea1be7d2d4d1d1ee88.tar.bz2
cuberite-200ea6254c28b73d419001ea1be7d2d4d1d1ee88.tar.lz
cuberite-200ea6254c28b73d419001ea1be7d2d4d1d1ee88.tar.xz
cuberite-200ea6254c28b73d419001ea1be7d2d4d1d1ee88.tar.zst
cuberite-200ea6254c28b73d419001ea1be7d2d4d1d1ee88.zip
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/World.cpp b/src/World.cpp
index c23e255f8..800bdde0e 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -1691,6 +1691,11 @@ int cWorld::SpawnFallingBlock(int a_X, int a_Y, int a_Z, BLOCKTYPE BlockType, NI
int cWorld::SpawnExperienceOrb(double a_X, double a_Y, double a_Z, int a_Reward)
{
+ if (a_Reward < 1)
+ {
+ return -1;
+ }
+
cExpOrb * ExpOrb = new cExpOrb(a_X, a_Y, a_Z, a_Reward);
ExpOrb->Initialize(this);
return ExpOrb->GetUniqueID();