From e7fbf9f73d8579260204ada779b91df3ee0eff56 Mon Sep 17 00:00:00 2001 From: auria Date: Sun, 6 Jun 2010 00:03:41 +0000 Subject: [PATCH] better error reporting if XML file contains a wrong object shape, don't silently continue... git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5466 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/physics/physical_object.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/physics/physical_object.cpp b/src/physics/physical_object.cpp index 1e4b58f07..7f67cd85d 100644 --- a/src/physics/physical_object.cpp +++ b/src/physics/physical_object.cpp @@ -54,7 +54,8 @@ PhysicalObject::PhysicalObject(const XMLNode &xml_node) if (shape=="cone" ) m_body_type = MP_CONE; else if(shape=="box" ) m_body_type = MP_BOX; else if(shape=="sphere" ) m_body_type = MP_SPHERE; - + else fprintf(stderr, "Unknown shape type : %s\n", shape.c_str()); + m_init_pos.setIdentity(); m_init_pos.setOrigin(m_init_xyz);