use TeamMask() instead of Teams()->TeamMask(...) in projectile.cpp and laser.cpp

This commit is contained in:
c0d3d3v 2022-05-04 14:34:58 +02:00
parent 459a845373
commit 917d12e26c
No known key found for this signature in database
GPG key ID: 068AF680530DFF31
2 changed files with 5 additions and 5 deletions

View file

@ -25,7 +25,7 @@ CLaser::CLaser(CGameWorld *pGameWorld, vec2 Pos, vec2 Direction, float StartEner
m_IsBlueTeleport = false;
m_TuneZone = GameServer()->Collision()->IsTune(GameServer()->Collision()->GetMapIndex(m_Pos));
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());
GameWorld()->InsertEntity(this);
@ -277,7 +277,7 @@ void CLaser::Snap(int SnappingClient)
pOwnerChar = GameServer()->GetPlayerChar(m_Owner);
if(pOwnerChar && pOwnerChar->IsAlive())
TeamMask = pOwnerChar->Teams()->TeamMask(pOwnerChar->Team(), -1, m_Owner);
TeamMask = pOwnerChar->TeamMask();
if(SnappingClient != SERVER_DEMO_CLIENT && !CmaskIsSet(TeamMask, SnappingClient))
return;

View file

@ -143,7 +143,7 @@ void CProjectile::Tick()
}
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))
{
@ -257,7 +257,7 @@ void CProjectile::Tick()
TeamMask = -1LL;
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()),
@ -333,7 +333,7 @@ void CProjectile::Snap(int SnappingClient)
pOwnerChar = GameServer()->GetPlayerChar(m_Owner);
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))
return;