Add client pulling prediction (#2041)
* WIP changes * Merge conflict fixes * Bring pull controlelr to current year * Sync and predict PullController on the client * Clean imports * Slow down pullers and make pulling tighter * Stop pulls on pullable or puller component removals * Make pulling not occur when moving towards the pulled entity
This commit is contained in:
@@ -92,6 +92,23 @@ namespace Content.Client.GameObjects.Components.Mobs
|
||||
_cooldown.Clear();
|
||||
}
|
||||
|
||||
public override void ChangeStatusEffectIcon(StatusEffect effect, string icon)
|
||||
{
|
||||
if (_status.TryGetValue(effect, out var value) &&
|
||||
value.Icon == icon)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_status[effect] = new StatusEffectStatus
|
||||
{
|
||||
Icon = icon,
|
||||
Cooldown = value.Cooldown
|
||||
};
|
||||
|
||||
Dirty();
|
||||
}
|
||||
|
||||
public void UpdateStatusEffects()
|
||||
{
|
||||
if (!CurrentlyControlled || _ui == null)
|
||||
@@ -132,10 +149,15 @@ namespace Content.Client.GameObjects.Components.Mobs
|
||||
SendNetworkMessage(new ClickStatusMessage(status.Effect));
|
||||
}
|
||||
|
||||
public void RemoveStatusEffect(StatusEffect name)
|
||||
public override void RemoveStatusEffect(StatusEffect effect)
|
||||
{
|
||||
_status.Remove(name);
|
||||
if (!_status.Remove(effect))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateStatusEffects();
|
||||
Dirty();
|
||||
}
|
||||
|
||||
public void FrameUpdate(float frameTime)
|
||||
|
||||
Reference in New Issue
Block a user