Fixed Snacks Mispredicting on Clients (#38522)

* Well this works

* Removed merge conflict bait

* PredictedDel

* Apply suggestions from code review

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
Southbridge
2025-06-26 16:32:36 -04:00
committed by GitHub
parent 283d0863a0
commit cc2a89ed86

View File

@@ -342,7 +342,7 @@ public sealed class FoodSystem : EntitySystem
if (component.Trash.Count == 0)
{
QueueDel(food);
PredictedQueueDel(food);
return;
}
@@ -353,10 +353,10 @@ public sealed class FoodSystem : EntitySystem
var trashes = component.Trash;
var tryPickup = _hands.IsHolding(user, food, out _);
Del(food);
PredictedDel(food);
foreach (var trash in trashes)
{
var spawnedTrash = Spawn(trash, position);
var spawnedTrash = EntityManager.PredictedSpawn(trash, position);
// If the user is holding the item
if (tryPickup)