Skip to content

Commit

Permalink
Reset wall first point on disallowed wall placement
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaffeine committed Oct 6, 2024
1 parent c059911 commit 4548f76
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/game/server/infclass/classes/humans/human.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,6 @@ void CInfClassHuman::PlaceEngineerWall(WeaponFireContext *pFireContext)
if(!GameController()->HumanWallAllowedInPos(TestPos))
{
pFireContext->FireAccepted = false;
pFireContext->NoAmmo = true;
break;
}
}
Expand All @@ -1751,6 +1750,10 @@ void CInfClassHuman::PlaceEngineerWall(WeaponFireContext *pFireContext)
pExistingWall->SetEndPosition(GetPos());
GameServer()->CreateSound(GetPos(), SOUND_LASER_FIRE);
}
else
{
GameWorld()->DestroyEntity(pExistingWall);
}
}
}

Expand Down Expand Up @@ -1786,7 +1789,6 @@ void CInfClassHuman::PlaceLooperWall(WeaponFireContext *pFireContext)
if(!GameController()->HumanWallAllowedInPos(TestPos))
{
pFireContext->FireAccepted = false;
pFireContext->NoAmmo = true;
break;
}
}
Expand All @@ -1796,6 +1798,10 @@ void CInfClassHuman::PlaceLooperWall(WeaponFireContext *pFireContext)
pExistingWall->SetEndPosition(GetPos());
GameServer()->CreateSound(GetPos(), SOUND_LASER_FIRE);
}
else
{
GameWorld()->DestroyEntity(pExistingWall);
}
}
}

Expand Down

0 comments on commit 4548f76

Please sign in to comment.