clang-format: fix style

This commit is contained in:
def 2020-09-14 16:00:32 +02:00
parent be90f3f48b
commit a67a8e36aa
6 changed files with 126 additions and 137 deletions

View file

@ -127,9 +127,7 @@ void CCollision::Init(class CLayers *pLayers)
if(Index <= TILE_NPH_ENABLE)
{
if((Index >= TILE_JUMP && Index <= TILE_SUBSTRACT_TIME)
|| Index == TILE_ALLOW_TELE_GUN
|| Index == TILE_ALLOW_BLUE_TELE_GUN)
if((Index >= TILE_JUMP && Index <= TILE_SUBSTRACT_TIME) || Index == TILE_ALLOW_TELE_GUN || Index == TILE_ALLOW_BLUE_TELE_GUN)
m_pSwitch[i].m_Type = Index;
else
m_pSwitch[i].m_Type = 0;

View file

@ -957,8 +957,7 @@ int CEditorMap::Load(class IStorage *pStorage, const char *pFileName, int Storag
TILE_ADD_TIME,
TILE_SUBSTRACT_TIME,
TILE_ALLOW_TELE_GUN,
TILE_ALLOW_BLUE_TELE_GUN
};
TILE_ALLOW_BLUE_TELE_GUN};
CSwitchTile *pLayerSwitchTiles = ((CLayerSwitch *)pTiles)->m_pSwitchTile;
mem_copy(((CLayerSwitch *)pTiles)->m_pSwitchTile, pSwitchData, pTiles->m_Width*pTiles->m_Height*sizeof(CSwitchTile));

View file

@ -309,22 +309,22 @@ int CLayerTiles::BrushGrab(CLayerGroup *pBrush, CUIRect Rect)
for(int y = 0; y < r.h; y++)
for(int x = 0; x < r.w; x++)
{
pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x] = ((CLayerSwitch*)this)->m_pSwitchTile[(r.y+y)*m_Width+(r.x+x)];
if(pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == ENTITY_DOOR + ENTITY_OFFSET
|| pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == TILE_HIT_ENABLE
|| pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == TILE_HIT_DISABLE
|| pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == TILE_SWITCHOPEN
|| pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == TILE_SWITCHCLOSE
|| pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == TILE_SWITCHTIMEDOPEN
|| pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == TILE_SWITCHTIMEDCLOSE
|| pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == ENTITY_LASER_LONG + ENTITY_OFFSET
|| pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == ENTITY_LASER_MEDIUM + ENTITY_OFFSET
|| pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == ENTITY_LASER_SHORT + ENTITY_OFFSET
|| pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == TILE_JUMP
|| pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == TILE_ADD_TIME
|| pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == TILE_SUBSTRACT_TIME
|| pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == TILE_ALLOW_TELE_GUN
|| pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Type == TILE_ALLOW_BLUE_TELE_GUN)
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x] = ((CLayerSwitch *)this)->m_pSwitchTile[(r.y + y) * m_Width + (r.x + x)];
if(pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == ENTITY_DOOR + ENTITY_OFFSET ||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_HIT_ENABLE ||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_HIT_DISABLE ||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_SWITCHOPEN ||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_SWITCHCLOSE ||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_SWITCHTIMEDOPEN ||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_SWITCHTIMEDCLOSE ||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == ENTITY_LASER_LONG + ENTITY_OFFSET ||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == ENTITY_LASER_MEDIUM + ENTITY_OFFSET ||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == ENTITY_LASER_SHORT + ENTITY_OFFSET ||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_JUMP ||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_ADD_TIME ||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_SUBSTRACT_TIME ||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_ALLOW_TELE_GUN ||
pGrabbed->m_pSwitchTile[y * pGrabbed->m_Width + x].m_Type == TILE_ALLOW_BLUE_TELE_GUN)
{
m_pEditor->m_SwitchNum = pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Number;
m_pEditor->m_SwitchDelay = pGrabbed->m_pSwitchTile[y*pGrabbed->m_Width+x].m_Delay;
@ -360,8 +360,8 @@ int CLayerTiles::BrushGrab(CLayerGroup *pBrush, CUIRect Rect)
for(int y = 0; y < r.h; y++)
for(int x = 0; x < r.w; x++)
{
pGrabbed->m_pTuneTile[y*pGrabbed->m_Width+x] = ((CLayerTune*)this)->m_pTuneTile[(r.y+y)*m_Width+(r.x+x)];
if(pGrabbed->m_pTuneTile[y*pGrabbed->m_Width+x].m_Type == TILE_TUNE)
pGrabbed->m_pTuneTile[y * pGrabbed->m_Width + x] = ((CLayerTune *)this)->m_pTuneTile[(r.y + y) * m_Width + (r.x + x)];
if(pGrabbed->m_pTuneTile[y * pGrabbed->m_Width + x].m_Type == TILE_TUNE)
{
m_pEditor->m_TuningNum = pGrabbed->m_pTuneTile[y*pGrabbed->m_Width+x].m_Number;
}

View file

@ -3,59 +3,56 @@
bool IsValidGameTile(int Index)
{
return (
Index == TILE_AIR
|| (Index >= TILE_SOLID && Index <= TILE_THROUGH)
|| Index == TILE_FREEZE
|| (Index >= TILE_UNFREEZE && Index <= TILE_DUNFREEZE)
|| (Index >= TILE_WALLJUMP && Index <= TILE_SOLO_DISABLE)
|| (Index >= TILE_REFILL_JUMPS && Index <= TILE_STOPA)
|| (Index >= TILE_CP && Index <= TILE_THROUGH_DIR)
|| (Index >= TILE_OLDLASER && Index <= TILE_UNLOCK_TEAM)
|| (Index >= TILE_NPC_DISABLE && Index <= TILE_NPH_DISABLE)
|| (Index >= TILE_TELE_GUN_ENABLE && Index <= TILE_TELE_GUN_DISABLE)
|| (Index >= TILE_TELE_GRENADE_ENABLE && Index <= TILE_TELE_GRENADE_DISABLE)
|| (Index >= TILE_TELE_LASER_ENABLE && Index <= TILE_TELE_LASER_DISABLE)
|| (Index >= TILE_NPC_ENABLE && Index <= TILE_NPH_ENABLE)
|| (Index >= TILE_ENTITIES_OFF_1 && Index <= TILE_ENTITIES_OFF_2)
|| IsValidEntity(Index)
);
Index == TILE_AIR ||
(Index >= TILE_SOLID && Index <= TILE_THROUGH) ||
Index == TILE_FREEZE ||
(Index >= TILE_UNFREEZE && Index <= TILE_DUNFREEZE) ||
(Index >= TILE_WALLJUMP && Index <= TILE_SOLO_DISABLE) ||
(Index >= TILE_REFILL_JUMPS && Index <= TILE_STOPA) ||
(Index >= TILE_CP && Index <= TILE_THROUGH_DIR) ||
(Index >= TILE_OLDLASER && Index <= TILE_UNLOCK_TEAM) ||
(Index >= TILE_NPC_DISABLE && Index <= TILE_NPH_DISABLE) ||
(Index >= TILE_TELE_GUN_ENABLE && Index <= TILE_TELE_GUN_DISABLE) ||
(Index >= TILE_TELE_GRENADE_ENABLE && Index <= TILE_TELE_GRENADE_DISABLE) ||
(Index >= TILE_TELE_LASER_ENABLE && Index <= TILE_TELE_LASER_DISABLE) ||
(Index >= TILE_NPC_ENABLE && Index <= TILE_NPH_ENABLE) ||
(Index >= TILE_ENTITIES_OFF_1 && Index <= TILE_ENTITIES_OFF_2) ||
IsValidEntity(Index));
}
bool IsValidFrontTile(int Index)
{
return (
Index == TILE_AIR
|| Index == TILE_DEATH
|| (Index >= TILE_NOLASER && Index <= TILE_THROUGH)
|| Index == TILE_FREEZE
|| (Index >= TILE_UNFREEZE && Index <= TILE_DUNFREEZE)
|| (Index >= TILE_WALLJUMP && Index <= TILE_SOLO_DISABLE)
|| (Index >= TILE_REFILL_JUMPS && Index <= TILE_STOPA)
|| (Index >= TILE_CP && Index <= TILE_THROUGH_DIR)
|| (Index >= TILE_OLDLASER && Index <= TILE_UNLOCK_TEAM)
|| (Index >= TILE_NPC_DISABLE && Index <= TILE_NPH_DISABLE)
|| (Index >= TILE_TELE_GUN_ENABLE && Index <= TILE_ALLOW_BLUE_TELE_GUN)
|| (Index >= TILE_TELE_GRENADE_ENABLE && Index <= TILE_TELE_GRENADE_DISABLE)
|| (Index >= TILE_TELE_LASER_ENABLE && Index <= TILE_TELE_LASER_DISABLE)
|| (Index >= TILE_NPC_ENABLE && Index <= TILE_NPH_ENABLE)
|| (Index >= TILE_ENTITIES_OFF_1 && Index <= TILE_ENTITIES_OFF_2)
|| IsValidEntity(Index)
);
Index == TILE_AIR ||
Index == TILE_DEATH ||
(Index >= TILE_NOLASER && Index <= TILE_THROUGH) ||
Index == TILE_FREEZE ||
(Index >= TILE_UNFREEZE && Index <= TILE_DUNFREEZE) ||
(Index >= TILE_WALLJUMP && Index <= TILE_SOLO_DISABLE) ||
(Index >= TILE_REFILL_JUMPS && Index <= TILE_STOPA) ||
(Index >= TILE_CP && Index <= TILE_THROUGH_DIR) ||
(Index >= TILE_OLDLASER && Index <= TILE_UNLOCK_TEAM) ||
(Index >= TILE_NPC_DISABLE && Index <= TILE_NPH_DISABLE) ||
(Index >= TILE_TELE_GUN_ENABLE && Index <= TILE_ALLOW_BLUE_TELE_GUN) ||
(Index >= TILE_TELE_GRENADE_ENABLE && Index <= TILE_TELE_GRENADE_DISABLE) ||
(Index >= TILE_TELE_LASER_ENABLE && Index <= TILE_TELE_LASER_DISABLE) ||
(Index >= TILE_NPC_ENABLE && Index <= TILE_NPH_ENABLE) ||
(Index >= TILE_ENTITIES_OFF_1 && Index <= TILE_ENTITIES_OFF_2) ||
IsValidEntity(Index));
}
bool IsValidTeleTile(int Index)
{
return (
Index == TILE_TELEINEVIL
|| Index == TILE_TELEINWEAPON
|| Index == TILE_TELEINHOOK
|| Index == TILE_TELEIN
|| Index == TILE_TELEOUT
|| Index == TILE_TELECHECK
|| Index == TILE_TELECHECKOUT
|| Index == TILE_TELECHECKIN
|| Index == TILE_TELECHECKINEVIL
);
Index == TILE_TELEINEVIL ||
Index == TILE_TELEINWEAPON ||
Index == TILE_TELEINHOOK ||
Index == TILE_TELEIN ||
Index == TILE_TELEOUT ||
Index == TILE_TELECHECK ||
Index == TILE_TELECHECKOUT ||
Index == TILE_TELECHECKIN ||
Index == TILE_TELECHECKINEVIL);
}
bool IsValidSpeedupTile(int Index)
@ -66,19 +63,18 @@ bool IsValidSpeedupTile(int Index)
bool IsValidSwitchTile(int Index)
{
return (
Index == TILE_JUMP
|| Index == TILE_FREEZE
|| Index == TILE_DFREEZE
|| Index == TILE_DUNFREEZE
|| Index == TILE_HIT_ENABLE
|| Index == TILE_HIT_DISABLE
|| (Index >= TILE_SWITCHTIMEDOPEN && Index <= TILE_SWITCHCLOSE)
|| Index == TILE_ADD_TIME
|| Index == TILE_SUBSTRACT_TIME
|| Index == TILE_ALLOW_TELE_GUN
|| Index == TILE_ALLOW_BLUE_TELE_GUN
|| IsValidEntity(Index)
);
Index == TILE_JUMP ||
Index == TILE_FREEZE ||
Index == TILE_DFREEZE ||
Index == TILE_DUNFREEZE ||
Index == TILE_HIT_ENABLE ||
Index == TILE_HIT_DISABLE ||
(Index >= TILE_SWITCHTIMEDOPEN && Index <= TILE_SWITCHCLOSE) ||
Index == TILE_ADD_TIME ||
Index == TILE_SUBSTRACT_TIME ||
Index == TILE_ALLOW_TELE_GUN ||
Index == TILE_ALLOW_BLUE_TELE_GUN ||
IsValidEntity(Index));
}
bool IsValidTuneTile(int Index)
@ -90,38 +86,35 @@ bool IsValidEntity(int Index)
{
Index -= ENTITY_OFFSET;
return (
(Index >= ENTITY_SPAWN && Index <= ENTITY_LASER_O_FAST)
|| (Index >= ENTITY_PLASMAE && Index <= ENTITY_CRAZY_SHOTGUN)
|| (Index >= ENTITY_DRAGGER_WEAK && Index <= ENTITY_DRAGGER_STRONG_NW)
|| Index == ENTITY_DOOR
);
(Index >= ENTITY_SPAWN && Index <= ENTITY_LASER_O_FAST) ||
(Index >= ENTITY_PLASMAE && Index <= ENTITY_CRAZY_SHOTGUN) ||
(Index >= ENTITY_DRAGGER_WEAK && Index <= ENTITY_DRAGGER_STRONG_NW) ||
Index == ENTITY_DOOR);
}
bool IsRotatableTile(int Index)
{
return (
Index == TILE_STOP
|| Index == TILE_STOPS
|| Index == TILE_CP
|| Index == TILE_CP_F
|| Index == TILE_THROUGH_DIR
|| Index == TILE_ENTITIES_OFF_1
|| Index == TILE_ENTITIES_OFF_2
|| Index - ENTITY_OFFSET == ENTITY_CRAZY_SHOTGUN_EX
|| Index - ENTITY_OFFSET == ENTITY_CRAZY_SHOTGUN
);
Index == TILE_STOP ||
Index == TILE_STOPS ||
Index == TILE_CP ||
Index == TILE_CP_F ||
Index == TILE_THROUGH_DIR ||
Index == TILE_ENTITIES_OFF_1 ||
Index == TILE_ENTITIES_OFF_2 ||
Index - ENTITY_OFFSET == ENTITY_CRAZY_SHOTGUN_EX ||
Index - ENTITY_OFFSET == ENTITY_CRAZY_SHOTGUN);
}
bool IsCreditsTile(int TileIndex)
{
return (
(TILE_CREDITS_1 == TileIndex)
|| (TILE_CREDITS_2 == TileIndex)
|| (TILE_CREDITS_3 == TileIndex)
|| (TILE_CREDITS_4 == TileIndex)
|| (TILE_CREDITS_5 == TileIndex)
|| (TILE_CREDITS_6 == TileIndex)
|| (TILE_CREDITS_7 == TileIndex)
|| (TILE_CREDITS_8 == TileIndex)
);
(TILE_CREDITS_1 == TileIndex) ||
(TILE_CREDITS_2 == TileIndex) ||
(TILE_CREDITS_3 == TileIndex) ||
(TILE_CREDITS_4 == TileIndex) ||
(TILE_CREDITS_5 == TileIndex) ||
(TILE_CREDITS_6 == TileIndex) ||
(TILE_CREDITS_7 == TileIndex) ||
(TILE_CREDITS_8 == TileIndex));
}

View file

@ -9,7 +9,7 @@
enum
{
// TODO(Shereef Marzouk): fix this for vanilla, make use of LAYERTYPE_GAME instead of using m_game variable in the editor.
LAYERTYPE_INVALID=0,
LAYERTYPE_INVALID = 0,
LAYERTYPE_GAME,
LAYERTYPE_TILES,
LAYERTYPE_QUADS,
@ -21,7 +21,7 @@ enum
LAYERTYPE_SOUNDS_DEPRECATED, // deprecated! do not use this, this is just for compatibility reasons
LAYERTYPE_SOUNDS,
MAPITEMTYPE_VERSION=0,
MAPITEMTYPE_VERSION = 0,
MAPITEMTYPE_INFO,
MAPITEMTYPE_IMAGE,
MAPITEMTYPE_ENVELOPE,
@ -33,8 +33,7 @@ enum
// format with UUIDs. See src/engine/shared/datafile.cpp for some of
// the implementation.
CURVETYPE_STEP=0,
CURVETYPE_STEP = 0,
CURVETYPE_LINEAR,
CURVETYPE_SLOW,
CURVETYPE_FAST,
@ -43,7 +42,7 @@ enum
// game layer tiles
// TODO define which Layer uses which tiles (needed for mapeditor)
ENTITY_NULL=0,
ENTITY_NULL = 0,
ENTITY_SPAWN,
ENTITY_SPAWN_RED,
ENTITY_SPAWN_BLUE,
@ -74,7 +73,7 @@ enum
ENTITY_LASER_O_NORMAL,
ENTITY_LASER_O_FAST,
//DDRace - Plasma
ENTITY_PLASMAE=29,
ENTITY_PLASMAE = 29,
ENTITY_PLASMAF,
ENTITY_PLASMA,
ENTITY_PLASMAU,
@ -82,7 +81,7 @@ enum
ENTITY_CRAZY_SHOTGUN_EX,
ENTITY_CRAZY_SHOTGUN,
//DDRace - Draggers
ENTITY_DRAGGER_WEAK=42,
ENTITY_DRAGGER_WEAK = 42,
ENTITY_DRAGGER_NORMAL,
ENTITY_DRAGGER_STRONG,
//Draggers Behind Walls
@ -90,12 +89,12 @@ enum
ENTITY_DRAGGER_NORMAL_NW,
ENTITY_DRAGGER_STRONG_NW,
//Doors
ENTITY_DOOR=49,
ENTITY_DOOR = 49,
//End Of Lower Tiles
NUM_ENTITIES,
//Start From Top Left
//Tile Controllers
TILE_AIR=0,
TILE_AIR = 0,
TILE_SOLID,
TILE_DEATH,
TILE_NOHOOK,
@ -178,7 +177,7 @@ enum
TILE_ENTITIES_OFF_2,
//End of higher tiles
//Layers
LAYER_GAME=0,
LAYER_GAME = 0,
LAYER_FRONT,
LAYER_TELE,
LAYER_SPEEDUP,
@ -186,25 +185,25 @@ enum
LAYER_TUNE,
NUM_LAYERS,
//Flags
TILEFLAG_VFLIP=1,
TILEFLAG_HFLIP=2,
TILEFLAG_OPAQUE=4,
TILEFLAG_ROTATE=8,
TILEFLAG_VFLIP = 1,
TILEFLAG_HFLIP = 2,
TILEFLAG_OPAQUE = 4,
TILEFLAG_ROTATE = 8,
//Rotation
ROTATION_0 = 0,
ROTATION_90 = TILEFLAG_ROTATE,
ROTATION_180 = (TILEFLAG_VFLIP|TILEFLAG_HFLIP),
ROTATION_270 = (TILEFLAG_VFLIP|TILEFLAG_HFLIP|TILEFLAG_ROTATE),
ROTATION_180 = (TILEFLAG_VFLIP | TILEFLAG_HFLIP),
ROTATION_270 = (TILEFLAG_VFLIP | TILEFLAG_HFLIP | TILEFLAG_ROTATE),
LAYERFLAG_DETAIL=1,
TILESLAYERFLAG_GAME=1,
TILESLAYERFLAG_TELE=2,
TILESLAYERFLAG_SPEEDUP=4,
TILESLAYERFLAG_FRONT=8,
TILESLAYERFLAG_SWITCH=16,
TILESLAYERFLAG_TUNE=32,
LAYERFLAG_DETAIL = 1,
TILESLAYERFLAG_GAME = 1,
TILESLAYERFLAG_TELE = 2,
TILESLAYERFLAG_SPEEDUP = 4,
TILESLAYERFLAG_FRONT = 8,
TILESLAYERFLAG_SWITCH = 16,
TILESLAYERFLAG_TUNE = 32,
ENTITY_OFFSET=255-16*4,
ENTITY_OFFSET = 255 - 16 * 4,
};
struct CPoint

View file

@ -1614,7 +1614,7 @@ void CCharacter::HandleTiles(int Index)
}
// hit others
if(((m_TileIndex == TILE_HIT_DISABLE) || (m_TileFIndex == TILE_HIT_DISABLE)) && m_Hit != (DISABLE_HIT_GRENADE|DISABLE_HIT_HAMMER|DISABLE_HIT_LASER|DISABLE_HIT_SHOTGUN))
if(((m_TileIndex == TILE_HIT_DISABLE) || (m_TileFIndex == TILE_HIT_DISABLE)) && m_Hit != (DISABLE_HIT_GRENADE | DISABLE_HIT_HAMMER | DISABLE_HIT_LASER | DISABLE_HIT_SHOTGUN))
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't hit others");
m_Hit = DISABLE_HIT_GRENADE|DISABLE_HIT_HAMMER|DISABLE_HIT_LASER|DISABLE_HIT_SHOTGUN;
@ -1838,7 +1838,7 @@ void CCharacter::HandleTiles(int Index)
if(GameServer()->Collision()->GetSwitchNumber(MapIndex) == 0 || GameServer()->Collision()->m_pSwitchers[GameServer()->Collision()->GetSwitchNumber(MapIndex)].m_Status[Team()])
m_DeepFreeze = false;
}
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_ENABLE && m_Hit&DISABLE_HIT_HAMMER && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_HAMMER)
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_ENABLE && m_Hit & DISABLE_HIT_HAMMER && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_HAMMER)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can hammer hit others");
m_Hit &= ~DISABLE_HIT_HAMMER;
@ -1846,7 +1846,7 @@ void CCharacter::HandleTiles(int Index)
m_Core.m_NoHammerHit = false;
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
}
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_DISABLE && !(m_Hit&DISABLE_HIT_HAMMER) && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_HAMMER)
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_DISABLE && !(m_Hit & DISABLE_HIT_HAMMER) && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_HAMMER)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can't hammer hit others");
m_Hit |= DISABLE_HIT_HAMMER;
@ -1854,37 +1854,37 @@ void CCharacter::HandleTiles(int Index)
m_Core.m_NoHammerHit = true;
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
}
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_ENABLE && m_Hit&DISABLE_HIT_SHOTGUN && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN)
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_ENABLE && m_Hit & DISABLE_HIT_SHOTGUN && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can shoot others with shotgun");
m_Hit &= ~DISABLE_HIT_SHOTGUN;
m_Core.m_NoShotgunHit = false;
}
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_DISABLE && !(m_Hit&DISABLE_HIT_SHOTGUN) && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN)
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_DISABLE && !(m_Hit & DISABLE_HIT_SHOTGUN) && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can't shoot others with shotgun");
m_Hit |= DISABLE_HIT_SHOTGUN;
m_Core.m_NoShotgunHit = true;
}
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_ENABLE && m_Hit&DISABLE_HIT_GRENADE && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_GRENADE)
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_ENABLE && m_Hit & DISABLE_HIT_GRENADE && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_GRENADE)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can shoot others with grenade");
m_Hit &= ~DISABLE_HIT_GRENADE;
m_Core.m_NoGrenadeHit = false;
}
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_DISABLE && !(m_Hit&DISABLE_HIT_GRENADE) && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_GRENADE)
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_DISABLE && !(m_Hit & DISABLE_HIT_GRENADE) && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_GRENADE)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can't shoot others with grenade");
m_Hit |= DISABLE_HIT_GRENADE;
m_Core.m_NoGrenadeHit = true;
}
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_ENABLE && m_Hit&DISABLE_HIT_LASER && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER)
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_ENABLE && m_Hit & DISABLE_HIT_LASER && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can shoot others with laser");
m_Hit &= ~DISABLE_HIT_LASER;
m_Core.m_NoLaserHit = false;
}
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_DISABLE && !(m_Hit&DISABLE_HIT_LASER) && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER)
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_DISABLE && !(m_Hit & DISABLE_HIT_LASER) && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER)
{
GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can't shoot others with laser");
m_Hit |= DISABLE_HIT_LASER;