SVN Builds
#14
Variable scope issues perhaps. Enclosing the individual cPickup* Pickup ensures there's no overlap.
Code:
void cCavespider::KilledBy( cEntity* a_Killer ) { { //0 to 1 spider eye - 1.9 pre2 cPickup* Pickup = new cPickup( (int)(m_Pos->x*32), (int)(m_Pos->y*32), (int)(m_Pos->z*32), cItem( E_ITEM_SPIDER_EYE, (rand() % 1) ) ); Pickup->Initialize( GetWorld() ); } { //0 to 2 string. cPickup* Pickup = new cPickup( (int)(m_Pos->x*32), (int)(m_Pos->y*32), (int)(m_Pos->z*32), cItem( E_ITEM_STRING, (rand() % 3) ) ); Pickup->Initialize( GetWorld() ); } cMonster::KilledBy( a_Killer ); }
Reply
Thanks given by:


Messages In This Thread



Users browsing this thread: 2 Guest(s)