mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Removed multipliers and changed initial layer size
Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
This commit is contained in:
parent
beb2b2802d
commit
9fde901705
Binary file not shown.
Before Width: | Height: | Size: 326 KiB After Width: | Height: | Size: 292 KiB |
Binary file not shown.
Before Width: | Height: | Size: 326 KiB After Width: | Height: | Size: 292 KiB |
|
@ -167,7 +167,7 @@ int CEditor::PopupGroup(CEditor *pEditor, CUIRect View)
|
|||
View.HSplitBottom(12.0f, &View, &Button);
|
||||
static int s_NewQuadLayerButton = 0;
|
||||
//if(pEditor->DoButton_Editor(&s_NewQuadLayerButton, Localize("Add quads layer"), 0, &Button, 0, Localize("Creates a new quad layer")))
|
||||
if(pEditor->DoButton_Editor(&s_NewQuadLayerButton, Localize("Add Quads layer"), 0, &Button, 0, Localize("Creates a new quad layer")))
|
||||
if(pEditor->DoButton_Editor(&s_NewQuadLayerButton, Localize("Add Quads Layer"), 0, &Button, 0, Localize("Creates a new quad layer")))
|
||||
{
|
||||
CLayer *l = new CLayerQuads;
|
||||
l->m_pEditor = pEditor;
|
||||
|
@ -181,9 +181,9 @@ int CEditor::PopupGroup(CEditor *pEditor, CUIRect View)
|
|||
View.HSplitBottom(12.0f, &View, &Button);
|
||||
static int s_NewTileLayerButton = 0;
|
||||
//if(pEditor->DoButton_Editor(&s_NewTileLayerButton, Localize("Add tile layer"), 0, &Button, 0, Localize("Creates a new tile layer")))
|
||||
if(pEditor->DoButton_Editor(&s_NewTileLayerButton, Localize("Add Tile layer"), 0, &Button, 0, Localize("Creates a new tile layer")))
|
||||
if(pEditor->DoButton_Editor(&s_NewTileLayerButton, Localize("Add Tile Layer"), 0, &Button, 0, Localize("Creates a new tile layer")))
|
||||
{
|
||||
CLayer *l = new CLayerTiles(50, 50);
|
||||
CLayer *l = new CLayerTiles(pEditor->m_Map.m_pGameLayer->m_Width, pEditor->m_Map.m_pGameLayer->m_Height);
|
||||
l->m_pEditor = pEditor;
|
||||
pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->AddLayer(l);
|
||||
pEditor->m_SelectedLayer = pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_lLayers.size()-1;
|
||||
|
|
|
@ -104,15 +104,7 @@ enum
|
|||
TILE_TELEINEVIL,
|
||||
TILE_UNFREEZE,
|
||||
TILE_BOOSTS,
|
||||
TILE_BOOST_L=18,
|
||||
TILE_BOOST_R,
|
||||
TILE_BOOST_D,
|
||||
TILE_BOOST_U,
|
||||
TILE_BOOST_L2,
|
||||
TILE_BOOST_R2,
|
||||
TILE_BOOST_D2,
|
||||
TILE_BOOST_U2,
|
||||
TILE_TELEIN,
|
||||
TILE_TELEIN=26,
|
||||
TILE_TELEOUT,
|
||||
TILE_BOOST,
|
||||
TILE_STOPL,
|
||||
|
|
|
@ -867,86 +867,6 @@ void CCharacter::Tick()
|
|||
m_Core.m_Vel.y = 0;
|
||||
m_Core.m_Jumped = 0;
|
||||
}
|
||||
if (m_TileIndex == TILE_BOOST_L || m_TileFIndex == TILE_BOOST_L)
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexL).x)
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexL).x < (int)m_Core.m_Pos.x)
|
||||
m_Core.m_Pos = m_PrevPos;
|
||||
if(m_PrevPos.x-m_Pos.x<0)
|
||||
m_Core.m_Vel.x += m_Core.m_Vel.x *-0.5;
|
||||
else if(m_LastBooster != MapIndex)
|
||||
m_Core.m_Vel.x += m_Core.m_Vel.x*0.5;
|
||||
}
|
||||
if (m_TileIndex == TILE_BOOST_R || m_TileFIndex == TILE_BOOST_R)
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexR).x)
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexR).x > (int)m_Core.m_Pos.x)
|
||||
m_Core.m_Pos = m_PrevPos;
|
||||
if(m_PrevPos.x-m_Pos.x>0)
|
||||
m_Core.m_Vel.x += m_Core.m_Vel.x *-0.5;
|
||||
else if(m_LastBooster != MapIndex)
|
||||
m_Core.m_Vel.x += m_Core.m_Vel.x*0.5;
|
||||
}
|
||||
if (m_TileIndex == TILE_BOOST_D || m_TileFIndex == TILE_BOOST_D)
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexB).y)
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexB).y > (int)m_Core.m_Pos.y)
|
||||
m_Core.m_Pos = m_PrevPos;
|
||||
if(m_PrevPos.y-m_Pos.y>0)
|
||||
m_Core.m_Vel.y += m_Core.m_Vel.y *-0.5;
|
||||
else if(m_LastBooster != MapIndex)
|
||||
m_Core.m_Vel.y += m_Core.m_Vel.y*0.5;
|
||||
}
|
||||
if (m_TileIndex == TILE_BOOST_U || m_TileFIndex == TILE_BOOST_U)
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexT).y)
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexT).y < (int)m_Core.m_Pos.y)
|
||||
m_Core.m_Pos = m_PrevPos;
|
||||
if(m_PrevPos.y-m_Pos.y<0)
|
||||
m_Core.m_Vel.y += m_Core.m_Vel.y *-0.5;
|
||||
else if(m_LastBooster != MapIndex)
|
||||
m_Core.m_Vel.y += m_Core.m_Vel.y*0.5;
|
||||
}
|
||||
if ((m_TileIndex == TILE_BOOST_L2 || m_TileFIndex == TILE_BOOST_L2) && (m_LastBooster != MapIndex))
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexL).x)
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexL).x < (int)m_Core.m_Pos.x)
|
||||
m_Core.m_Pos = m_PrevPos;
|
||||
if(m_PrevPos.x-m_Pos.x<0)
|
||||
m_Core.m_Vel.x = m_Core.m_Vel.x *-1.1;
|
||||
else
|
||||
m_Core.m_Vel.x += m_Core.m_Vel.x*1.1;
|
||||
}
|
||||
if ((m_TileIndex == TILE_BOOST_R2|| m_TileFIndex == TILE_BOOST_R2) && (m_LastBooster != MapIndex))
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexR).x)
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexR).x > (int)m_Core.m_Pos.x)
|
||||
m_Core.m_Pos = m_PrevPos;
|
||||
if(m_Core.m_Vel.x < 0)
|
||||
m_Core.m_Vel.x = m_Core.m_Vel.x *-1.1;
|
||||
else
|
||||
m_Core.m_Vel.x += m_Core.m_Vel.x*1.1;
|
||||
}
|
||||
if ((m_TileIndex == TILE_BOOST_D2 || m_TileFIndex == TILE_BOOST_D2) && (m_LastBooster != MapIndex))
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexB).y)
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexB).y > (int)m_Core.m_Pos.y)
|
||||
m_Core.m_Pos = m_PrevPos;
|
||||
if(m_PrevPos.y-m_Pos.y>0)
|
||||
m_Core.m_Vel.y = m_Core.m_Vel.y *-1.1;
|
||||
else
|
||||
m_Core.m_Vel.y += m_Core.m_Vel.y*1.1;
|
||||
}
|
||||
if ((m_TileIndex == TILE_BOOST_U2 || m_TileFIndex == TILE_BOOST_U2) && (m_LastBooster != MapIndex))
|
||||
{
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexT).y)
|
||||
if((int)GameServer()->Collision()->GetPos(MapIndexT).y < (int)m_Core.m_Pos.y)
|
||||
m_Core.m_Pos = m_PrevPos;
|
||||
if(m_PrevPos.y-m_Pos.y<0)
|
||||
m_Core.m_Vel.y = m_Core.m_Vel.y *-1.1;
|
||||
else
|
||||
m_Core.m_Vel.y += m_Core.m_Vel.y*1.1;
|
||||
}
|
||||
// handle speedup tiles
|
||||
if(GameServer()->Collision()->IsSpeedup(MapIndex) == TILE_BOOST)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue