summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/Hud.cpp3
-rw-r--r--src/render/Particle.cpp15
-rw-r--r--src/render/Particle.h3
3 files changed, 17 insertions, 4 deletions
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index a9215cb7..aa728a5e 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -637,6 +637,7 @@ void CHud::Draw()
/*
DrawOnScreenTimer
*/
+
wchar sTimer[16];
if (!CUserDisplay::OnscnTimer.m_sEntries[0].m_bTimerProcessed)
@@ -697,7 +698,7 @@ void CHud::Draw()
if (CTimer::GetFrameCounter() & 4 || !CounterFlashTimer) {
if (CUserDisplay::OnscnTimer.m_sEntries[0].m_nType) {
CSprite2d::DrawRect(CRect(SCREEN_SCALE_FROM_RIGHT(27.0f) - SCREEN_SCALE_X(100.0f) / 2 + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(8.0f), SCREEN_SCALE_FROM_RIGHT(27.0f) + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(11.0f) + SCREEN_SCALE_Y(8.0f)), CRGBA(0, 106, 164, 80));
- CSprite2d::DrawRect(CRect(SCREEN_SCALE_FROM_RIGHT(27.0f) - SCREEN_SCALE_X(100.0f) / 2 + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(8.0f), SCREEN_SCALE_X(atoi(CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterBuffer)) / 2 + SCREEN_SCALE_FROM_RIGHT(27.0f) - SCREEN_SCALE_X(100.0f) / 2 + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(11.0f) + SCREEN_SCALE_Y(8.0f)), CRGBA(0, 106, 164, 255));
+ CSprite2d::DrawRect(CRect(SCREEN_SCALE_FROM_RIGHT(27.0f) - SCREEN_SCALE_X(100.0f) / 2 + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(8.0f), SCREEN_SCALE_X(atoi(CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterBuffer)) / 2 + SCREEN_SCALE_FROM_RIGHT(27.0f + 50.0f) + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(11.0f) + SCREEN_SCALE_Y(8.0f)), CRGBA(0, 106, 164, 255));
} else {
AsciiToUnicode(CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterBuffer, sTimer);
CFont::SetPropOn();
diff --git a/src/render/Particle.cpp b/src/render/Particle.cpp
index e2db55c7..56ac9512 100644
--- a/src/render/Particle.cpp
+++ b/src/render/Particle.cpp
@@ -12,6 +12,10 @@
#include "ParticleObject.h"
#include "Particle.h"
+#ifndef MASTER
+bool CParticle::bEnableBannedParticles = false;
+#endif
+
#define MAX_PARTICLES_ON_SCREEN (1000)
@@ -768,7 +772,9 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe
{
if ( CTimer::GetIsPaused() )
return NULL;
-
+#ifndef MASTER
+ if(!bEnableBannedParticles)
+#endif
if ( ( type == PARTICLE_ENGINE_SMOKE
|| type == PARTICLE_ENGINE_SMOKE2
|| type == PARTICLE_ENGINE_STEAM
@@ -781,7 +787,7 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe
{
return nil;
}
-
+
CParticle *pParticle = m_pUnusedListHead;
if ( pParticle == nil )
@@ -1455,7 +1461,10 @@ void CParticle::Render()
RwRaster **frames = psystem->m_ppRaster;
tParticleType type = psystem->m_Type;
-
+
+#ifndef MASTER
+ if (!bEnableBannedParticles)
+#endif
if ( type == PARTICLE_ENGINE_SMOKE
|| type == PARTICLE_ENGINE_SMOKE2
|| type == PARTICLE_ENGINE_STEAM
diff --git a/src/render/Particle.h b/src/render/Particle.h
index 4e41ea2d..310ef0d4 100644
--- a/src/render/Particle.h
+++ b/src/render/Particle.h
@@ -97,6 +97,9 @@ public:
static void AddJetExplosion(CVector const &vecPos, float fPower, float fSize);
static void AddYardieDoorSmoke(CVector const &vecPos, CMatrix const &matMatrix);
+#ifndef MASTER
+ static bool bEnableBannedParticles;
+#endif
};
VALIDATE_SIZE(CParticle, 0x68); \ No newline at end of file