From 84f8312b8666b2774eafbbb0e6d034ba598fd69c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sun, 17 May 2020 20:36:48 +0300 Subject: Weapon fixes and thingies --- src/entities/Entity.cpp | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'src/entities/Entity.cpp') diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index 6f8ebcb4..b35ddb25 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -400,22 +400,6 @@ CEntity::PreRender(void) GetMatrix().UpdateRW(); UpdateRwFrame(); } - }else if(IsPickupModel(GetModelIndex())){ - if(((CObject*)this)->bIsPickup){ - CPickups::DoPickUpEffects(this); - GetMatrix().UpdateRW(); - UpdateRwFrame(); - }else if(GetModelIndex() == MI_GRENADE){ - CMotionBlurStreaks::RegisterStreak((uintptr)this, - 100, 100, 100, - GetPosition() - 0.07f*TheCamera.GetRight(), - GetPosition() + 0.07f*TheCamera.GetRight()); - }else if(GetModelIndex() == MI_MOLOTOV){ - CMotionBlurStreaks::RegisterStreak((uintptr)this, - 0, 100, 0, - GetPosition() - 0.07f*TheCamera.GetRight(), - GetPosition() + 0.07f*TheCamera.GetRight()); - } }else if(GetModelIndex() == MI_MISSILE){ CVector pos = GetPosition(); float flicker = (CGeneral::GetRandomNumber() & 0xF)/(float)0x10; @@ -437,7 +421,22 @@ CEntity::PreRender(void) CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_OFF, 0.0f); }else if(IsGlass(GetModelIndex())){ - PreRenderForGlassWindow(); + if(!((CSimpleModelInfo*)CModelInfo::GetModelInfo(GetModelIndex()))->m_isArtistGlass) + PreRenderForGlassWindow(); + }else if (((CObject*)this)->bIsPickup) { + CPickups::DoPickUpEffects(this); + GetMatrix().UpdateRW(); + UpdateRwFrame(); + } else if (GetModelIndex() == MI_GRENADE) { + CMotionBlurStreaks::RegisterStreak((uintptr)this, + 100, 100, 100, + GetPosition() - 0.07f * TheCamera.GetRight(), + GetPosition() + 0.07f * TheCamera.GetRight()); + } else if (GetModelIndex() == MI_MOLOTOV) { + CMotionBlurStreaks::RegisterStreak((uintptr)this, + 0, 100, 0, + GetPosition() - 0.07f * TheCamera.GetRight(), + GetPosition() + 0.07f * TheCamera.GetRight()); } // fall through case ENTITY_TYPE_DUMMY: -- cgit v1.2.3