Fix: Proper super on DDRace 16 player servers

This commit is contained in:
def 2014-01-21 18:21:01 +01:00
parent 4114e00564
commit fe7f274023
5 changed files with 15 additions and 7 deletions

View file

@ -629,6 +629,8 @@ void CGameClient::OnMessage(int MsgId, CUnpacker *pUnpacker)
m_Teams.Team(13, pMsg->m_Tee13);
m_Teams.Team(14, pMsg->m_Tee14);
m_Teams.Team(15, pMsg->m_Tee15);
m_Teams.m_IsDDRace16 = true;
}
else if(MsgId == NETMSGTYPE_SV_PLAYERTIME)
{

View file

@ -576,7 +576,7 @@ void CCharacterCore::Quantize()
bool CCharacterCore::IsRightTeam(int MapIndex)
{
if(Collision()->m_pSwitchers)
if(m_pTeams->Team(m_Id) != TEAM_SUPER)
if(m_pTeams->Team(m_Id) != m_pTeams->m_IsDDRace16 ? VANILLA_TEAM_SUPER : TEAM_SUPER)
return Collision()->m_pSwitchers[Collision()->GetDTileNumber(MapIndex)].m_Status[m_pTeams->Team(m_Id)];
return false;
}

View file

@ -189,9 +189,13 @@ void CGameTeams::SetForceCharacterTeam(int ClientID, int Team)
//for (int LoopClientID = 0; LoopClientID < MAX_CLIENTS; ++LoopClientID)
//{
// if (GetPlayer(LoopClientID)
// && GetPlayer(LoopClientID)->m_IsUsingDDRaceClient)
// SendTeamsState(LoopClientID);
// if (GetPlayer(LoopClientID))
// {
// if (((CServer *) Server())->m_aClients[LoopClientID].m_CustClt)
// SendTeamsState64(LoopClientID);
// else if (GetPlayer(LoopClientID)->m_IsUsingDDRaceClient)
// SendTeamsState(LoopClientID);
// }
//}
}
@ -325,7 +329,6 @@ void CGameTeams::SendTeamsState(int ClientID)
Msg.m_Tee15 = m_Core.Team(15);
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL, ClientID);
}
int CGameTeams::GetDDRaceState(CPlayer* Player)

View file

@ -23,7 +23,7 @@ void CTeamsCore::Team(int ClientID, int Team)
bool CTeamsCore::CanCollide(int ClientID1, int ClientID2)
{
if (m_Team[ClientID1] == TEAM_SUPER || m_Team[ClientID2] == TEAM_SUPER
if (m_Team[ClientID1] == m_IsDDRace16 ? VANILLA_TEAM_SUPER : TEAM_SUPER || m_Team[ClientID2] == m_IsDDRace16 ? VANILLA_TEAM_SUPER : TEAM_SUPER
|| ClientID1 == ClientID2)
return true;
if (m_IsSolo[ClientID1] || m_IsSolo[ClientID2])
@ -33,6 +33,8 @@ bool CTeamsCore::CanCollide(int ClientID1, int ClientID2)
void CTeamsCore::Reset()
{
m_IsDDRace16 = false;
for (int i = 0; i < MAX_CLIENTS; ++i)
{
m_Team[i] = TEAM_FLOCK;

View file

@ -6,7 +6,7 @@
enum
{
TEAM_FLOCK = 0, TEAM_SUPER = MAX_CLIENTS
TEAM_FLOCK = 0, TEAM_SUPER = MAX_CLIENTS, VANILLA_TEAM_SUPER = VANILLA_MAX_CLIENTS
};
class CTeamsCore
@ -15,6 +15,7 @@ class CTeamsCore
int m_Team[MAX_CLIENTS];
bool m_IsSolo[MAX_CLIENTS];
public:
bool m_IsDDRace16;
CTeamsCore(void);