summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2014-04-10 16:50:43 +0200
committerAlexander Harkness <bearbin@gmail.com>2014-04-10 16:50:43 +0200
commit2d02ff1df8204a74c477a27b3d30f297fde2e5bf (patch)
tree643673a4b7618734d85445d7a3e766bd9973fd7d
parentMerge pull request #871 from worktycho/worldstorage (diff)
downloadcuberite-2d02ff1df8204a74c477a27b3d30f297fde2e5bf.tar
cuberite-2d02ff1df8204a74c477a27b3d30f297fde2e5bf.tar.gz
cuberite-2d02ff1df8204a74c477a27b3d30f297fde2e5bf.tar.bz2
cuberite-2d02ff1df8204a74c477a27b3d30f297fde2e5bf.tar.lz
cuberite-2d02ff1df8204a74c477a27b3d30f297fde2e5bf.tar.xz
cuberite-2d02ff1df8204a74c477a27b3d30f297fde2e5bf.tar.zst
cuberite-2d02ff1df8204a74c477a27b3d30f297fde2e5bf.zip
-rw-r--r--src/Mobs/Monster.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index aa6071515..22ee6e0dd 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -1,4 +1,3 @@
-
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "IncludeAllMonsters.h"
@@ -526,7 +525,10 @@ void cMonster::KilledBy(cEntity * a_Killer)
break;
}
}
- m_World->SpawnExperienceOrb(GetPosX(), GetPosY(), GetPosZ(), Reward);
+ if (a_Killer != NULL)
+ {
+ m_World->SpawnExperienceOrb(GetPosX(), GetPosY(), GetPosZ(), Reward);
+ }
m_DestroyTimer = 0;
}