Browse Source

Use GetStringListIndex() also for the emitter type.

Lasse Öörni 10 years ago
parent
commit
e18f801103
1 changed files with 1 additions and 5 deletions
  1. 1 5
      Source/Urho3D/Graphics/ParticleEffect.cpp

+ 1 - 5
Source/Urho3D/Graphics/ParticleEffect.cpp

@@ -204,12 +204,8 @@ bool ParticleEffect::Load(const XMLElement& source)
             emitterType_ = EMITTER_SPHERE;
             emitterType_ = EMITTER_SPHERE;
             emitterSize_ = Vector3::ZERO;
             emitterSize_ = Vector3::ZERO;
         }
         }
-        else if (type == "box")
-            emitterType_ = EMITTER_BOX;
-        else if (type == "sphere")
-            emitterType_ = EMITTER_SPHERE;
         else
         else
-            URHO3D_LOGERROR("Unknown particle emitter type " + type);
+            emitterType_ = (EmitterType)GetStringListIndex(type.CString(), emitterTypeNames, EMITTER_SPHERE);
     }
     }
 
 
     if (source.HasChild("emittersize"))
     if (source.HasChild("emittersize"))