diff --git a/src/DifBuilder.hx b/src/DifBuilder.hx index bcca2f2e..29966041 100644 --- a/src/DifBuilder.hx +++ b/src/DifBuilder.hx @@ -173,7 +173,15 @@ class DifBuilder { "mmg_ice_shadow" => { friction: 0.03, restitution: 0.95 - } + }, + "friction_mp_high" => { + friction: 6, + restitution: 0.3 + }, + "friction_mp_high_shadow" => { + friction: 6, + restitution: 0.3 + }, ]; static function createPhongMaterial(onFinish:hxsl.Shader->Void, baseTexture:String, normalTexture:String, shininess:Float, specularColor:Vector, @@ -268,6 +276,7 @@ class DifBuilder { 'interiors_mbu/wall_beginner.png' => (onFinish) -> createPhongMaterial(onFinish, 'wall_beginner.png', 'wall_mbu.normal.png', 12, new Vector(0.8, 0.8, 0.6, 1)), 'interiors_mbu/edge_white.png' => (onFinish) -> createPhongMaterial(onFinish, 'edge_white.png', 'edge.normal.png', 50, new Vector(0.8, 0.8, 0.8, 1)), + 'interiors_mbu/edge_white.jpg' => (onFinish) -> createPhongMaterial(onFinish, 'edge_white.png', 'edge.normal.png', 50, new Vector(0.8, 0.8, 0.8, 1)), 'interiors_mbu/edge_white_shadow.png' => (onFinish) -> createPhongMaterial(onFinish, 'edge_white_shadow.png', 'edge.normal.png', 50, new Vector(0.2, 0.2, 0.2, 0.2)), 'interiors_mbu/beam.png' => (onFinish) -> createPhongMaterial(onFinish, 'beam.png', 'beam.normal.png', 12, new Vector(0.8, 0.8, 0.6, 1)), @@ -275,6 +284,8 @@ class DifBuilder { new Vector(0.8, 0.8, 0.6, 1)), 'interiors_mbu/friction_low.png' => (onFinish) -> createPhongMaterial(onFinish, 'friction_low.png', 'friction_low.normal.png', 128, new Vector(1, 1, 1, 0.8)), + 'interiors_mbu/friction_low.jpg' => (onFinish) -> createPhongMaterial(onFinish, 'friction_low.png', 'friction_low.normal.png', 128, + new Vector(1, 1, 1, 0.8)), 'interiors_mbu/friction_low_shadow.png' => (onFinish) -> createPhongMaterial(onFinish, 'friction_low_shadow.png', 'friction_low.normal.png', 128, new Vector(0.3, 0.3, 0.35, 1)), 'interiors_mbu/friction_high.png' => (onFinish) -> createPhongMaterial(onFinish, 'friction_high.png', 'friction_high.normal.png', 10, @@ -402,7 +413,7 @@ class DifBuilder { tri.uv3 = uv3; triangles.push(tri); hullTris.push(tri); - var materialName = stripTexName(texture); + var materialName = stripTexName(texture).toLowerCase(); var hasMaterialInfo = materialDict.exists(materialName); if (hasMaterialInfo) { var minfo = materialDict.get(materialName); diff --git a/src/Mission.hx b/src/Mission.hx index c3d7065d..556f4e6c 100644 --- a/src/Mission.hx +++ b/src/Mission.hx @@ -214,6 +214,9 @@ class Mission { if (ResourceLoader.exists(path)) return path; } + path = StringTools.replace(path, "lbinteriors", "interiors"); // This shit ew + if (ResourceLoader.exists(path)) + return path; Console.error("Interior resource not found: " + rawElementPath); return ""; } diff --git a/src/ResourceLoader.hx b/src/ResourceLoader.hx index 9dc28ddc..cc8f7414 100644 --- a/src/ResourceLoader.hx +++ b/src/ResourceLoader.hx @@ -466,6 +466,7 @@ class ResourceLoader { #end if (game == 'gold') fname = StringTools.replace(fname, 'interiors/', 'interiors_mbg/'); + fname = StringTools.replace(fname, "lbinteriors", "interiors"); // Normalize if (exists(fname)) continue; Console.log("Loaded zip entry: " + fname);