Unstable v0.1300.0.0 (February 19th 2021)

This commit is contained in:
Joonas Rikkonen
2021-02-25 13:44:23 +02:00
parent b772654326
commit 24cbef485a
441 changed files with 21343 additions and 8562 deletions
@@ -1,9 +1,27 @@
using Barotrauma.Networking;
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
namespace Barotrauma
{
partial class CharacterInfo
{
private readonly Dictionary<string, float> prevSentSkill = new Dictionary<string, float>();
partial void OnSkillChanged(string skillIdentifier, float prevLevel, float newLevel, Vector2 textPopupPos)
{
if (!prevSentSkill.ContainsKey(skillIdentifier))
{
prevSentSkill[skillIdentifier] = prevLevel;
}
if (Math.Abs(prevSentSkill[skillIdentifier] - newLevel) > 0.01f)
{
GameMain.NetworkMember.CreateEntityEvent(Character, new object[] { NetEntityEvent.Type.UpdateSkills });
prevSentSkill[skillIdentifier] = newLevel;
}
}
public void ServerWrite(IWriteMessage msg)
{
msg.Write(ID);