Skip to content

Commit 4548f76

Browse files
committed
Reset wall first point on disallowed wall placement
1 parent c059911 commit 4548f76

File tree

1 file changed

+8
-2
lines changed
  • src/game/server/infclass/classes/humans

1 file changed

+8
-2
lines changed

src/game/server/infclass/classes/humans/human.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1741,7 +1741,6 @@ void CInfClassHuman::PlaceEngineerWall(WeaponFireContext *pFireContext)
17411741
if(!GameController()->HumanWallAllowedInPos(TestPos))
17421742
{
17431743
pFireContext->FireAccepted = false;
1744-
pFireContext->NoAmmo = true;
17451744
break;
17461745
}
17471746
}
@@ -1751,6 +1750,10 @@ void CInfClassHuman::PlaceEngineerWall(WeaponFireContext *pFireContext)
17511750
pExistingWall->SetEndPosition(GetPos());
17521751
GameServer()->CreateSound(GetPos(), SOUND_LASER_FIRE);
17531752
}
1753+
else
1754+
{
1755+
GameWorld()->DestroyEntity(pExistingWall);
1756+
}
17541757
}
17551758
}
17561759

@@ -1786,7 +1789,6 @@ void CInfClassHuman::PlaceLooperWall(WeaponFireContext *pFireContext)
17861789
if(!GameController()->HumanWallAllowedInPos(TestPos))
17871790
{
17881791
pFireContext->FireAccepted = false;
1789-
pFireContext->NoAmmo = true;
17901792
break;
17911793
}
17921794
}
@@ -1796,6 +1798,10 @@ void CInfClassHuman::PlaceLooperWall(WeaponFireContext *pFireContext)
17961798
pExistingWall->SetEndPosition(GetPos());
17971799
GameServer()->CreateSound(GetPos(), SOUND_LASER_FIRE);
17981800
}
1801+
else
1802+
{
1803+
GameWorld()->DestroyEntity(pExistingWall);
1804+
}
17991805
}
18001806
}
18011807

0 commit comments

Comments
 (0)