Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void obj_DroppedItem::AppendRenderables( RenderArray ( & render_arrays )[ rsCount ], const r3dCamera& Cam )
- {
- MeshGameObject::AppendRenderables( render_arrays, Cam );
- //SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingRange"), GetPosition(), r3dPoint3D(0, 1, 0));
- if( GetHighlight() )
- {
- MeshObjDeferredHighlightRenderable rend;
- //rend.Init( MeshGameObject::GetObjectLodMesh(), this, NULL ); // DEFAULT CATEGORY RENDER COLOR
- //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::green.GetPacked() ); // DEFAULT CATEGORY RENDER COLOR
- const WeaponConfig* wc = g_pWeaponArmory->getWeaponConfig(m_Item.itemID);
- if(wc)
- {
- SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingWhite"), GetPosition(), r3dPoint3D(0, 1, 0));
- //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::white.GetPacked() );
- }
- const BackpackConfig* bc = g_pWeaponArmory->getBackpackConfig(m_Item.itemID);
- if(bc)
- {
- SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingGreen"), GetPosition(), r3dPoint3D(0, 2, 0));
- //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::lightgreen.GetPacked() );
- }
- const FoodConfig* fc = g_pWeaponArmory->getFoodConfig(m_Item.itemID);
- if(fc)
- {
- SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingRed"), GetPosition(), r3dPoint3D(0, 1, 0));
- //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::lightred.GetPacked() );
- }
- const WeaponAttachmentConfig* wa = g_pWeaponArmory->getAttachmentConfig(m_Item.itemID);
- if(wa)
- {
- SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingYellow"), GetPosition(), r3dPoint3D(0, 1, 0));
- //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::blue.GetPacked() );
- }
- const GearConfig* gc = g_pWeaponArmory->getGearConfig(m_Item.itemID);
- if(gc)
- {
- SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingBlue"), GetPosition(), r3dPoint3D(0, 2.5, 0));
- //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::lightblue.GetPacked() );
- }
- const CraftComponentConfig* cc = g_pWeaponArmory->getCraftComponentConfig(m_Item.itemID);
- if(cc)
- {
- SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingPurple"), GetPosition(), r3dPoint3D(0, 1, 0));
- //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::lightyellow.GetPacked() );
- }
- const CraftRecipeConfig* cr = g_pWeaponArmory->getCraftRecipeConfig(m_Item.itemID);
- if(cr)
- {
- SpawnImpactParticle(r3dHash::MakeHash(""), r3dHash::MakeHash("LootingPurple"), GetPosition(), r3dPoint3D(0, 1, 0));
- //rend.Init( MeshGameObject::GetObjectLodMesh(), this, r3dColor::green.GetPacked() );
- }
- rend.SortValue = 0;
- rend.DoExtrude = 0;
- render_arrays[ rsDrawHighlightPass0 ].PushBack( rend );
- rend.DoExtrude = 1;
- render_arrays[ rsDrawHighlightPass1 ].PushBack( rend );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement