Fixed bug in player loading introduced in 1.3.2

This commit is contained in:
Justin Aquadro 2012-07-31 20:33:50 -04:00
parent fcfe3bc2d0
commit f062f736ef
2 changed files with 14 additions and 10 deletions

View file

@ -30,8 +30,8 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.3.2.0")]
[assembly: AssemblyFileVersion("1.3.2.0")]
[assembly: AssemblyVersion("1.3.3.0")]
[assembly: AssemblyFileVersion("1.3.3.0")]
// This library is compatible with all CLS-compliant .NET programming languages.
[assembly: CLSCompliant(true)]

View file

@ -12,11 +12,11 @@ namespace Substrate
/// <remarks>Whether or not any of these values are respected by the game client is dependent upon the active game mode.</remarks>
public class PlayerAbilities : ICopyable<PlayerAbilities>
{
private bool _flying;
private bool _instabuild;
private bool _mayfly;
private bool _invulnerable;
private bool _maybuild;
private bool _flying = false;
private bool _instabuild = false;
private bool _mayfly = false;
private bool _invulnerable = false;
private bool _maybuild = true;
private float _walkSpeed = 0.1f;
private float _flySpeed = 0.05f;
@ -517,8 +517,12 @@ namespace Substrate
_abilities.InstantBuild = pb["instabuild"].ToTagByte().Data == 1;
_abilities.MayFly = pb["mayfly"].ToTagByte().Data == 1;
_abilities.Invulnerable = pb["invulnerable"].ToTagByte().Data == 1;
if (pb.ContainsKey("mayBuild"))
_abilities.MayBuild = pb["mayBuild"].ToTagByte().Data == 1;
if (pb.ContainsKey("walkSpeed"))
_abilities.WalkSpeed = pb["walkSpeed"].ToTagFloat();
if (pb.ContainsKey("flySpeed"))
_abilities.FlySpeed = pb["flySpeed"].ToTagFloat();
}