From 388ca1288f0e294c66f876293857a183f22ab507 Mon Sep 17 00:00:00 2001 From: GreYFoXGTi Date: Thu, 2 Dec 2010 01:33:02 +0200 Subject: [PATCH] Fixed Tile Parsing Error and Added dbg Messages to show map tiles --- src/game/collision.cpp | 2 +- src/game/server/gamecontext.cpp | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/game/collision.cpp b/src/game/collision.cpp index e17045eb8..be6e5518f 100644 --- a/src/game/collision.cpp +++ b/src/game/collision.cpp @@ -144,7 +144,7 @@ void CCollision::Init(class CLayers *pLayers) } // 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; } } diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index ab27ac78b..de1c54cac 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -1402,15 +1402,30 @@ void CGameContext::OnInit(/*class IKernel *pKernel*/) { int Index = pTiles[y*pTileMap->m_Width+x].m_Index; if(Index == TILE_OLDLASER) + { g_Config.m_SvOldLaser = 1; + dbg_msg("MapTile","Old Laser"); + } else if(Index == TILE_NPC) + { m_Tuning.Set("player_collision",0); + dbg_msg("MapTile","No Collision"); + } else if(Index == TILE_EHOOK) + { g_Config.m_SvEndlessDrag = 1; + dbg_msg("MapTile","No Unlimited hook time"); + } else if(Index == TILE_NOHIT) + { g_Config.m_SvHit = 0; + dbg_msg("MapTile","No Weapons Hitting others"); + } else if(Index == TILE_NPH) + { m_Tuning.Set("player_hooking",0); + dbg_msg("MapTile","No Player Hooking"); + } if(Index >= ENTITY_OFFSET) { vec2 Pos(x*32.0f+16.0f, y*32.0f+16.0f);