Advertisement
bombillo

obj_Droppeditem.cpp - SpawnImpactParticle

Sep 23rd, 2019
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.92 KB | None | 0 0
  1. void obj_DroppedItem::AppendRenderables( RenderArray ( & render_arrays )[ rsCount ], const r3dCamera& Cam )
  2. {
  3.     MeshGameObject::AppendRenderables( render_arrays, Cam );
  4.  
  5.  
  6.     //SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingRange"), GetPosition(), r3dPoint3D(0, 1, 0));
  7.  
  8.     if( GetHighlight() )
  9.     {
  10.         MeshObjDeferredHighlightRenderable rend;
  11.         //rend.Init( MeshGameObject::GetObjectLodMesh(), this, NULL ); // DEFAULT CATEGORY RENDER COLOR
  12.         //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::green.GetPacked() ); // DEFAULT CATEGORY RENDER COLOR
  13.         const WeaponConfig* wc = g_pWeaponArmory->getWeaponConfig(m_Item.itemID);
  14.         if(wc)
  15.         {
  16.             SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingWhite"), GetPosition(), r3dPoint3D(0, 1, 0));
  17.             //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::white.GetPacked() );
  18.         }
  19.         const BackpackConfig* bc = g_pWeaponArmory->getBackpackConfig(m_Item.itemID);
  20.         if(bc)
  21.         {
  22.             SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingGreen"), GetPosition(), r3dPoint3D(0, 2, 0));
  23.             //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::lightgreen.GetPacked() );
  24.         }
  25.         const FoodConfig* fc = g_pWeaponArmory->getFoodConfig(m_Item.itemID);
  26.         if(fc)
  27.         {
  28.             SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingRed"), GetPosition(), r3dPoint3D(0, 1, 0));
  29.             //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::lightred.GetPacked() );
  30.         }
  31.         const WeaponAttachmentConfig* wa = g_pWeaponArmory->getAttachmentConfig(m_Item.itemID);
  32.         if(wa)
  33.         {
  34.             SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingYellow"), GetPosition(), r3dPoint3D(0, 1, 0));
  35.             //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::blue.GetPacked() );
  36.         }
  37.         const GearConfig* gc = g_pWeaponArmory->getGearConfig(m_Item.itemID);
  38.         if(gc)
  39.         {
  40.             SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingBlue"), GetPosition(), r3dPoint3D(0, 2.5, 0));
  41.             //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::lightblue.GetPacked() );
  42.         }
  43.         const CraftComponentConfig* cc = g_pWeaponArmory->getCraftComponentConfig(m_Item.itemID);
  44.         if(cc)
  45.         {
  46.             SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingPurple"), GetPosition(), r3dPoint3D(0, 1, 0));
  47.             //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::lightyellow.GetPacked() );
  48.         }
  49.         const CraftRecipeConfig* cr = g_pWeaponArmory->getCraftRecipeConfig(m_Item.itemID);
  50.         if(cr)
  51.         {
  52.             SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingPurple"), GetPosition(), r3dPoint3D(0, 1, 0));
  53.             //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::green.GetPacked() );
  54.         }
  55.        
  56.         rend.SortValue = 0;
  57.         rend.DoExtrude = 0;
  58.        
  59.         render_arrays[ rsDrawHighlightPass0 ].PushBack( rend );
  60.  
  61.         rend.DoExtrude = 1;
  62.         render_arrays[ rsDrawHighlightPass1 ].PushBack( rend );
  63.     }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement