mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
fixed bam.lua
fixed some compiler warnings
This commit is contained in:
parent
8a3102233f
commit
e7d6c67446
2
bam.lua
2
bam.lua
|
@ -16,7 +16,7 @@ config:Finalize("config.lua")
|
|||
-- data compiler
|
||||
function Script(name)
|
||||
if family == "windows" then
|
||||
str_replace(name, "/", "\\")
|
||||
return str_replace(name, "/", "\\")
|
||||
end
|
||||
return "python " .. name
|
||||
end
|
||||
|
|
|
@ -76,7 +76,7 @@ void CCollision::Init(class CLayers *pLayers)
|
|||
}
|
||||
|
||||
// DDRace tiles
|
||||
if(Index == TILE_THROUGH || Index >= TILE_FREEZE && Index<=TILE_BOOSTS || Index >= TILE_TELEIN && Index<=TILE_STOPA || Index >= TILE_CP_D && Index<=TILE_NPH)
|
||||
if(Index == TILE_THROUGH || (Index >= TILE_FREEZE && Index<=TILE_BOOSTS) || (Index >= TILE_TELEIN && Index<=TILE_STOPA) || (Index >= TILE_CP_D && Index<=TILE_NPH))
|
||||
m_pFront[i].m_Index = Index;
|
||||
}
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ int CCollision::GetPureMapIndex(vec2 Pos)
|
|||
return ny*m_Width+nx;
|
||||
}
|
||||
|
||||
std::list<int> CCollision::GetMapIndices(vec2 PrevPos, vec2 Pos, int MaxIndices)
|
||||
std::list<int> CCollision::GetMapIndices(vec2 PrevPos, vec2 Pos, unsigned MaxIndices)
|
||||
{
|
||||
std::list< int > Indices;
|
||||
float d = distance(PrevPos, Pos);
|
||||
|
@ -574,7 +574,7 @@ int CCollision::IsThrough(int x, int y)
|
|||
int nx = clamp(x/32, 0, m_Width-1);
|
||||
int ny = clamp(y/32, 0, m_Height-1);
|
||||
int Index = m_pTiles[ny*m_Width+nx].m_Index;
|
||||
int Findex;
|
||||
int Findex = 0;
|
||||
if (m_pFront)
|
||||
Findex = m_pFront[ny*m_Width+nx].m_Index;
|
||||
if (Index == TILE_THROUGH)
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
int Entity(int x, int y, bool Front);
|
||||
//DDRace
|
||||
int GetPureMapIndex(vec2 Pos);
|
||||
std::list<int> GetMapIndices(vec2 PrevPos, vec2 Pos, int MaxIndices = 0);
|
||||
std::list<int> GetMapIndices(vec2 PrevPos, vec2 Pos, unsigned MaxIndices = 0);
|
||||
vec2 GetPos(int Index);
|
||||
int GetTileIndex(int Index);
|
||||
int GetFTileIndex(int Index);
|
||||
|
|
Loading…
Reference in a new issue