From 1cca9b13b3d320ff767cfc552413265b2ef6e0d6 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 6 Jun 2012 20:18:50 +0000 Subject: Item-dropping code rewritten and centralized - now there's only one place to modify if we want to split or merge same-item drops: cWorld:SpawnItemPickups(). Also, mined blocks can now drop more items, and they recognize if they're being mined by the correct tool. git-svn-id: http://mc-server.googlecode.com/svn/trunk@561 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cSquid.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'source/cSquid.cpp') diff --git a/source/cSquid.cpp b/source/cSquid.cpp index 1d3b332f4..52c0cbf30 100644 --- a/source/cSquid.cpp +++ b/source/cSquid.cpp @@ -26,14 +26,24 @@ bool cSquid::IsA( const char* a_EntityType ) return cMonster::IsA( a_EntityType ); } + + + + void cSquid::KilledBy( cEntity* a_Killer ) { - //Drops 0-3 Ink Sacs - cMonster::RandomDropItem(E_ITEM_DYE, 0, 3); + // Drops 0-3 Ink Sacs + cItems Drops; + AddRandomDropItem(Drops, 0, 3, E_ITEM_DYE, E_META_DYE_BLACK); + m_World->SpawnItemPickups(Drops, m_Pos.x, m_Pos.y, m_Pos.z); cMonster::KilledBy( a_Killer ); } + + + + void cSquid::Tick(float a_Dt) { cPassiveMonster::Tick(a_Dt); -- cgit v1.2.3