Skip to content

Commit

Permalink
Recieve -> Receive (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
PJB3005 committed Jul 26, 2017
1 parent 5273274 commit 0b1b9ce
Show file tree
Hide file tree
Showing 30 changed files with 72 additions and 72 deletions.
10 changes: 5 additions & 5 deletions POCs/GasPropagationTest/GasPropagationTest/GasCell.cs
Expand Up @@ -29,10 +29,10 @@ public class GasCell
bool calculated = true;
public Vector2 GasVel;
public Vector2 NextGasVel;

//Constants
double SourceDamping = .5;
double RecieverDamping = .75;
double ReceiverDamping = .75;
public const double quarterpi = Math.PI / 4;
int circleDiameter = 15;
private float FlowConstant = .1f;
Expand Down Expand Up @@ -124,7 +124,7 @@ public void CalculateNextGasAmount()
return;
double DAmount;
double Flow = 0;


GasCell neighbor;
Random rand = new Random();
Expand Down Expand Up @@ -192,15 +192,15 @@ public void CalculateNextGasAmount()
{
Vector2 addvel = new Vector2(i, j);
addvel.Magnitude = Math.Abs(Flow); // Damping coefficient of .5
neighbor.NextGasVel = neighbor.NextGasVel + addvel * chaos * RecieverDamping;
neighbor.NextGasVel = neighbor.NextGasVel + addvel * chaos * ReceiverDamping;
NextGasVel = NextGasVel + addvel * chaos * SourceDamping;
}
if (Flow < 0) // Flow is from neighbor
{
Vector2 addvel = new Vector2(-1 * i, -1 * j);
addvel.Magnitude = Math.Abs(Flow);
neighbor.NextGasVel = neighbor.NextGasVel + addvel * chaos * SourceDamping;
NextGasVel = NextGasVel + addvel * chaos * RecieverDamping;
NextGasVel = NextGasVel + addvel * chaos * ReceiverDamping;

}

Expand Down
4 changes: 2 additions & 2 deletions SS14.Client/GameObjects/Component/ClientComponent.cs
Expand Up @@ -13,10 +13,10 @@ namespace SS14.Client.GameObjects
[Reflect(false)]
public abstract class ClientComponent : Component
{
public override ComponentReplyMessage RecieveMessage(object sender, ComponentMessageType type,
public override ComponentReplyMessage ReceiveMessage(object sender, ComponentMessageType type,
params object[] list)
{
ComponentReplyMessage reply = base.RecieveMessage(sender, type, list);
ComponentReplyMessage reply = base.ReceiveMessage(sender, type, list);

if (sender == this) //Don't listen to our own messages!
return reply;
Expand Down
Expand Up @@ -119,10 +119,10 @@ public override void OnRemove()
/// <param name="type"></param>
/// <param name="reply"></param>
/// <param name="list"></param>
public override ComponentReplyMessage RecieveMessage(object sender, ComponentMessageType type,
public override ComponentReplyMessage ReceiveMessage(object sender, ComponentMessageType type,
params object[] list)
{
ComponentReplyMessage reply = base.RecieveMessage(sender, type, list);
ComponentReplyMessage reply = base.ReceiveMessage(sender, type, list);

if (sender == this) //Don't listen to our own messages!
return ComponentReplyMessage.Empty;
Expand Down
Expand Up @@ -16,10 +16,10 @@ public class ContextMenuComponent : ClientComponent
public override string Name => "ContextMenu";
private readonly List<ContextMenuEntry> _entries = new List<ContextMenuEntry>();

public override ComponentReplyMessage RecieveMessage(object sender, ComponentMessageType type,
public override ComponentReplyMessage ReceiveMessage(object sender, ComponentMessageType type,
params object[] list)
{
ComponentReplyMessage reply = base.RecieveMessage(sender, type, list);
ComponentReplyMessage reply = base.ReceiveMessage(sender, type, list);

if (sender == this) //Don't listen to our own messages!
return ComponentReplyMessage.Empty;
Expand Down
Expand Up @@ -52,10 +52,10 @@ public override void OnAdd(IEntity owner)
keyBindingManager.BoundKeyUp += KeyUp;
}

public override ComponentReplyMessage RecieveMessage(object sender, ComponentMessageType type,
public override ComponentReplyMessage ReceiveMessage(object sender, ComponentMessageType type,
params object[] list)
{
ComponentReplyMessage reply = base.RecieveMessage(sender, type, list);
ComponentReplyMessage reply = base.ReceiveMessage(sender, type, list);

if (sender == this)
return ComponentReplyMessage.Empty;
Expand Down
Expand Up @@ -10,7 +10,7 @@
namespace SS14.Client.GameObjects
{
/// <summary>
/// Recieves movement data from the server and updates the entity's position accordingly.
/// Receives movement data from the server and updates the entity's position accordingly.
/// </summary>
public class BasicMoverComponent : ClientComponent, IMoverComponent
{
Expand Down
Expand Up @@ -43,10 +43,10 @@ public override void HandleNetworkMessage(IncomingEntityComponentMessage message
PlainTranslate((float)x, (float)y);*/
}

public override ComponentReplyMessage RecieveMessage(object sender, ComponentMessageType type,
public override ComponentReplyMessage ReceiveMessage(object sender, ComponentMessageType type,
params object[] list)
{
ComponentReplyMessage reply = base.RecieveMessage(sender, type, list);
ComponentReplyMessage reply = base.ReceiveMessage(sender, type, list);

if (sender == this) //Don't listen to our own messages!
return ComponentReplyMessage.Empty;
Expand Down
Expand Up @@ -107,10 +107,10 @@ public void SetAnimationState(string state, bool loop = true)
}*/
}

public override ComponentReplyMessage RecieveMessage(object sender, ComponentMessageType type,
public override ComponentReplyMessage ReceiveMessage(object sender, ComponentMessageType type,
params object[] list)
{
ComponentReplyMessage reply = base.RecieveMessage(sender, type, list);
ComponentReplyMessage reply = base.ReceiveMessage(sender, type, list);

if (sender == this) //Don't listen to our own messages!
return ComponentReplyMessage.Empty;
Expand Down
Expand Up @@ -27,10 +27,10 @@ public ItemSpriteComponent()
SetDrawDepth(DrawDepth.FloorObjects);
}

public override ComponentReplyMessage RecieveMessage(object sender, ComponentMessageType type,
public override ComponentReplyMessage ReceiveMessage(object sender, ComponentMessageType type,
params object[] list)
{
ComponentReplyMessage reply = base.RecieveMessage(sender, type, list);
ComponentReplyMessage reply = base.ReceiveMessage(sender, type, list);

if (sender == this) //Don't listen to our own messages!
return ComponentReplyMessage.Empty;
Expand Down
Expand Up @@ -26,10 +26,10 @@ public MobSpriteComponent()
DrawDepth = DrawDepth.MobBase;
}

public override ComponentReplyMessage RecieveMessage(object sender, ComponentMessageType type,
public override ComponentReplyMessage ReceiveMessage(object sender, ComponentMessageType type,
params object[] list)
{
ComponentReplyMessage reply = base.RecieveMessage(sender, type, list);
ComponentReplyMessage reply = base.ReceiveMessage(sender, type, list);

if (sender == this) //Don't listen to our own messages!
return ComponentReplyMessage.Empty;
Expand Down
Expand Up @@ -158,10 +158,10 @@ public override void HandleNetworkMessage(IncomingEntityComponentMessage message
}
}

public override ComponentReplyMessage RecieveMessage(object sender, ComponentMessageType type,
public override ComponentReplyMessage ReceiveMessage(object sender, ComponentMessageType type,
params object[] list)
{
ComponentReplyMessage reply = base.RecieveMessage(sender, type, list);
ComponentReplyMessage reply = base.ReceiveMessage(sender, type, list);

if (sender == this) //Don't listen to our own messages!
return ComponentReplyMessage.Empty;
Expand Down
4 changes: 2 additions & 2 deletions SS14.Client/Interfaces/UserInterface/IGuiComponent.cs
Expand Up @@ -11,14 +11,14 @@ public interface IGuiComponent : IDisposable
{
/// <summary>
/// <para>Defines the type of UI component.</para>
/// <para>This needs to be set if you want the component to recieve network input as it is used for routing the messages to the correct components.</para>
/// <para>This needs to be set if you want the component to receive network input as it is used for routing the messages to the correct components.</para>
/// </summary>
GuiComponentType ComponentClass { get; }

Vector2i Position { get; set; }

IntRect ClientArea { get; set; }
bool RecieveInput { get; set; }
bool ReceiveInput { get; set; }

bool Focus { get; set; }

Expand Down
18 changes: 9 additions & 9 deletions SS14.Client/Network/NetworkGrapher.cs
Expand Up @@ -22,7 +22,7 @@ public class NetworkGrapher : INetworkGrapher
private TextSprite _textSprite;
private bool _enabled;
private DateTime _lastDataPointTime;
private int _lastRecievedBytes;
private int _lastReceivedBytes;
private int _lastSentBytes;

public NetworkGrapher()
Expand All @@ -44,7 +44,7 @@ public void Toggle()

_dataPoints.Clear();
_lastDataPointTime = DateTime.Now;
_lastRecievedBytes = _networkManager.Statistics.ReceivedBytes;
_lastReceivedBytes = _networkManager.Statistics.ReceivedBytes;
_lastSentBytes = _networkManager.Statistics.SentBytes;
}

Expand All @@ -71,16 +71,16 @@ private void DrawGraph()
if (_dataPoints.Count <= i) continue;

totalMilliseconds += _dataPoints[i].ElapsedMilliseconds;
totalRecBytes += _dataPoints[i].RecievedBytes;
totalRecBytes += _dataPoints[i].ReceivedBytes;
totalSentBytes += _dataPoints[i].SentBytes;

CluwneLib.ResetRenderTarget();

//Draw recieved line
CluwneLib.drawRectangle((int)CluwneLib.CurrentRenderTarget.Size.X - (4 * (MaxDataPoints - i)),
(int)CluwneLib.CurrentRenderTarget.Size.Y - (int)(_dataPoints[i].RecievedBytes * 0.1f),
(int)CluwneLib.CurrentRenderTarget.Size.Y - (int)(_dataPoints[i].ReceivedBytes * 0.1f),
2,
(int)(_dataPoints[i].RecievedBytes * 0.1f),
(int)(_dataPoints[i].ReceivedBytes * 0.1f),
SFML.Graphics.Color.Red.WithAlpha(180));

CluwneLib.drawRectangle((int)CluwneLib.CurrentRenderTarget.Size.X - (4 * (MaxDataPoints - i)) + 2,
Expand All @@ -106,26 +106,26 @@ private void AddDataPoint()

_dataPoints.Add(new NetworkStatisticsDataPoint
(
_networkManager.Statistics.ReceivedBytes - _lastRecievedBytes,
_networkManager.Statistics.ReceivedBytes - _lastReceivedBytes,
_networkManager.Statistics.SentBytes - _lastSentBytes,
(DateTime.Now - _lastDataPointTime).TotalMilliseconds)
);

_lastDataPointTime = DateTime.Now;
_lastRecievedBytes = _networkManager.Statistics.ReceivedBytes;
_lastReceivedBytes = _networkManager.Statistics.ReceivedBytes;
_lastSentBytes = _networkManager.Statistics.SentBytes;
}
}

public struct NetworkStatisticsDataPoint
{
public double ElapsedMilliseconds;
public int RecievedBytes;
public int ReceivedBytes;
public int SentBytes;

public NetworkStatisticsDataPoint(int rec, int sent, double elapsed)
{
RecievedBytes = rec;
ReceivedBytes = rec;
SentBytes = sent;
ElapsedMilliseconds = elapsed;
}
Expand Down
4 changes: 2 additions & 2 deletions SS14.Client/State/States/GameScreen.cs
Expand Up @@ -876,7 +876,7 @@ private void NetworkManagerMessageArrived(object sender, NetMessageArgs args)
/// <summary>
/// HandleStateUpdate
///
/// Recieves a state update message and unpacks the delicious GameStateDelta hidden inside
/// Receives a state update message and unpacks the delicious GameStateDelta hidden inside
/// Then it applies the gamestatedelta to a past state to form: a full game state!
/// </summary>
/// <param name="message">incoming state update message</param>
Expand Down Expand Up @@ -950,7 +950,7 @@ private void ApplyCurrentGameState()
/// <summary>
/// SendStateAck
///
/// Acknowledge a game state being recieved
/// Acknowledge a game state being received
/// </summary>
/// <param name="sequence">State sequence number</param>
private void SendStateAck(uint sequence)
Expand Down
2 changes: 1 addition & 1 deletion SS14.Client/UserInterface/Components/DebugConsole.cs
Expand Up @@ -111,7 +111,7 @@ public override void ToggleVisible()

private void NetMgr_MessageArrived(object sender, NetMessageArgs e)
{
//Make sure we reset the position - we might recieve this message after the gamestates.
//Make sure we reset the position - we might receive this message after the gamestates.
if (e.RawMessage.Position > 0)
e.RawMessage.Position = 0;

Expand Down
8 changes: 4 additions & 4 deletions SS14.Client/UserInterface/Components/GuiComponent.cs
Expand Up @@ -12,7 +12,7 @@ namespace SS14.Client.UserInterface.Components
public class GuiComponent : IGuiComponent
{
public object UserData;
private bool _recieveInput = true;
private bool _receiveInput = true;
private bool _visible = true;

public string name { get; protected set; }
Expand All @@ -25,10 +25,10 @@ public class GuiComponent : IGuiComponent

public int ZDepth { get; set; }

public bool RecieveInput
public bool ReceiveInput
{
get { return _recieveInput; }
set { _recieveInput = value; }
get { return _receiveInput; }
set { _receiveInput = value; }
}

public virtual bool Focus { get; set; }
Expand Down
12 changes: 6 additions & 6 deletions SS14.Client/UserInterface/UserInterfaceManager.cs
Expand Up @@ -223,7 +223,7 @@ public virtual bool MouseDown(MouseButtonEventArgs e)
else
{
IOrderedEnumerable<IGuiComponent> inputList = from IGuiComponent comp in _components
where comp.RecieveInput
where comp.ReceiveInput
orderby comp.ZDepth ascending
orderby comp.IsVisible() descending
//Invisible controls still recieve input but after everyone else. This is mostly for the inventory and other toggleable components.
Expand Down Expand Up @@ -258,7 +258,7 @@ public virtual bool MouseUp(MouseButtonEventArgs e)
else
{
IOrderedEnumerable<IGuiComponent> inputList = from IGuiComponent comp in _components
where comp.RecieveInput
where comp.ReceiveInput
orderby comp.ZDepth ascending
orderby comp.IsVisible() descending
//Invisible controls still recieve input but after everyone else. This is mostly for the inventory and other toggleable components.
Expand Down Expand Up @@ -290,7 +290,7 @@ public virtual void MouseMove(MouseMoveEventArgs e)
}

IOrderedEnumerable<IGuiComponent> inputList = from IGuiComponent comp in _components
where comp.RecieveInput
where comp.ReceiveInput
orderby comp.ZDepth ascending
select comp;

Expand All @@ -309,7 +309,7 @@ public virtual void MouseWheelMove(MouseWheelEventArgs e)
}

IGuiComponent inputTo = (from IGuiComponent comp in _components
where comp.RecieveInput
where comp.ReceiveInput
where comp.Focus
select comp).FirstOrDefault();

Expand Down Expand Up @@ -349,7 +349,7 @@ public virtual bool KeyDown(KeyEventArgs e)
}

IOrderedEnumerable<IGuiComponent> inputList = from IGuiComponent comp in _components
where comp.RecieveInput
where comp.ReceiveInput
orderby comp.ZDepth ascending
orderby comp.IsVisible() descending
// Invisible controls still recieve input but after everyone else. This is mostly for the inventory and other toggleable components.
Expand All @@ -367,7 +367,7 @@ public virtual bool TextEntered(TextEventArgs e)
}

IOrderedEnumerable<IGuiComponent> inputList = from IGuiComponent comp in _components
where comp.RecieveInput
where comp.ReceiveInput
orderby comp.ZDepth ascending
orderby comp.IsVisible() descending
// Invisible controls still recieve input but after everyone else. This is mostly for the inventory and other toggleable components.
Expand Down
2 changes: 1 addition & 1 deletion SS14.Server/Chat/ChatManager.cs
Expand Up @@ -246,7 +246,7 @@ private void ProcessEmote(string text, string name, ChatChannel channel, int? en
/// </summary>
/// <param name="text">Text content.</param>
/// <param name="name">Player name that sent the chat text.</param>
/// <param name="channel">Channel message was recieved on.</param>
/// <param name="channel">Channel message was received on.</param>
/// <param name="client">Client that sent the command.</param>
private void ProcessCommand(string text, string name, ChatChannel channel, int? entityId, INetChannel client)
{
Expand Down
Expand Up @@ -12,10 +12,10 @@ public class BasicActorComponent : Component, IActorComponent
public override string Name => "BasicActor";
public IPlayerSession playerSession { get; internal set; }

public override ComponentReplyMessage RecieveMessage(object sender, ComponentMessageType type,
public override ComponentReplyMessage ReceiveMessage(object sender, ComponentMessageType type,
params object[] list)
{
ComponentReplyMessage reply = base.RecieveMessage(sender, type, list);
ComponentReplyMessage reply = base.ReceiveMessage(sender, type, list);

if (sender == this)
return ComponentReplyMessage.Empty;
Expand Down
Expand Up @@ -9,7 +9,7 @@
namespace SS14.Server.GameObjects
{
/// <summary>
/// This class recieves keypresses from the attached client and forwards them to other components.
/// This class receives keypresses from the attached client and forwards them to other components.
/// </summary>
public class KeyBindingInputComponent : Component
{
Expand Down

0 comments on commit 0b1b9ce

Please sign in to comment.