2 using Microsoft.Xna.Framework;
4 using System.Collections.Generic;
18 : this(pos, rotation, velocity, angularVelocity, 0, time, dir, selectedCharacter, selectedItem, selectedSecondaryItem, animation)
23 : this(pos, rotation, Vector2.Zero, 0.0f,
ID, 0.0f, dir, selectedCharacter, selectedItem, selectedSecondaryItem, animation)
27 protected CharacterStateInfo(Vector2 pos,
float? rotation, Vector2 velocity,
float? angularVelocity, UInt16
ID,
float time,
Direction dir,
Character selectedCharacter,
Item selectedItem,
Item selectedSecondaryItem,
AnimController.
Animation animation =
AnimController.
Animation.None)
28 : base(pos, rotation, velocity, angularVelocity,
ID, time)
33 SelectedSecondaryItem = selectedSecondaryItem;
39 partial class Character
42 private enum InputNetFlags : ushort
66 private InputNetFlags dequeuedInput = 0;
67 private InputNetFlags prevDequeuedInput = 0;
76 private struct NetInputMem
78 public InputNetFlags states;
80 public UInt16 interact;
82 public UInt16 networkUpdateID;
85 private readonly List<NetInputMem> memInput =
new List<NetInputMem>();
87 private readonly List<CharacterStateInfo> memState =
new List<CharacterStateInfo>();
88 private readonly List<CharacterStateInfo> memLocalState =
new List<CharacterStateInfo>();
92 private float healthUpdateInterval;
95 get {
return healthUpdateInterval; }
98 healthUpdateInterval = MathHelper.Clamp(value, 0.0f,
IsDead ? NetConfig.MaxHealthUpdateIntervalDead : NetConfig.MaxHealthUpdateInterval);
107 get {
return memState; }
112 get {
return memLocalState; }
119 memLocalState.Clear();
125 partial
void UpdateNetInput();
UInt16 LastProcessedID
ID of the last inputs the server has processed
UInt16 LastNetworkUpdateID
List< CharacterStateInfo > MemState
float? HealthUpdateInterval
List< CharacterStateInfo > MemLocalState
readonly Direction Direction
readonly Character SelectedCharacter
CharacterStateInfo(Vector2 pos, float? rotation, Vector2 velocity, float? angularVelocity, UInt16 ID, float time, Direction dir, Character selectedCharacter, Item selectedItem, Item selectedSecondaryItem, AnimController.Animation animation=AnimController.Animation.None)
readonly Item SelectedItem
readonly AnimController.Animation Animation
CharacterStateInfo(Vector2 pos, float? rotation, UInt16 ID, Direction dir, Character selectedCharacter, Item selectedItem, Item selectedSecondaryItem, AnimController.Animation animation=AnimController.Animation.None)
CharacterStateInfo(Vector2 pos, float? rotation, Vector2 velocity, float? angularVelocity, float time, Direction dir, Character selectedCharacter, Item selectedItem, Item selectedSecondaryItem, AnimController.Animation animation=AnimController.Animation.None)