Skip to content

Commit

Permalink
UPBGE: Fix compilation error/warnings on MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
youle31 committed Dec 17, 2017
1 parent fe801b4 commit fa9079f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion source/gameengine/Converter/BL_ConvertObjectInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
#include <vector>

struct bRigidBodyJointConstraint;
struct Object;

struct BL_ConvertObjectInfo
class BL_ConvertObjectInfo
{
public:
/// Blender object used during conversion.
Object *m_blenderObject;
/// Object constraints defined by the user.
Expand Down
16 changes: 9 additions & 7 deletions source/gameengine/Ketsji/KX_NavMeshObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
#include "DNA_meshdata_types.h"

extern "C" {
#include "BKE_scene.h"
#include "BKE_customdata.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_DerivedMesh.h"
#include "BKE_navmesh_conversion.h"
# include "BKE_scene.h"
# include "BKE_customdata.h"
# include "BKE_cdderivedmesh.h"
# include "BKE_DerivedMesh.h"
# include "BKE_navmesh_conversion.h"

# include "BLI_alloca.h"
}

#include "KX_Globals.h"
Expand Down Expand Up @@ -599,10 +601,10 @@ KX_NavMeshObject::PathType KX_NavMeshObject::FindPath(const mt::vec3& from, cons
dtStatPolyRef ePolyRef = m_navMesh->findNearestPoly(localto.Data(), polyPickExt);

if (sPolyRef && ePolyRef) {
dtStatPolyRef polys[maxPathLen];
dtStatPolyRef *polys = (dtStatPolyRef *)BLI_array_alloca(polys, maxPathLen);
const unsigned int npolys = m_navMesh->findPath(sPolyRef, ePolyRef, localfrom.Data(), localto.Data(), polys, maxPathLen);
if (npolys > 0) {
float points[maxPathLen][3];
float(*points)[3] = (float(*)[3])BLI_array_alloca(points, maxPathLen);
const unsigned int pathLen = m_navMesh->findStraightPath(localfrom.Data(), localto.Data(), polys, npolys,
&points[0][0], maxPathLen);

Expand Down

0 comments on commit fa9079f

Please sign in to comment.