mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Remove leftover terrain-based movement cost code.
6581796103 removed the ability for terrain to affect movement speed. The
JPS pathfinder cannot support it, and the approach was poor anyways,
coupling rendering data with simulation data.
This lets us remove the dependency on CTerrainTextureManager everywhere.
Tested by: langbart
Differential Revision: https://code.wildfiregames.com/D4459
This was SVN commit r26269.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2022 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -247,9 +247,11 @@ int CMapReader::UnpackTerrain()
|
||||
CStr texturename;
|
||||
unpacker.UnpackString(texturename);
|
||||
|
||||
ENSURE(CTerrainTextureManager::IsInitialised()); // we need this for the terrain properties (even when graphics are disabled)
|
||||
CTerrainTextureEntry* texentry = g_TexMan.FindTexture(texturename);
|
||||
m_TerrainTextures.push_back(texentry);
|
||||
if(CTerrainTextureManager::IsInitialised())
|
||||
{
|
||||
CTerrainTextureEntry* texentry = g_TexMan.FindTexture(texturename);
|
||||
m_TerrainTextures.push_back(texentry);
|
||||
}
|
||||
|
||||
cur_terrain_tex++;
|
||||
LDR_CHECK_TIMEOUT(cur_terrain_tex, num_terrain_tex);
|
||||
@@ -1354,9 +1356,11 @@ if (!Script::GetProperty(rq, val, #prop, out))\
|
||||
|
||||
while (cur_terrain_tex < num_terrain_tex)
|
||||
{
|
||||
ENSURE(CTerrainTextureManager::IsInitialised()); // we need this for the terrain properties (even when graphics are disabled)
|
||||
CTerrainTextureEntry* texentry = g_TexMan.FindTexture(textureNames[cur_terrain_tex]);
|
||||
m_TerrainTextures.push_back(texentry);
|
||||
if (CTerrainTextureManager::IsInitialised())
|
||||
{
|
||||
CTerrainTextureEntry* texentry = g_TexMan.FindTexture(textureNames[cur_terrain_tex]);
|
||||
m_TerrainTextures.push_back(texentry);
|
||||
}
|
||||
|
||||
cur_terrain_tex++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user