Merge branch 'master' into warnings
This commit is contained in:
commit
8b83c1a653
@ -1522,7 +1522,10 @@ static int tolua_cPluginManager_BindConsoleCommand(lua_State * L)
|
||||
// Read the arguments to this API call:
|
||||
tolua_Error tolua_err;
|
||||
int idx = 1;
|
||||
if (tolua_isusertype(L, 1, "cPluginManager", 0, &tolua_err))
|
||||
if (
|
||||
tolua_isusertype(L, 1, "cPluginManager", 0, &tolua_err) ||
|
||||
tolua_isusertable(L, 1, "cPluginManager", 0, &tolua_err)
|
||||
)
|
||||
{
|
||||
idx++;
|
||||
}
|
||||
|
@ -2453,14 +2453,14 @@ cPlayer * cWorld::FindClosestPlayer(const Vector3d & a_Pos, float a_SightLimit,
|
||||
{
|
||||
cTracer LineOfSight(this);
|
||||
|
||||
float ClosestDistance = a_SightLimit;
|
||||
cPlayer* ClosestPlayer = NULL;
|
||||
double ClosestDistance = a_SightLimit;
|
||||
cPlayer * ClosestPlayer = NULL;
|
||||
|
||||
cCSLock Lock(m_CSPlayers);
|
||||
for (cPlayerList::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||
{
|
||||
Vector3f Pos = (*itr)->GetPosition();
|
||||
float Distance = (Pos - a_Pos).Length();
|
||||
double Distance = (Pos - a_Pos).Length();
|
||||
|
||||
if (Distance < ClosestDistance)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user