Mario editor: more terrain, can place Mario

This commit is contained in:
2021-05-07 23:17:05 +02:00
parent 85807ca962
commit c849895c72
8 changed files with 253 additions and 39 deletions
+6 -1
View File
@@ -62,7 +62,12 @@ void ToolVisitor::visit( const SDLPP::RenderObject &obj ) {
switch ( id ) {
case EDITOR_TERRAIN_ID:
remove_block = true;
if(obj.getId() == source_id) {
if(obj.getId() == source_id && getVisitorType() == TOOL_VISITOR_TYPE) {
add_block = false;
}
case EDITOR_CHARACTER_ID:
remove_block = true;
if(obj.getId() == source_id && getVisitorType() == MODIFIER_VISITOR_TYPE) {
add_block = false;
}
default: