mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 18:18:18 +00:00
clang-format fix
This commit is contained in:
parent
d7c8af3182
commit
68a8bbadbc
|
@ -765,7 +765,7 @@ void CCharacter::HandleTiles(int Index)
|
||||||
if(newJumps != m_Core.m_Jumps)
|
if(newJumps != m_Core.m_Jumps)
|
||||||
m_Core.m_Jumps = newJumps;
|
m_Core.m_Jumps = newJumps;
|
||||||
}
|
}
|
||||||
else if(Collision()->GetSwitchType(MapIndex) == TILE_LFREEZE && Team() != TEAM_SUPER)
|
else if(Collision()->GetSwitchType(MapIndex) == TILE_LFREEZE && Team() != TEAM_SUPER)
|
||||||
{
|
{
|
||||||
if(Collision()->GetSwitchNumber(MapIndex) == 0 || Collision()->m_pSwitchers[Collision()->GetSwitchNumber(MapIndex)].m_Status[Team()])
|
if(Collision()->GetSwitchNumber(MapIndex) == 0 || Collision()->m_pSwitchers[Collision()->GetSwitchNumber(MapIndex)].m_Status[Team()])
|
||||||
{
|
{
|
||||||
|
|
|
@ -848,7 +848,7 @@ bool CCollision::TileExists(int Index) const
|
||||||
|
|
||||||
if((m_pTiles[Index].m_Index >= TILE_FREEZE && m_pTiles[Index].m_Index <= TILE_TELE_LASER_DISABLE) || (m_pTiles[Index].m_Index >= TILE_LFREEZE && m_pTiles[Index].m_Index <= TILE_LUNFREEZE))
|
if((m_pTiles[Index].m_Index >= TILE_FREEZE && m_pTiles[Index].m_Index <= TILE_TELE_LASER_DISABLE) || (m_pTiles[Index].m_Index >= TILE_LFREEZE && m_pTiles[Index].m_Index <= TILE_LUNFREEZE))
|
||||||
return true;
|
return true;
|
||||||
if(m_pFront && ((m_pFront[Index].m_Index >= TILE_FREEZE && m_pFront[Index].m_Index <= TILE_TELE_LASER_DISABLE)|| (m_pFront[Index].m_Index >= TILE_LFREEZE && m_pFront[Index].m_Index <= TILE_LUNFREEZE)))
|
if(m_pFront && ((m_pFront[Index].m_Index >= TILE_FREEZE && m_pFront[Index].m_Index <= TILE_TELE_LASER_DISABLE) || (m_pFront[Index].m_Index >= TILE_LFREEZE && m_pFront[Index].m_Index <= TILE_LUNFREEZE)))
|
||||||
return true;
|
return true;
|
||||||
if(m_pTele && (m_pTele[Index].m_Type == TILE_TELEIN || m_pTele[Index].m_Type == TILE_TELEINEVIL || m_pTele[Index].m_Type == TILE_TELECHECKINEVIL || m_pTele[Index].m_Type == TILE_TELECHECK || m_pTele[Index].m_Type == TILE_TELECHECKIN))
|
if(m_pTele && (m_pTele[Index].m_Type == TILE_TELEIN || m_pTele[Index].m_Type == TILE_TELEINEVIL || m_pTele[Index].m_Type == TILE_TELECHECKINEVIL || m_pTele[Index].m_Type == TILE_TELECHECK || m_pTele[Index].m_Type == TILE_TELECHECKIN))
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1397,7 +1397,21 @@ static int s_GametileOpSelected = -1;
|
||||||
|
|
||||||
int CEditor::PopupSelectGametileOp(CEditor *pEditor, CUIRect View, void *pContext)
|
int CEditor::PopupSelectGametileOp(CEditor *pEditor, CUIRect View, void *pContext)
|
||||||
{
|
{
|
||||||
static const char *s_pButtonNames[] = {"Air", "Hookable", "Death", "Unhookable", "Hookthrough", "Freeze", "Unfreeze", "Deep Freeze", "Deep Unfreeze", "Blue Check-Tele", "Red Check-Tele", "Live Freeze", "Live Unfreeze",};
|
static const char *s_pButtonNames[] = {
|
||||||
|
"Air",
|
||||||
|
"Hookable",
|
||||||
|
"Death",
|
||||||
|
"Unhookable",
|
||||||
|
"Hookthrough",
|
||||||
|
"Freeze",
|
||||||
|
"Unfreeze",
|
||||||
|
"Deep Freeze",
|
||||||
|
"Deep Unfreeze",
|
||||||
|
"Blue Check-Tele",
|
||||||
|
"Red Check-Tele",
|
||||||
|
"Live Freeze",
|
||||||
|
"Live Unfreeze",
|
||||||
|
};
|
||||||
static unsigned s_NumButtons = sizeof(s_pButtonNames) / sizeof(char *);
|
static unsigned s_NumButtons = sizeof(s_pButtonNames) / sizeof(char *);
|
||||||
CUIRect Button;
|
CUIRect Button;
|
||||||
|
|
||||||
|
|
|
@ -1294,11 +1294,13 @@ void CCharacter::Snap(int SnappingClient)
|
||||||
pDDNetCharacter->m_Flags |= CHARACTERFLAG_WEAPON_LASER;
|
pDDNetCharacter->m_Flags |= CHARACTERFLAG_WEAPON_LASER;
|
||||||
if(m_Core.m_ActiveWeapon == WEAPON_NINJA)
|
if(m_Core.m_ActiveWeapon == WEAPON_NINJA)
|
||||||
pDDNetCharacter->m_Flags |= CHARACTERFLAG_WEAPON_NINJA;
|
pDDNetCharacter->m_Flags |= CHARACTERFLAG_WEAPON_NINJA;
|
||||||
if(m_Core.m_LiveFrozen) {
|
if(m_Core.m_LiveFrozen)
|
||||||
|
{
|
||||||
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_MOVEMENTS;
|
pDDNetCharacter->m_Flags |= CHARACTERFLAG_NO_MOVEMENTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
pDDNetCharacter->m_FreezeEnd = m_DeepFreeze ? -1 : m_FreezeTime == 0 ? 0 : Server()->Tick() + m_FreezeTime;
|
pDDNetCharacter->m_FreezeEnd = m_DeepFreeze ? -1 : m_FreezeTime == 0 ? 0 :
|
||||||
|
Server()->Tick() + m_FreezeTime;
|
||||||
pDDNetCharacter->m_Jumps = m_Core.m_Jumps;
|
pDDNetCharacter->m_Jumps = m_Core.m_Jumps;
|
||||||
pDDNetCharacter->m_TeleCheckpoint = m_TeleCheckpoint;
|
pDDNetCharacter->m_TeleCheckpoint = m_TeleCheckpoint;
|
||||||
pDDNetCharacter->m_StrongWeakID = m_StrongWeakID;
|
pDDNetCharacter->m_StrongWeakID = m_StrongWeakID;
|
||||||
|
@ -1565,7 +1567,7 @@ void CCharacter::HandleTiles(int Index)
|
||||||
// endless hook
|
// endless hook
|
||||||
if(((m_TileIndex == TILE_EHOOK_ENABLE) || (m_TileFIndex == TILE_EHOOK_ENABLE)))
|
if(((m_TileIndex == TILE_EHOOK_ENABLE) || (m_TileFIndex == TILE_EHOOK_ENABLE)))
|
||||||
{
|
{
|
||||||
SetEndlessHook(true);
|
SetEndlessHook(true);
|
||||||
}
|
}
|
||||||
else if(((m_TileIndex == TILE_EHOOK_DISABLE) || (m_TileFIndex == TILE_EHOOK_DISABLE)))
|
else if(((m_TileIndex == TILE_EHOOK_DISABLE) || (m_TileFIndex == TILE_EHOOK_DISABLE)))
|
||||||
{
|
{
|
||||||
|
@ -1775,9 +1777,10 @@ void CCharacter::HandleTiles(int Index)
|
||||||
if(GameServer()->Collision()->GetSwitchNumber(MapIndex) == 0 || GameServer()->Collision()->m_pSwitchers[GameServer()->Collision()->GetSwitchNumber(MapIndex)].m_Status[Team()])
|
if(GameServer()->Collision()->GetSwitchNumber(MapIndex) == 0 || GameServer()->Collision()->m_pSwitchers[GameServer()->Collision()->GetSwitchNumber(MapIndex)].m_Status[Team()])
|
||||||
m_DeepFreeze = false;
|
m_DeepFreeze = false;
|
||||||
}
|
}
|
||||||
else if(GameServer()->Collision()->GetSwitchType(MapIndex) == TILE_LFREEZE && Team() != TEAM_SUPER)
|
else if(GameServer()->Collision()->GetSwitchType(MapIndex) == TILE_LFREEZE && Team() != TEAM_SUPER)
|
||||||
{
|
{
|
||||||
if (GameServer()->Collision()->GetSwitchNumber(MapIndex) == 0 || GameServer()->Collision()->m_pSwitchers[GameServer()->Collision()->GetSwitchNumber(MapIndex)].m_Status[Team()]) {
|
if(GameServer()->Collision()->GetSwitchNumber(MapIndex) == 0 || GameServer()->Collision()->m_pSwitchers[GameServer()->Collision()->GetSwitchNumber(MapIndex)].m_Status[Team()])
|
||||||
|
{
|
||||||
m_LiveFreeze = true;
|
m_LiveFreeze = true;
|
||||||
m_Core.m_LiveFrozen = true;
|
m_Core.m_LiveFrozen = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue