Skip to content

Commit 5a203f6

Browse files
Make it compile on old C#
1 parent e463aac commit 5a203f6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

fCraft/Commands/CpeCommands.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,12 +358,13 @@ internal static string ParseModel(Player player, string model, bool isBot) {
358358
model = model ?? "humanoid";
359359
string scalestr = "";
360360
int sepIndex = model.IndexOf('|');
361+
float scale;
361362

362363
if (sepIndex >= 0) {
363364
scalestr = model.Substring(sepIndex + 1);
364365
model = model.Substring(0, sepIndex);
365366
}
366-
if (float.TryParse(scalestr, out float scale)) {
367+
if (float.TryParse(scalestr, out scale)) {
367368
if (player.Info.Rank == RankManager.HighestRank) {
368369
if (isBot) { //Owner Bot scale between 0.01 and 128
369370
if (scale < 0.01f) scale = 0.01f;

fCraft/World/WorldManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,8 @@ public static void ParseCPEMetaData(ref World world, Map map, string previousMap
797797
}
798798
}
799799
if (File.Exists(blockDefPath)) {
800-
BlockDefinition[] defs = BlockDefinition.Load(blockDefPath, out _);
800+
int count;
801+
BlockDefinition[] defs = BlockDefinition.Load(blockDefPath, out count);
801802
for (int i = 0; i < defs.Length; i++) {
802803
if (defs[i] == null) defs[i] = BlockDefinition.GlobalDefs[i];
803804
}

0 commit comments

Comments
 (0)