forked from mirrors/NBTExplorer
Fixed bug in player loading introduced in 1.3.2
This commit is contained in:
parent
fcfe3bc2d0
commit
f062f736ef
2 changed files with 14 additions and 10 deletions
|
@ -30,8 +30,8 @@ using System.Runtime.InteropServices;
|
||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("1.3.2.0")]
|
[assembly: AssemblyVersion("1.3.3.0")]
|
||||||
[assembly: AssemblyFileVersion("1.3.2.0")]
|
[assembly: AssemblyFileVersion("1.3.3.0")]
|
||||||
|
|
||||||
// This library is compatible with all CLS-compliant .NET programming languages.
|
// This library is compatible with all CLS-compliant .NET programming languages.
|
||||||
[assembly: CLSCompliant(true)]
|
[assembly: CLSCompliant(true)]
|
|
@ -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>
|
/// <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>
|
public class PlayerAbilities : ICopyable<PlayerAbilities>
|
||||||
{
|
{
|
||||||
private bool _flying;
|
private bool _flying = false;
|
||||||
private bool _instabuild;
|
private bool _instabuild = false;
|
||||||
private bool _mayfly;
|
private bool _mayfly = false;
|
||||||
private bool _invulnerable;
|
private bool _invulnerable = false;
|
||||||
private bool _maybuild;
|
private bool _maybuild = true;
|
||||||
|
|
||||||
private float _walkSpeed = 0.1f;
|
private float _walkSpeed = 0.1f;
|
||||||
private float _flySpeed = 0.05f;
|
private float _flySpeed = 0.05f;
|
||||||
|
@ -517,9 +517,13 @@ namespace Substrate
|
||||||
_abilities.InstantBuild = pb["instabuild"].ToTagByte().Data == 1;
|
_abilities.InstantBuild = pb["instabuild"].ToTagByte().Data == 1;
|
||||||
_abilities.MayFly = pb["mayfly"].ToTagByte().Data == 1;
|
_abilities.MayFly = pb["mayfly"].ToTagByte().Data == 1;
|
||||||
_abilities.Invulnerable = pb["invulnerable"].ToTagByte().Data == 1;
|
_abilities.Invulnerable = pb["invulnerable"].ToTagByte().Data == 1;
|
||||||
_abilities.MayBuild = pb["mayBuild"].ToTagByte().Data == 1;
|
|
||||||
_abilities.WalkSpeed = pb["walkSpeed"].ToTagFloat();
|
if (pb.ContainsKey("mayBuild"))
|
||||||
_abilities.FlySpeed = pb["flySpeed"].ToTagFloat();
|
_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();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctree.ContainsKey("PlayerGameType")) {
|
if (ctree.ContainsKey("PlayerGameType")) {
|
||||||
|
|
Loading…
Reference in a new issue