Unstable 0.1500.7.0 (No edition)
This commit is contained in:
@@ -10,7 +10,7 @@ namespace Barotrauma
|
||||
{
|
||||
private readonly Dictionary<string, float> prevSentSkill = new Dictionary<string, float>();
|
||||
|
||||
partial void OnSkillChanged(string skillIdentifier, float prevLevel, float newLevel, Vector2 textPopupPos)
|
||||
partial void OnSkillChanged(string skillIdentifier, float prevLevel, float newLevel)
|
||||
{
|
||||
if (Character == null || Character.Removed) { return; }
|
||||
if (!prevSentSkill.ContainsKey(skillIdentifier))
|
||||
@@ -24,9 +24,9 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
partial void OnExperienceChanged(int prevAmount, int newAmount, Vector2 textPopupPos)
|
||||
partial void OnExperienceChanged(int prevAmount, int newAmount)
|
||||
{
|
||||
if (Math.Abs(prevAmount - newAmount) > 0)
|
||||
if (prevAmount != newAmount)
|
||||
{
|
||||
GameMain.NetworkMember.CreateEntityEvent(Character, new object[] { NetEntityEvent.Type.UpdateExperience });
|
||||
}
|
||||
|
||||
@@ -430,6 +430,7 @@ namespace Barotrauma
|
||||
msg.Write((ushort)characterTalents.Count);
|
||||
foreach (var unlockedTalent in characterTalents)
|
||||
{
|
||||
msg.Write(unlockedTalent.AddedThisRound);
|
||||
msg.Write(unlockedTalent.Prefab.UIntIdentifier);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1731,7 +1731,9 @@ namespace Barotrauma
|
||||
"givetalent",
|
||||
(Client client, Vector2 cursorWorldPos, string[] args) =>
|
||||
{
|
||||
Character targetCharacter = (args.Length == 0) ? client.Character : FindMatchingCharacter(args, false);
|
||||
if (args.Length == 0) { return; }
|
||||
Character targetCharacter = (args.Length >= 2) ? FindMatchingCharacter(args.Skip(1).ToArray(), false) : client.Character;
|
||||
|
||||
if (targetCharacter == null) { return; }
|
||||
|
||||
TalentPrefab talentPrefab = TalentPrefab.TalentPrefabs.Find(c =>
|
||||
@@ -1845,7 +1847,7 @@ namespace Barotrauma
|
||||
"control",
|
||||
(Client client, Vector2 cursorWorldPos, string[] args) =>
|
||||
{
|
||||
if (args.Length < 1) return;
|
||||
if (args.Length < 1) { return; }
|
||||
var character = FindMatchingCharacter(args, ignoreRemotePlayers: true, allowedRemotePlayer: client);
|
||||
if (character != null)
|
||||
{
|
||||
@@ -2259,13 +2261,13 @@ namespace Barotrauma
|
||||
{
|
||||
foreach (Skill skill in character.Info.Job.Skills)
|
||||
{
|
||||
character.Info.SetSkillLevel(skill.Identifier, level, character.WorldPosition);
|
||||
character.Info.SetSkillLevel(skill.Identifier, level);
|
||||
}
|
||||
GameMain.Server.SendConsoleMessage($"Set all {character.Name}'s skills to {level}", senderClient);
|
||||
}
|
||||
else
|
||||
{
|
||||
character.Info.SetSkillLevel(skillIdentifier, level, character.WorldPosition);
|
||||
character.Info.SetSkillLevel(skillIdentifier, level);
|
||||
GameMain.Server.SendConsoleMessage($"Set {character.Name}'s {skillIdentifier} level to {level}", senderClient);
|
||||
}
|
||||
|
||||
|
||||
@@ -1181,6 +1181,10 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
c.Character.ServerRead(objHeader, inc, c);
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugConsole.AddWarning($"Received character inputs from a client who's not controlling a character ({c.Name}).");
|
||||
}
|
||||
break;
|
||||
case ClientNetObject.ENTITY_STATE:
|
||||
entityEventManager.Read(inc, c);
|
||||
|
||||
Reference in New Issue
Block a user