From afaf104b4086dbc5245f92a209cb68a088780ebb Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 21 Dec 2012 12:52:14 +0000 Subject: Added more constants into eEntityType; made them a compulsory parameter to the constructor, so that all entities have proper type. Also added a few utility functions to cEntity for distinguishing the types (IsPlayer(), IsPickup() etc.) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1092 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Mobs/Zombiepigman.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/Mobs/Zombiepigman.cpp') diff --git a/source/Mobs/Zombiepigman.cpp b/source/Mobs/Zombiepigman.cpp index e917da979..37cf02925 100644 --- a/source/Mobs/Zombiepigman.cpp +++ b/source/Mobs/Zombiepigman.cpp @@ -48,7 +48,7 @@ void cZombiepigman::KilledBy(cPawn * a_Killer) { super::KilledBy(a_Killer); - if ((a_Killer != NULL) && (a_Killer->GetEntityType() == eEntityType_Player)) + if ((a_Killer != NULL) && (a_Killer->IsPlayer())) { // TODO: Anger all nearby zombie pigmen // TODO: In vanilla, if one player angers ZPs, do they attack any nearby player, or only that one attacker? -- cgit v1.2.3