Skip to content

Commit

Permalink
Add missing include
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed Apr 12, 2018
1 parent 3e18e27 commit 1648a22
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions DaggerXL/DaggerXL_Game.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

#include <cstdlib>

#include "DaggerXL_Game.h"
#include "DaggerXL_Player.h"
#include "Logic_Door.h"
Expand Down Expand Up @@ -188,12 +191,12 @@ bool DaggerXL_Game::PlaceNPC(int32_t newNPC)
int32_t sx, sy;
if ( m_pAPI->Pathing_GetRandomNode(nodeX, nodeY, x, y, z, sx, sy) )
{
float fAngle = (float)(rand()%360) * 0.01745329252f;
float fAngle = (float)(std::rand()%360) * 0.01745329252f;
float dirX = cosf(fAngle);
float dirY = sinf(fAngle);

NPC *pNPC = m_NPC_List[newNPC];
pNPC->Reset(m_pAPI, 385 + (rand()%9), x, y, z, sx, sy, dirX, dirY);
pNPC->Reset(m_pAPI, 385 + (std::rand()%9), x, y, z, sx, sy, dirX, dirY);
pNPC->Enable(m_pAPI, true);
}

Expand Down

0 comments on commit 1648a22

Please sign in to comment.