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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user