Skip to content

Commit

Permalink
fix: prevent use of machines with damage
Browse files Browse the repository at this point in the history
  • Loading branch information
traditionalism committed Mar 13, 2023
1 parent bbf4fab commit 769c9cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Client/ClientMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ private async Task FindVendingMachineTick()
.OrderBy(p => Vector3.DistanceSquared(p.Position, plyPos))
.FirstOrDefault();

if (prop is null)
if (prop is null || HasObjectBeenBroken(prop.Handle))
{
await Delay(4000);
return;
}

if (!NetworkGetEntityIsNetworked(prop.Handle)) NetworkRegisterEntityAsNetworked(prop.Handle);

if (prop.State.Get("beingUsed") is null)
Expand Down

0 comments on commit 769c9cb

Please sign in to comment.