Core/Misc: Fixes

This commit is contained in:
hondacrx
2018-08-01 13:33:11 -04:00
parent 8673e7218d
commit 92481d8d9f
7 changed files with 53 additions and 23 deletions
@@ -242,9 +242,10 @@ namespace Game.Collision
WorldModel worldmodel = new WorldModel();
if (!worldmodel.readFile(VMapPath + filename + ".vmo"))
{
Log.outError(LogFilter.Server, "VMapManager: could not load '{0}.vmo'", filename);
Log.outError(LogFilter.Server, "VMapManager: could not load '{0}'", filename);
return null;
}
Log.outDebug(LogFilter.Maps, "VMapManager: loading file '{0}'", filename);
model = new ManagedModel();
model.setModel(worldmodel);
@@ -260,6 +261,7 @@ namespace Game.Collision
{
lock (LoadedModelFilesLock)
{
filename = filename.Replace("\0", "");
var model = iLoadedModelFiles.LookupByKey(filename);
if (model == null)
{
@@ -61,8 +61,8 @@ namespace Game.Collision
Vector3 bHigh = reader.Read<Vector3>();
spawn.iBound = new AxisAlignedBox(bLow, bHigh);
}
uint nameLen = reader.ReadUInt32();
uint nameLen = reader.ReadUInt32();
spawn.name = reader.ReadString((int)nameLen);
return true;
}