mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-20 06:49:19 +02:00
position and rotation adjustment value snap mode in scenery editor, position adjustment for memory cells in scenery editor
This commit is contained in:
23
scene.cpp
23
scene.cpp
@@ -422,6 +422,18 @@ basic_cell::erase( TAnimModel *Instance ) {
|
||||
// TODO: update cell bounding area
|
||||
}
|
||||
|
||||
// removes provided memory cell from the cell
|
||||
void
|
||||
basic_cell::erase( TMemCell *Memorycell ) {
|
||||
|
||||
m_memorycells.erase(
|
||||
std::remove_if(
|
||||
std::begin( m_memorycells ), std::end( m_memorycells ),
|
||||
[=]( TMemCell *memorycell ) {
|
||||
return memorycell == Memorycell; } ),
|
||||
std::end( m_memorycells ) );
|
||||
}
|
||||
|
||||
// registers provided path in the lookup directory of the cell
|
||||
void
|
||||
basic_cell::register_end( TTrack *Path ) {
|
||||
@@ -1282,6 +1294,17 @@ basic_region::erase_instance( TAnimModel *Instance ) {
|
||||
}
|
||||
}
|
||||
|
||||
// removes specified memory cell from the region
|
||||
void
|
||||
basic_region::erase_memorycell( TMemCell *Memorycell ) {
|
||||
|
||||
auto const location { Memorycell->location() };
|
||||
|
||||
if( point_inside( location ) ) {
|
||||
section( location ).erase( Memorycell );
|
||||
}
|
||||
}
|
||||
|
||||
// inserts provided sound in the region
|
||||
void
|
||||
basic_region::insert_sound( sound_source *Sound, scratch_data &Scratchpad ) {
|
||||
|
||||
Reference in New Issue
Block a user