diff --git a/src/game/collision.cpp b/src/game/collision.cpp index a0b131b07..f4f4062e5 100644 --- a/src/game/collision.cpp +++ b/src/game/collision.cpp @@ -108,7 +108,7 @@ void CCollision::Init(class CLayers *pLayers) } // DDRace tiles - if(Index == TILE_THROUGH || (Index >= TILE_FREEZE && Index <= TILE_UNFREEZE) || (Index >= TILE_SWITCHOPEN && Index <= TILE_TELECHECKIN) || (Index >= TILE_BEGIN && Index <= TILE_STOPA) || Index == TILE_CP || Index == TILE_CP_F || (Index >= TILE_OLDLASER && Index <= TILE_NPH) || (Index >= TILE_EHOOK_START && Index <= TILE_EHOOK_END) || (Index >= TILE_DFREEZE && Index <= TILE_DUNFREEZE)) + if(Index == TILE_THROUGH || (Index >= TILE_FREEZE && Index <= TILE_UNFREEZE) || (Index >= TILE_SWITCHOPEN && Index <= TILE_TELECHECKIN) || (Index >= TILE_BEGIN && Index <= TILE_STOPA) || Index == TILE_CP || Index == TILE_CP_F || (Index >= TILE_OLDLASER && Index <= TILE_NPH) || (Index >= TILE_EHOOK_START && Index <= TILE_HIT_END) || (Index >= TILE_DFREEZE && Index <= TILE_DUNFREEZE)) m_pFront[i].m_Index = Index; } } @@ -134,7 +134,7 @@ void CCollision::Init(class CLayers *pLayers) } // DDRace tiles - if(Index == TILE_THROUGH || (Index >= TILE_FREEZE && Index <= TILE_UNFREEZE) || (Index >= TILE_SWITCHOPEN && Index <= TILE_TELECHECKIN) || (Index >= TILE_BEGIN && Index <= TILE_STOPA) || Index == TILE_CP || Index == TILE_CP_F || (Index >= TILE_OLDLASER && Index <= TILE_NPH) || (Index >= TILE_EHOOK_START && Index <= TILE_EHOOK_END) || (Index >= TILE_DFREEZE && Index <= TILE_DUNFREEZE)) + if(Index == TILE_THROUGH || (Index >= TILE_FREEZE && Index <= TILE_UNFREEZE) || (Index >= TILE_SWITCHOPEN && Index <= TILE_TELECHECKIN) || (Index >= TILE_BEGIN && Index <= TILE_STOPA) || Index == TILE_CP || Index == TILE_CP_F || (Index >= TILE_OLDLASER && Index <= TILE_NPH) || (Index >= TILE_EHOOK_START && Index <= TILE_HIT_END) || (Index >= TILE_DFREEZE && Index <= TILE_DUNFREEZE)) m_pTiles[i].m_Index = Index; } } diff --git a/src/game/mapitems.h b/src/game/mapitems.h index 281d0ad38..7c7d69d00 100644 --- a/src/game/mapitems.h +++ b/src/game/mapitems.h @@ -95,6 +95,8 @@ enum TILE_DUNFREEZE, TILE_EHOOK_START = 17, TILE_EHOOK_END, + TILE_HIT_START, + TILE_HIT_END, //Switches TILE_SWITCHTIMEDOPEN = 22, TILE_SWITCHTIMEDCLOSE, diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 48ef6af4f..33df28a76 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -1234,6 +1234,16 @@ void CCharacter::HandleTiles(int Index) GameServer()->SendChatTarget(GetPlayer()->GetCID(),"Endless hook has been deactivated"); m_EndlessHook = false; } + if(((m_TileIndex == TILE_HIT_START) || (m_TileFIndex == TILE_HIT_START)) && !m_EndlessHook) + { + GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can hit others"); + m_Hit = true; + } + else if(((m_TileIndex == TILE_HIT_END) || (m_TileFIndex == TILE_HIT_END)) && m_EndlessHook) + { + GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can't hit others"); + m_Hit = false; + } if(((m_TileIndex == TILE_STOP && m_TileFlags == ROTATION_270) || (m_TileIndexL == TILE_STOP && m_TileFlagsL == ROTATION_270) || (m_TileIndexL == TILE_STOPS && (m_TileFlagsL == ROTATION_90 || m_TileFlagsL ==ROTATION_270)) || (m_TileIndexL == TILE_STOPA) || (m_TileFIndex == TILE_STOP && m_TileFFlags == ROTATION_270) || (m_TileFIndexL == TILE_STOP && m_TileFFlagsL == ROTATION_270) || (m_TileFIndexL == TILE_STOPS && (m_TileFFlagsL == ROTATION_90 || m_TileFFlagsL == ROTATION_270)) || (m_TileFIndexL == TILE_STOPA) || (m_TileSIndex == TILE_STOP && m_TileSFlags == ROTATION_270) || (m_TileSIndexL == TILE_STOP && m_TileSFlagsL == ROTATION_270) || (m_TileSIndexL == TILE_STOPS && (m_TileSFlagsL == ROTATION_90 || m_TileSFlagsL == ROTATION_270)) || (m_TileSIndexL == TILE_STOPA)) && m_Core.m_Vel.x > 0) { if((int)GameServer()->Collision()->GetPos(MapIndexL).x) diff --git a/src/game/server/entities/character.h b/src/game/server/entities/character.h index 118e7097d..0e7f64ee5 100644 --- a/src/game/server/entities/character.h +++ b/src/game/server/entities/character.h @@ -157,6 +157,7 @@ public: int m_FreezeTick; bool m_DeepFreeze; bool m_EndlessHook; + bool m_Hit; int m_PainSoundTimer; int m_DefEmote; int m_DefEmoteReset;