mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-01 04:47:06 +01:00
Merge MaSzyna-EU07/maszyna master into feat/vat-people
master as of 9fecba82: the test mode (--test, null renderer), the AI braking
and passenger stops, the ESt3 brake, the SOD lamp, the 401Da oil pump lamp,
smoke of vehicles taken off the tracks, text displays with national
characters, the scenario picker drag and drop, the log written to the end of
the closing, unit and scenario tests, and the small fixes.
How the conflicts went:
- the OpenGL 3.3 and legacy renderers stay removed; what master changed in
them is carried over where this branch has a counterpart: the opaque
characters of text displays in scene_walk::Render_text(). The instancing
range of master is covered by the instance records of this branch, the
sizes of the sun and the moon are its own.
- test mode: the null backend picked in select_gfx_backend(), the window
hidden, no crash gui; settings of the removed renderers left out.
- materials: the matte and tinted copies of this branch (the tint in the
slot of the weathering), made again on a change of the season or the
weather (update_variants), before the track blends.
- tracks: this branch's Segment, Track and TrackUneven, with master's
replaced_shake(), uneven_underway(), rail_joints_moved(),
switch_followers() and the editor's add_followers(); tributary and unknown
track types stay as this branch loads them.
- the log service stops by StopLogService(), the exit paths of EU07.cpp too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXgG7F4L42c2F9sDSAJbT2
This commit is contained in:
@@ -505,6 +505,8 @@ bool anim_type_shared_by_instances( TAnimType a ) {
|
||||
// instanced path (one shared submodel tree across all instances) cannot serve.
|
||||
bool submodel_tree_blocks_instancing( TSubModel const *Sub ) {
|
||||
if( Sub == nullptr ) { return false; }
|
||||
// a text display shows the text of its instance, a tree shared by all instances can't do that
|
||||
if( Sub->eType == TP_TEXT ) { return true; }
|
||||
if( anim_type_unsafe_for_instancing( Sub->b_Anim ) ) { return true; }
|
||||
if( ( ( Sub->iFlags & 0x4000 ) != 0 ) && ( false == anim_type_shared_by_instances( Sub->b_Anim ) ) ) { return true; }
|
||||
if( submodel_tree_blocks_instancing( Sub->Child ) ) { return true; }
|
||||
@@ -524,6 +526,7 @@ bool submodel_tree_faces_camera( TSubModel const *Sub ) {
|
||||
} // anonymous namespace
|
||||
|
||||
int TAnimModel::s_instanceable_total = 0;
|
||||
unsigned int TAnimModel::s_instanceable_revoked = 0;
|
||||
int TAnimModel::s_classified_total = 0;
|
||||
int TAnimModel::s_rejected_no_pmodel = 0;
|
||||
int TAnimModel::s_rejected_lights = 0;
|
||||
@@ -562,6 +565,7 @@ std::shared_ptr<TAnimContainer> TAnimModel::AddContainer(std::string const &Name
|
||||
m_animlist.push_back(tmp);
|
||||
// containers are added by events after the instance was loaded and bucketed;
|
||||
// the instanced path skips RaAnimate(), so this instance has to be drawn on its own
|
||||
if( m_instanceable ) { ++s_instanceable_revoked; }
|
||||
m_instanceable = false;
|
||||
++scene::node_state_version;
|
||||
return tmp;
|
||||
@@ -797,6 +801,7 @@ void TAnimModel::SkinSet( int const Index, material_handle const Material ) {
|
||||
|
||||
m_materialdata.replacable_skins[ std::clamp( Index, 1, 4 ) ] = Material;
|
||||
// the instance stays in the bucket of its old skin set, where it would get the textures of the batch
|
||||
if( m_instanceable ) { ++s_instanceable_revoked; }
|
||||
m_instanceable = false;
|
||||
++scene::node_state_version;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user