Fixed Xbox 360 crash

This commit is contained in:
2026-08-07 04:10:27 -07:00
parent 01abe05b18
commit 7135da3f37
32 changed files with 610 additions and 214 deletions
+4 -4
View File
@@ -10,7 +10,7 @@ ResourceLocation HorseRenderer::HORSE_DONKEY_LOCATION = ResourceLocation(TN_MOB_
ResourceLocation HorseRenderer::HORSE_ZOMBIE_LOCATION = ResourceLocation(TN_MOB_HORSE_ZOMBIE);
ResourceLocation HorseRenderer::HORSE_SKELETON_LOCATION = ResourceLocation(TN_MOB_HORSE_SKELETON);
std::map<wstring, ResourceLocation *> HorseRenderer::LAYERED_LOCATION_CACHE;
std::map<wstring, ResourceLocation> HorseRenderer::LAYERED_LOCATION_CACHE;
HorseRenderer::HorseRenderer(Model *model, float f) : MobRenderer(model, f)
{
@@ -114,14 +114,14 @@ ResourceLocation *HorseRenderer::getOrCreateLayeredTextureLocation(shared_ptr<En
ResourceLocation *location;
if (it != LAYERED_LOCATION_CACHE.end())
{
location = it->second;
location = &(it->second);
}
else
{
LAYERED_LOCATION_CACHE[textureName] = new ResourceLocation(horse->getLayeredTextureLayers());
LAYERED_LOCATION_CACHE[textureName] = ResourceLocation(horse->getLayeredTextureLayers());
it = LAYERED_LOCATION_CACHE.find(textureName);
location = it->second;
location = &(it->second);
}
return location;