Fixed Tile Parsing Error and Added dbg Messages to show map tiles

This commit is contained in:
GreYFoXGTi 2010-12-02 01:33:02 +02:00
parent 326c46551c
commit 388ca1288f
2 changed files with 16 additions and 1 deletions

View file

@ -144,7 +144,7 @@ void CCollision::Init(class CLayers *pLayers)
} }
// DDRace tiles // DDRace tiles
if(Index == TILE_THROUGH || (Index >= TILE_FREEZE && Index <= TILE_UNFREEZE) || (Index >= TILE_SWITCHOPEN && Index<=TILE_BOOST) || (Index >= TILE_BEGIN && Index <= TILE_STOPA) || Index == TILE_CP || Index == TILE_CP_F || (Index >= TILE_NPC && Index <= TILE_NPH)) if(Index == TILE_THROUGH || (Index >= TILE_FREEZE && Index <= TILE_UNFREEZE) || (Index >= TILE_SWITCHOPEN && Index<=TILE_BOOST) || (Index >= TILE_BEGIN && Index <= TILE_STOPA) || Index == TILE_CP || Index == TILE_CP_F || (Index >= TILE_OLDLASER && Index <= TILE_NPH))
m_pTiles[i].m_Index = Index; m_pTiles[i].m_Index = Index;
} }
} }

View file

@ -1402,15 +1402,30 @@ void CGameContext::OnInit(/*class IKernel *pKernel*/)
{ {
int Index = pTiles[y*pTileMap->m_Width+x].m_Index; int Index = pTiles[y*pTileMap->m_Width+x].m_Index;
if(Index == TILE_OLDLASER) if(Index == TILE_OLDLASER)
{
g_Config.m_SvOldLaser = 1; g_Config.m_SvOldLaser = 1;
dbg_msg("MapTile","Old Laser");
}
else if(Index == TILE_NPC) else if(Index == TILE_NPC)
{
m_Tuning.Set("player_collision",0); m_Tuning.Set("player_collision",0);
dbg_msg("MapTile","No Collision");
}
else if(Index == TILE_EHOOK) else if(Index == TILE_EHOOK)
{
g_Config.m_SvEndlessDrag = 1; g_Config.m_SvEndlessDrag = 1;
dbg_msg("MapTile","No Unlimited hook time");
}
else if(Index == TILE_NOHIT) else if(Index == TILE_NOHIT)
{
g_Config.m_SvHit = 0; g_Config.m_SvHit = 0;
dbg_msg("MapTile","No Weapons Hitting others");
}
else if(Index == TILE_NPH) else if(Index == TILE_NPH)
{
m_Tuning.Set("player_hooking",0); m_Tuning.Set("player_hooking",0);
dbg_msg("MapTile","No Player Hooking");
}
if(Index >= ENTITY_OFFSET) if(Index >= ENTITY_OFFSET)
{ {
vec2 Pos(x*32.0f+16.0f, y*32.0f+16.0f); vec2 Pos(x*32.0f+16.0f, y*32.0f+16.0f);