void CBlood::Bounce(vec2 Pos, vec2 Dir, int Group) { CBlooddrop b; b.SetDefault(); b.m_Pos = Pos; b.m_Spr = SPRITE_BLOOD01; b.m_LifeSpan = 2.0f + frandom()*2.0f; b.m_Rotspeed = 0.0f; b.m_StartSize = (30.0f + frandom()*24) / 1.75f; b.m_EndSize = 16.0f / 1.75f; b.m_Gravity = 1400.0f + frandom()*300; if (g_Config.m_GfxMultiBuffering) { b.m_Rotspeed = 0.0f; //b.m_StartSize *= 1.5f; b.m_StartSize = 48.0f; b.m_EndSize = 4.0f; b.m_LifeSpan = 4.0f; } b.m_Vel = Dir * ((frandom()+0.15f)*700.0f); b.m_Rot = GetAngle(b.m_Vel); b.m_Friction = 0.7f+frandom()*0.075f; float c = frandom()*0.3f + 0.7f; b.m_Color = vec4(c, c, c, 1.0f); m_pClient->m_pBlood->Add(Group, &b); if (g_Config.m_GfxMultiBuffering && frandom()*10 < 3 && Group == GROUP_BLOOD) m_pClient->m_pEffects->Splatter(b.m_Pos + Dir*frandom()*48.0f - Dir*frandom()*16.0f, b.m_Rot, b.m_StartSize * 2); }
void CBlood::Bounce(vec2 Pos, vec2 Dir) { CBlooddrop b; b.SetDefault(); b.m_Pos = Pos; b.m_Spr = SPRITE_BLOOD01; b.m_LifeSpan = 2.0f + frandom()*2.0f; b.m_Rotspeed = 0.0f; b.m_StartSize = (32.0f + frandom()*32) / 1.75f; b.m_EndSize = 16.0f / 1.75f; b.m_Gravity = 1400.0f + frandom()*300; b.m_Vel = Dir * ((frandom()+0.05f)*700.0f); b.m_Rot = GetAngle(b.m_Vel); b.m_Friction = 0.85f+frandom()*0.075f; float c = frandom()*0.3f + 0.7f; b.m_Color = vec4(c, c, c, 1.0f); m_pClient->m_pBlood->Add(GROUP_BLOOD, &b); }