mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fixed bullet wall stuck when de activated and collides with a tee
This commit is contained in:
parent
2d7eae757e
commit
bf0b4183cc
|
@ -311,7 +311,28 @@ int CCollision::Entity(int x, int y, int Layer)
|
|||
{
|
||||
if((0 > x || x >= m_Width) || (0 > y || y >= m_Height))
|
||||
{
|
||||
dbg_msg("CCollision::Entity","Something is VERY wrong please report this at github");
|
||||
char aBuf[12];
|
||||
switch (Layer)
|
||||
{
|
||||
case LAYER_GAME:
|
||||
str_format(aBuf,sizeof(aBuf), "Game");
|
||||
break;
|
||||
case LAYER_FRONT:
|
||||
str_format(aBuf,sizeof(aBuf), "Front");
|
||||
break;
|
||||
case LAYER_SWITCH:
|
||||
str_format(aBuf,sizeof(aBuf), "Switch");
|
||||
break;
|
||||
case LAYER_TELE:
|
||||
str_format(aBuf,sizeof(aBuf), "Tele");
|
||||
break;
|
||||
case LAYER_SPEEDUP:
|
||||
str_format(aBuf,sizeof(aBuf), "Speedup");
|
||||
break;
|
||||
default:
|
||||
str_format(aBuf,sizeof(aBuf), "Unknown");
|
||||
}
|
||||
dbg_msg("CCollision::Entity","Something is VERY wrong in the layer %s please report this at http://DDRace.info, but you may haven't read the news section so go there and read first", aBuf);
|
||||
return 0;
|
||||
}
|
||||
switch (Layer)
|
||||
|
|
|
@ -95,7 +95,6 @@ void CProjectile::Tick()
|
|||
OwnerChar = GameServer()->GetPlayerChar(m_Owner);
|
||||
|
||||
CCharacter *TargetChr = GameServer()->m_World.IntersectCharacter(PrevPos, ColPos, (m_Freeze) ? 1.0f : 6.0f, ColPos, OwnerChar);
|
||||
if(TargetChr && m_Layer == LAYER_SWITCH && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[TargetChr->Team()]) return;
|
||||
|
||||
if(m_LifeSpan > -1)
|
||||
m_LifeSpan--;
|
||||
|
@ -128,7 +127,7 @@ void CProjectile::Tick()
|
|||
GameServer()->CreateSound(ColPos, m_SoundImpact,
|
||||
(m_Owner != -1)? TeamMask : -1);
|
||||
}
|
||||
else if(TargetChr && m_Freeze)
|
||||
else if(TargetChr && m_Freeze && ((m_Layer == LAYER_SWITCH && GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[TargetChr->Team()]) || m_Layer != LAYER_SWITCH))
|
||||
TargetChr->Freeze(Server()->TickSpeed()*3);
|
||||
if(Collide && m_Bouncing != 0)
|
||||
{
|
||||
|
@ -172,6 +171,8 @@ void CProjectile::Snap(int SnappingClient)
|
|||
if(NetworkClipped(SnappingClient, GetPos(Ct)))
|
||||
return;
|
||||
CCharacter * SnapChar = GameServer()->GetPlayerChar(SnappingClient);
|
||||
if (!GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[SnapChar->Team()]) return;
|
||||
|
||||
if
|
||||
(
|
||||
SnapChar &&
|
||||
|
|
Loading…
Reference in a new issue