From e73f7da4d65e7dc61a952894cc6f0843c4da3170 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 24 Apr 2012 00:16:03 +0300 Subject: Add particle physics settings (default value is best perfomance) --- src/defaults.cpp | 2 +- src/gui/setup_visual.cpp | 9 +++++++++ src/gui/setup_visual.h | 4 +--- src/particle.cpp | 5 +++-- 4 files changed, 14 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/defaults.cpp b/src/defaults.cpp index 6933c7356..ad9fcaddb 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -101,7 +101,7 @@ DefaultsData* getConfigDefaults() AddDEF(configData, "targetDeadPlayers", false); AddDEF(configData, "afkMessage", "I am away from keyboard"); AddDEF(configData, "particleMaxCount", 3000); - AddDEF(configData, "particleFastPhysics", 0); + AddDEF(configData, "particleFastPhysics", 2); AddDEF(configData, "particleEmitterSkip", 1); AddDEF(configData, "particleeffects", true); AddDEF(configData, "logToStandardOut", false); diff --git a/src/gui/setup_visual.cpp b/src/gui/setup_visual.cpp index 8cd052dd7..276387abb 100644 --- a/src/gui/setup_visual.cpp +++ b/src/gui/setup_visual.cpp @@ -86,6 +86,13 @@ Setup_Visual::Setup_Visual() this, "particleEmitterSkipEvent", 0, 3, mParticleList, true))->setInvertValue(3); + mParticleTypeList = new SetupItemNames(); + mParticleTypeList->push_back(_("best quality")); + mParticleTypeList->push_back(_("normal")); + mParticleTypeList->push_back(_("best perfomance")); + new SetupItemSlider2(_("Particle physics"), "", "particleFastPhysics", + this, "particleFastPhysicsEvent", 0, 2, mParticleTypeList); + new SetupItemLabel(_("Other"), "", this); new SetupItemSlider(_("Gamma"), "", "gamma", @@ -114,6 +121,8 @@ Setup_Visual::~Setup_Visual() mAmbientFxList = nullptr; delete mParticleList; mParticleList = nullptr; + delete mParticleTypeList; + mParticleTypeList = nullptr; delete mVSyncList; mVSyncList = nullptr; } diff --git a/src/gui/setup_visual.h b/src/gui/setup_visual.h index 532589599..1b80f5b4b 100644 --- a/src/gui/setup_visual.h +++ b/src/gui/setup_visual.h @@ -38,11 +38,9 @@ class Setup_Visual : public SetupTabScroll private: SetupItemNames *mSpeachList; - SetupItemNames *mAmbientFxList; - SetupItemNames *mParticleList; - + SetupItemNames *mParticleTypeList; SetupItemNames *mVSyncList; }; diff --git a/src/particle.cpp b/src/particle.cpp index e7e41a094..0d771a15e 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -194,9 +194,10 @@ bool Particle::update() { mAlive = DEAD_FLOOR; } - } else if (mPos.z > PARTICLE_SKY) + } + else if (mPos.z > PARTICLE_SKY) { - mAlive = DEAD_SKY; + mAlive = DEAD_SKY; } // Update child emitters -- cgit v1.2.3-70-g09d2