Apply NetBSD fix from bug tracker

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7075 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-12-18 15:05:49 +00:00
parent 47661bf772
commit c78a85ea68
3 changed files with 6 additions and 3 deletions

View File

@ -45,7 +45,7 @@ subject to the following restrictions:
#if defined (WIN32)
#include <malloc.h>
#else
#if defined (__FreeBSD__)
#if defined (__FreeBSD__) || defined (__NetBSD__)
#include <stdlib.h>
#else
#include <alloca.h>

View File

@ -36,7 +36,7 @@ subject to the following restrictions:
#if defined (WIN32)
#include <malloc.h>
#else
#if defined (__FreeBSD__)
#if defined (__FreeBSD__) || defined (__NetBSD__)
#include <stdlib.h>
#else
#include <alloca.h>

View File

@ -246,12 +246,15 @@ bool KartModel::loadModels(const KartProperties &kart_properties)
}
Vec3 min, max;
MeshTools::minMax3D(m_mesh, &min, &max);
MeshTools::minMax3D(m_mesh->getMesh(m_animation_frame[AF_STRAIGHT]), &min, &max);
Vec3 size = max-min;
m_kart_width = size.getX();
m_kart_height = size.getY();
m_kart_length = size.getZ();
printf("<%s> : %f, %f, %f\n", m_model_filename.c_str(), m_kart_width, m_kart_height, m_kart_length);
// Now set default some default parameters (if not defined) that
// depend on the size of the kart model (wheel position, center
// of gravity shift)