summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-04-10 17:23:32 +0200
committerMattes D <github@xoft.cz>2014-04-10 17:23:32 +0200
commitb45e8a8bd9a3085aaeaeaae4c7f419d4e13e1e21 (patch)
tree2b2242294dacef62f59de4bb36e1288c553fbf71 /src
parentMerge pull request #871 from worktycho/worldstorage (diff)
parentFixed GitHuB WebEdit fail. (diff)
downloadcuberite-b45e8a8bd9a3085aaeaeaae4c7f419d4e13e1e21.tar
cuberite-b45e8a8bd9a3085aaeaeaae4c7f419d4e13e1e21.tar.gz
cuberite-b45e8a8bd9a3085aaeaeaae4c7f419d4e13e1e21.tar.bz2
cuberite-b45e8a8bd9a3085aaeaeaae4c7f419d4e13e1e21.tar.lz
cuberite-b45e8a8bd9a3085aaeaeaae4c7f419d4e13e1e21.tar.xz
cuberite-b45e8a8bd9a3085aaeaeaae4c7f419d4e13e1e21.tar.zst
cuberite-b45e8a8bd9a3085aaeaeaae4c7f419d4e13e1e21.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Monster.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index aa6071515..171097aba 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -526,7 +526,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;
}