Remove redundant functions from blocks.cpp, fix editor problem with pagination
This commit is contained in:
+10
-10
@@ -131,17 +131,17 @@ void loadMap( std::shared_ptr< SDLPP::Scene > &scene,
|
||||
auto obj = createTerrainBlock(
|
||||
block.getTerrainId(), block.getTerrainType(),
|
||||
renderer, i, j, destructible, editor );
|
||||
if(obj == nullptr)
|
||||
continue;
|
||||
obj->setCoinCount(coinCount);
|
||||
if(removeCollisions) {
|
||||
obj->removeCollisions();
|
||||
}
|
||||
if ( obj != nullptr ) {
|
||||
if ( editor ) {
|
||||
obj->getCollisions()[0]->setId( EDITOR_TERRAIN_ID );
|
||||
if(obj != nullptr) {
|
||||
obj->setCoinCount(coinCount);
|
||||
if(removeCollisions) {
|
||||
obj->removeCollisions();
|
||||
}
|
||||
if ( obj != nullptr ) {
|
||||
if ( editor ) {
|
||||
obj->getCollisions()[0]->setId( EDITOR_TERRAIN_ID );
|
||||
}
|
||||
scene->addObject( obj );
|
||||
}
|
||||
scene->addObject( obj );
|
||||
}
|
||||
}
|
||||
if ( block.hasCharacter() ) {
|
||||
|
||||
Reference in New Issue
Block a user