1 // If we're drawing smoketrails, then lay one down, and set it to fade out 2 if (mbSmokeTrail) 3 { 4 cpVect Loc = mpBody->p; 5 GameLevel::tLevelItem LevelItem; 6 LevelItem.ItemName = "Smoke"; 7 8 // Set location at back of bullet 9 Loc.x -= cos(mpBody->a)*mpImage->GetWidth()/2; 10 Loc.y -= sin(mpBody->a)*mpImage->GetHeight()/2; 11 LevelItem.Location = Loc; 12 LevelItem.ImageName = ""; // get it from xml 13 SmashPcItem *pSmokeItem = new SmashPcItem(mGameData, 14 mpApp, LevelItem, mpSpace); 15 16 mGameData.AddActiveItem(pSmokeItem); 17 }