Entity Interpolation (#197)

* Frame interpolation kinda works.

* Added null CurState check because it can be null now.

* Merge remote-tracking branch 'upstream/master' into dev-GameState
This commit is contained in:
Acruid
2019-04-13 00:46:27 -07:00
committed by Pieter-Jan Briers
parent 52af7d27da
commit b1c81ed6e6
6 changed files with 30 additions and 23 deletions

View File

@@ -1,7 +1,5 @@
using Content.Shared.GameObjects;
using SS14.Shared.GameObjects;
using SS14.Shared.Interfaces.GameObjects;
using SS14.Shared.Interfaces.Network;
using System.Collections.Generic;
namespace Content.Client.GameObjects
@@ -17,13 +15,13 @@ namespace Content.Client.GameObjects
public Dictionary<DamageType, int> CurrentDamage = new Dictionary<DamageType, int>();
public override void HandleComponentState(ComponentState state)
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
{
base.HandleComponentState(state);
base.HandleComponentState(curState, nextState);
if(state is DamageComponentState)
if(curState is DamageComponentState)
{
var damagestate = (DamageComponentState)state;
var damagestate = (DamageComponentState)curState;
CurrentDamage = damagestate.CurrentDamage;
}
}