mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
use TeamMask() instead of Teams()->TeamMask(...) in projectile.cpp and laser.cpp
This commit is contained in:
parent
459a845373
commit
917d12e26c
|
@ -25,7 +25,7 @@ CLaser::CLaser(CGameWorld *pGameWorld, vec2 Pos, vec2 Direction, float StartEner
|
||||||
m_IsBlueTeleport = false;
|
m_IsBlueTeleport = false;
|
||||||
m_TuneZone = GameServer()->Collision()->IsTune(GameServer()->Collision()->GetMapIndex(m_Pos));
|
m_TuneZone = GameServer()->Collision()->IsTune(GameServer()->Collision()->GetMapIndex(m_Pos));
|
||||||
CCharacter *pOwnerChar = GameServer()->GetPlayerChar(m_Owner);
|
CCharacter *pOwnerChar = GameServer()->GetPlayerChar(m_Owner);
|
||||||
m_TeamMask = pOwnerChar ? pOwnerChar->Teams()->TeamMask(pOwnerChar->Team(), -1, m_Owner) : 0;
|
m_TeamMask = pOwnerChar ? pOwnerChar->TeamMask() : 0;
|
||||||
m_BelongsToPracticeTeam = pOwnerChar && pOwnerChar->Teams()->IsPractice(pOwnerChar->Team());
|
m_BelongsToPracticeTeam = pOwnerChar && pOwnerChar->Teams()->IsPractice(pOwnerChar->Team());
|
||||||
|
|
||||||
GameWorld()->InsertEntity(this);
|
GameWorld()->InsertEntity(this);
|
||||||
|
@ -277,7 +277,7 @@ void CLaser::Snap(int SnappingClient)
|
||||||
pOwnerChar = GameServer()->GetPlayerChar(m_Owner);
|
pOwnerChar = GameServer()->GetPlayerChar(m_Owner);
|
||||||
|
|
||||||
if(pOwnerChar && pOwnerChar->IsAlive())
|
if(pOwnerChar && pOwnerChar->IsAlive())
|
||||||
TeamMask = pOwnerChar->Teams()->TeamMask(pOwnerChar->Team(), -1, m_Owner);
|
TeamMask = pOwnerChar->TeamMask();
|
||||||
|
|
||||||
if(SnappingClient != SERVER_DEMO_CLIENT && !CmaskIsSet(TeamMask, SnappingClient))
|
if(SnappingClient != SERVER_DEMO_CLIENT && !CmaskIsSet(TeamMask, SnappingClient))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -143,7 +143,7 @@ void CProjectile::Tick()
|
||||||
}
|
}
|
||||||
if(pOwnerChar && pOwnerChar->IsAlive())
|
if(pOwnerChar && pOwnerChar->IsAlive())
|
||||||
{
|
{
|
||||||
TeamMask = pOwnerChar->Teams()->TeamMask(pOwnerChar->Team(), -1, m_Owner);
|
TeamMask = pOwnerChar->TeamMask();
|
||||||
}
|
}
|
||||||
else if(m_Owner >= 0 && (m_Type != WEAPON_GRENADE || g_Config.m_SvDestroyBulletsOnDeath || m_BelongsToPracticeTeam))
|
else if(m_Owner >= 0 && (m_Type != WEAPON_GRENADE || g_Config.m_SvDestroyBulletsOnDeath || m_BelongsToPracticeTeam))
|
||||||
{
|
{
|
||||||
|
@ -257,7 +257,7 @@ void CProjectile::Tick()
|
||||||
TeamMask = -1LL;
|
TeamMask = -1LL;
|
||||||
if(pOwnerChar && pOwnerChar->IsAlive())
|
if(pOwnerChar && pOwnerChar->IsAlive())
|
||||||
{
|
{
|
||||||
TeamMask = pOwnerChar->Teams()->TeamMask(pOwnerChar->Team(), -1, m_Owner);
|
TeamMask = pOwnerChar->TeamMask();
|
||||||
}
|
}
|
||||||
|
|
||||||
GameServer()->CreateExplosion(ColPos, m_Owner, m_Type, m_Owner == -1, (!pOwnerChar ? -1 : pOwnerChar->Team()),
|
GameServer()->CreateExplosion(ColPos, m_Owner, m_Type, m_Owner == -1, (!pOwnerChar ? -1 : pOwnerChar->Team()),
|
||||||
|
@ -333,7 +333,7 @@ void CProjectile::Snap(int SnappingClient)
|
||||||
pOwnerChar = GameServer()->GetPlayerChar(m_Owner);
|
pOwnerChar = GameServer()->GetPlayerChar(m_Owner);
|
||||||
|
|
||||||
if(pOwnerChar && pOwnerChar->IsAlive())
|
if(pOwnerChar && pOwnerChar->IsAlive())
|
||||||
TeamMask = pOwnerChar->Teams()->TeamMask(pOwnerChar->Team(), -1, m_Owner);
|
TeamMask = pOwnerChar->TeamMask();
|
||||||
|
|
||||||
if(SnappingClient != SERVER_DEMO_CLIENT && m_Owner != -1 && !CmaskIsSet(TeamMask, SnappingClient))
|
if(SnappingClient != SERVER_DEMO_CLIENT && m_Owner != -1 && !CmaskIsSet(TeamMask, SnappingClient))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue