Browse Source

Zero-initialize Drawable's local bounding box to make sure it doesn't contain infinities if the Drawable subclass never defines it. Closes #1027.

Lasse Öörni 10 years ago
parent
commit
e55d989475
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Source/Urho3D/Graphics/Drawable.cpp

+ 1 - 0
Source/Urho3D/Graphics/Drawable.cpp

@@ -80,6 +80,7 @@ SourceBatch& SourceBatch::operator =(const SourceBatch& rhs)
 
 Drawable::Drawable(Context* context, unsigned char drawableFlags) :
     Component(context),
+    boundingBox_(0.0f, 0.0f),
     drawableFlags_(drawableFlags),
     worldBoundingBoxDirty_(true),
     castShadows_(false),