summaryrefslogtreecommitdiffstats
path: root/src/graphics
diff options
context:
space:
mode:
authorVictor Vieux <victorvieux@gmail.com>2014-10-21 21:44:17 -0700
committerVictor Vieux <victorvieux@gmail.com>2014-10-21 21:44:17 -0700
commitd019a4990f2e2da71555daf085a3e09c92085fa5 (patch)
treec64ef2254a9ecc2e4b0dcfecab30d045d5567281 /src/graphics
parentd9fee8b2adad613cf8c10d153cd5cd7b261b7863 (diff)
downloadcolobot-d019a4990f2e2da71555daf085a3e09c92085fa5.tar.gz
colobot-d019a4990f2e2da71555daf085a3e09c92085fa5.tar.bz2
colobot-d019a4990f2e2da71555daf085a3e09c92085fa5.zip
add option to disable blood
Diffstat (limited to 'src/graphics')
-rw-r--r--src/graphics/engine/camera.cpp10
-rw-r--r--src/graphics/engine/camera.h4
-rw-r--r--src/graphics/engine/pyro.cpp6
3 files changed, 17 insertions, 3 deletions
diff --git a/src/graphics/engine/camera.cpp b/src/graphics/engine/camera.cpp
index fedc70a..c37ed39 100644
--- a/src/graphics/engine/camera.cpp
+++ b/src/graphics/engine/camera.cpp
@@ -137,6 +137,7 @@ CCamera::CCamera()
m_scriptLookat = Math::Vector(0.0f, 0.0f, 0.0f);
m_effect = true;
+ m_blood = true;
m_cameraScroll = true;
m_cameraInvertX = false;
m_cameraInvertY = false;
@@ -151,6 +152,15 @@ void CCamera::SetEffect(bool enable)
m_effect = enable;
}
+void CCamera::SetBlood(bool enable)
+{
+ m_blood = enable;
+}
+
+bool CCamera::GetBlood() {
+ return m_blood;
+}
+
void CCamera::SetCameraScroll(bool scroll)
{
m_cameraScroll = scroll;
diff --git a/src/graphics/engine/camera.h b/src/graphics/engine/camera.h
index 6d94dad..699593c 100644
--- a/src/graphics/engine/camera.h
+++ b/src/graphics/engine/camera.h
@@ -198,6 +198,8 @@ public:
void SetScriptLookat(Math::Vector lookat);
void SetEffect(bool enable);
+ void SetBlood(bool enable);
+ bool GetBlood();
void SetCameraScroll(bool scroll);
void SetCameraInvertX(bool invert);
void SetCameraInvertY(bool invert);
@@ -379,6 +381,8 @@ protected:
//! Shocks if explosion?
bool m_effect;
+ //! Blood?
+ bool m_blood;
//! Scroll in the edges?
bool m_cameraScroll;
//! X inversion in the edges?
diff --git a/src/graphics/engine/pyro.cpp b/src/graphics/engine/pyro.cpp
index d3e0405..d7edf51 100644
--- a/src/graphics/engine/pyro.cpp
+++ b/src/graphics/engine/pyro.cpp
@@ -312,7 +312,7 @@ bool CPyro::Create(PyroType type, CObject* obj, float force)
}
if ( m_type == PT_SHOTH )
{
- if ( m_object->GetSelect() )
+ if ( m_camera->GetBlood() && m_object->GetSelect() )
{
m_camera->StartOver(CAM_OVER_EFFECT_BLOOD, m_pos, force);
}
@@ -672,7 +672,7 @@ bool CPyro::EventProcess(const Event &event)
}
}
- if ( m_type == PT_SHOTH &&
+ if ( m_camera->GetBlood() && m_type == PT_SHOTH &&
m_lastParticle+m_engine->ParticleAdapt(0.05f) <= m_time )
{
m_lastParticle = m_time;
@@ -694,7 +694,7 @@ bool CPyro::EventProcess(const Event &event)
}
}
- if ( m_type == PT_SHOTM &&
+ if ( m_camera->GetBlood() && m_type == PT_SHOTM &&
m_lastParticle+m_engine->ParticleAdapt(0.05f) <= m_time )
{
m_lastParticle = m_time;