Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(gCamera->fire)
- {
- //MessageBox(NULL,"Fire","",0);
- VecStruct vs;
- vs.Dir = gCamera->mLookW;
- vs.FPos = gCamera->mPosW; //position of camera
- //vs.Bullet = mp5.mesh;
- vs.life = 0.0f;
- vs.BulletTime = mTime;
- Vs.push_back(vs);
- //totalbulletsfired++;
- gCamera->fire = false;
- }
- gCamera->VecSize = Vs.size();
- std::list<VecStruct>::iterator i = Vs.begin();
- while( i != Vs.end() )
- {
- i->life += mTime;
- if(i->life >= 1000.0f)
- {
- //i = Vs.erase(i);
- }
- else
- {
- //D3DXMatrixTranslation(&i->Pos,
- // i->Dir.x*(mTime-i->BulletTime)*5.0f,
- // i->Dir.y*(mTime-i->BulletTime)*5.0f,
- // i->Dir.z*(mTime-i->BulletTime)*5.0f);
- // gd3dDevice->SetTransform(D3DTS_WORLD,&i->Pos);
- //mp5.mesh->DrawSubset(0);
- }
- ++i;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement