mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Add fake tuning for hammer hit
This commit is contained in:
parent
8fdeb9df58
commit
93ce3c84c3
|
@ -1515,11 +1515,15 @@ void CCharacter::HandleTiles(int Index)
|
|||
{
|
||||
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't hit others");
|
||||
m_Hit = DISABLE_HIT_GRENADE|DISABLE_HIT_HAMMER|DISABLE_HIT_RIFLE|DISABLE_HIT_SHOTGUN;
|
||||
m_NeededFaketuning |= FAKETUNE_NOHAMMER;
|
||||
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
|
||||
}
|
||||
else if(((m_TileIndex == TILE_HIT_START) || (m_TileFIndex == TILE_HIT_START)) && m_Hit != HIT_ALL)
|
||||
{
|
||||
GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can hit others");
|
||||
m_Hit = HIT_ALL;
|
||||
m_NeededFaketuning &= ~FAKETUNE_NOHAMMER;
|
||||
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
|
||||
}
|
||||
|
||||
// collide with others
|
||||
|
@ -1704,11 +1708,15 @@ void CCharacter::HandleTiles(int Index)
|
|||
{
|
||||
GameServer()->SendChatTarget(GetPlayer()->GetCID(),"You can hammer hit others");
|
||||
m_Hit &= ~DISABLE_HIT_HAMMER;
|
||||
m_NeededFaketuning &= ~FAKETUNE_NOHAMMER;
|
||||
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
|
||||
}
|
||||
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_END && !(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;
|
||||
m_NeededFaketuning |= FAKETUNE_NOHAMMER;
|
||||
GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings
|
||||
}
|
||||
else if(GameServer()->Collision()->IsSwitch(MapIndex) == TILE_HIT_START && m_Hit&DISABLE_HIT_SHOTGUN && GameServer()->Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN)
|
||||
{
|
||||
|
|
|
@ -26,6 +26,7 @@ enum
|
|||
FAKETUNE_NOCOLL = 8,
|
||||
FAKETUNE_NOHOOK = 16,
|
||||
FAKETUNE_JETPACK = 32,
|
||||
FAKETUNE_NOHAMMER = 64,
|
||||
};
|
||||
|
||||
class CCharacter : public CEntity
|
||||
|
|
|
@ -553,6 +553,11 @@ void CGameContext::SendTuningParams(int ClientID, int Zone)
|
|||
{
|
||||
Msg.AddInt(0);
|
||||
}
|
||||
else if((i==36) // hammer hit
|
||||
&& m_apPlayers[ClientID]->GetCharacter()->NeededFaketuning() & FAKETUNE_NOHAMMER)
|
||||
{
|
||||
Msg.AddInt(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
Msg.AddInt(pParams[i]);
|
||||
|
|
Loading…
Reference in a new issue