Merge pull request #1 from mendsley/issue_64bit_arithmetic
Fix 64bit pointer arithmetic warnings
This commit is contained in:
commit
9f632d99fd
@ -218,7 +218,7 @@ class dtCrowd
|
||||
void updateMoveRequest(const float dt);
|
||||
void checkPathValidity(dtCrowdAgent** agents, const int nagents, const float dt);
|
||||
|
||||
inline int getAgentIndex(const dtCrowdAgent* agent) const { return agent - m_agents; }
|
||||
inline int getAgentIndex(const dtCrowdAgent* agent) const { return (int)(agent - m_agents); }
|
||||
|
||||
bool requestMoveTargetReplan(const int idx, dtPolyRef ref, const float* pos);
|
||||
|
||||
|
@ -1118,7 +1118,7 @@ void dtCrowd::update(const float dt, dtCrowdAgentDebugInfo* debug)
|
||||
if (overOffmeshConnection(ag, triggerRadius))
|
||||
{
|
||||
// Prepare to off-mesh connection.
|
||||
const int idx = ag - m_agents;
|
||||
const int idx = (int)(ag - m_agents);
|
||||
dtCrowdAgentAnimation* anim = &m_agentAnims[idx];
|
||||
|
||||
// Adjust the path over the off-mesh connection.
|
||||
|
@ -213,14 +213,14 @@ dtCompressedTile* dtTileCache::getTileAt(const int tx, const int ty, const int t
|
||||
dtCompressedTileRef dtTileCache::getTileRef(const dtCompressedTile* tile) const
|
||||
{
|
||||
if (!tile) return 0;
|
||||
const unsigned int it = tile - m_tiles;
|
||||
const unsigned int it = (unsigned int)(tile - m_tiles);
|
||||
return (dtCompressedTileRef)encodeTileId(tile->salt, it);
|
||||
}
|
||||
|
||||
dtObstacleRef dtTileCache::getObstacleRef(const dtTileCacheObstacle* ob) const
|
||||
{
|
||||
if (!ob) return 0;
|
||||
const unsigned int idx = ob - m_obstacles;
|
||||
const unsigned int idx = (unsigned int)(ob - m_obstacles);
|
||||
return encodeObstacleId(ob->salt, idx);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user