mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Possible fix for levels without statics
This commit is contained in:
parent
f2b003bd57
commit
45d61b5ba9
2 changed files with 12 additions and 3 deletions
|
@ -30,7 +30,7 @@ test = Level.new();
|
|||
test.nameKey = "level_andrea1";
|
||||
test.scriptFile = "Scripts\\andrea1.lua";
|
||||
test.ambientTrack = "108_A8_Coastal";
|
||||
test.levelFile = "Data\\andrea1.ten";
|
||||
test.levelFile = "Data\\luatest.ten";
|
||||
test.loadScreenFile = "Screens\\rome.jpg";
|
||||
test.weather = 1;
|
||||
test.weatherStrength = 1;
|
||||
|
|
|
@ -679,9 +679,18 @@ namespace TEN::Renderer
|
|||
|
||||
m_staticObjects[StaticObjectsIds[i]] = staticObject;
|
||||
}
|
||||
m_staticsVertexBuffer = VertexBuffer(m_device.Get(), staticsVertices.size(), staticsVertices.data());
|
||||
m_staticsIndexBuffer = IndexBuffer(m_device.Get(), staticsIndices.size(), staticsIndices.data());
|
||||
|
||||
if (staticsVertices.size() > 0)
|
||||
{
|
||||
m_staticsVertexBuffer = VertexBuffer(m_device.Get(), staticsVertices.size(), staticsVertices.data());
|
||||
m_staticsIndexBuffer = IndexBuffer(m_device.Get(), staticsIndices.size(), staticsIndices.data());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_staticsVertexBuffer = VertexBuffer(m_device.Get(), 1);
|
||||
m_staticsIndexBuffer = IndexBuffer(m_device.Get(), 1);
|
||||
}
|
||||
|
||||
// Step 5: prepare sprites
|
||||
m_sprites.resize(g_Level.Sprites.size());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue