Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Hotfix: restored 'nocast' keyword in ODEF fileformat - resolves PSSM issues #2703

Merged
merged 1 commit into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions source/main/resources/odef_fileformat/ODefFileFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,11 @@ bool ODefParser::ProcessCurrentLine()
m_def->collision_meshes.emplace_back(
m_ctx.cbox_mesh_name, m_ctx.header_scale, m_ctx.cbox_groundmodel_name);
}
else if (line_str == "nocast")
{
m_def->header.cast_shadows = false;
}

return true;
}

Expand Down
1 change: 1 addition & 0 deletions source/main/resources/odef_fileformat/ODefFileFormat.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ struct ODefFile
{
std::string mesh_name;
Ogre::Vector3 scale;
bool cast_shadows = true;
} header;

bool mode_standard = false;
Expand Down
1 change: 1 addition & 0 deletions source/main/terrain/TerrainObjectManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ void TerrainObjectManager::LoadTerrainObject(const Ogre::String& name, const Ogr
{
Str<100> ebuf; ebuf << m_entity_counter++ << "-" << odef->header.mesh_name;
mo = new MeshObject(odef->header.mesh_name, m_resource_group, ebuf.ToCStr(), tenode);
mo->getEntity()->setCastShadows(odef->header.cast_shadows);
m_mesh_objects.push_back(mo);
}

Expand Down