aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* refacto: don't use RenderingEngine singleton on CAOLoic Blot2021-05-03
| | | | | | * we don't need on CAO side more than SceneManager, and temporary. Pass only required SceneManager as a parameter to build CAO and add them to the current scene * Use temporary the RenderingEngine singleton from ClientEnvironment, waitfor for better solution * Make ClientActiveObject::addToScene virtual function mandatory to be defined by children to ensure we don't forget to properly define it
* refacto: protect some RenderingEngine::get_scene_managerLoic Blot2021-05-03
| | | | | * protect it from Camera, Sky, ClientMap object calls * rename Game::sky to Game::m_sky
* refacto: RenderingEngine is now better hiddenLoic Blot2021-05-03
| | | | | | | | | | * No more access to the singleton instance from everywhere (RenderingEngine::get_instance dropped) * RenderingEngine::get_timer_time is now non static * RenderingEngine::draw_menu_scene is now non static * RenderingEngine::draw_scene is now non static * RenderingEngine::{initialize,finalize} are now non static * RenderingEngine::run is now non static * RenderingEngine::getWindowSize now have a static helper. It was mandatory to hide the global get_instance access
* refacto: hide mesh_cache inside the rendering engineLoic Blot2021-05-03
| | | | This permit cleaner access to meshCache and ensure we don't access to it from all the code
* refacto: add RenderingEngine::cleanupMeshCacheLoic Blot2021-05-03
| | | | This permits to prevent client to own the mesh cache cleanup logic. It's better in RenderingEngine
* refacto: rendering engine singleton removal step 1 (filesystem)Loic Blot2021-05-03
| | | | | | | | Make the RenderingEngine filesystem member non accessible from everywhere This permits also to determine that some lua code has directly a logic to extract zip file. Move this logic inside client, it's not the lua stack role to perform a such complex operation Found also another irrlicht <1.8 compat code to remove
* fix: drop old irrlicht <1.8 compat on Client::loadMediaLoic Blot2021-05-03
|
* Add `minetest.colorspec_to_colorstring` (#10425)Vincent Robinson2021-04-23
|
* Fix two CMake build issuessfan52021-04-21
| | | | | * PostgreSQL fallback code missed the includes (closes #11219) * build failed when Freetype enabled but not found
* Look for PostgreSQL library properly and fix CIsfan52021-04-20
|
* Enable cleanTransparent filter for mipmapping and improve its' algorithm ↵sfan52021-04-20
| | | | (#11145)
* Put torch/signlike node on floor if no paramtype2 (#11074)Wuzzy2021-04-20
|
* Add a key to toggle map block bounds (#11172)Seth Traverse2021-04-20
| | | | It's often useful to know where the map block boundaries are for doing server admin work and the like. Adds three modes: single mapblock, range of 5, and disabled.
* GLES fixes (#11205)sfan52021-04-18
| | | | | * Consistently set float precision for GLES * Enable DPI scaling on Windows+GLES
* Isolate library tables between sandbox and insecure envsfan52021-04-18
|
* Fix ignored OpenGLES2 include path and cmake warningsfan52021-04-16
|
* Attachments: Avoid data loss caused by set_attach() in callbacks (#11181)SmallJoker2021-04-13
|
* Buildbot changes to allow out-of-tree builds (#11180)sfan52021-04-11
| | | | | | | * Do proper out-of-tree builds with buildbot * Don't write to bin/ for cross builds * This allows safely building multiple builds from the same source dir, e.g. with the buildbot. * Disable Gettext (by default) and Freetype (entirely) for server builds
* Modifying fall damage via armor group (#11080)Wuzzy2021-04-11
| | | Adds a new fall_damage_add_percent armor group which influences the fall damage in addition to the existing node group.
* Fix server favorites not saving when client/serverlist/ doesn't exist ↵sfan52021-04-09
| | | | already (#11152)
* Don't reseed stars when changing star countWuzzy2021-04-09
|
* Make edit boxes respond to string input (IME) (#11156)yw052021-04-05
| | | Make edit boxes respond to string input events (introduced in minetest/irrlicht#23) that are usually triggered by entering text with an IME.
* Don't apply connection timeout limit to locally hosted serverssfan52021-04-05
| | | | fixes #11085
* Game: Scale damage flash to max HPSmallJoker2021-04-05
| | | | The flash intensity is calculated proportionally to the maximal HP.
* Reserve vectors before pushing and other code quality changes (#11161)sfan52021-04-05
|
* CGUITTFont optimizations (#11136)sfan52021-04-02
|
* Sort out cURL timeouts and increase defaultsfan52021-04-02
|
* Irrlicht support code maintenancesfan52021-03-31
|
* Draw items as 2D images (instead of meshes) when possiblesfan52021-03-30
|
* Block & report player self-interaction (#11137)Lars Müller2021-03-30
|
* Consistent title bar + render information in mainmenu (#10764)SmallJoker2021-03-30
|
* Fix wield image of plantlike_rooted (#11067)Wuzzy2021-03-30
|
* Degrotate support for mesh nodes (#7840)Vitaliy2021-03-30
|
* Replace fallback font nonsense with automatic per-glyph fallback (#11084)sfan52021-03-29
|
* Drop irrUString from MT, it's owned by irrlicht nowLoic Blot2021-03-26
|
* Fix attached-to-object sounds having a higher reference distanceDesour2021-03-23
|
* Fix broken `BiomeGen` abstraction (#11107)sfan52021-03-23
|
* Fix segfault for model[] without animation speedJean-Patrick Guerrero2021-03-21
|
* Restore minimal normal texture support (for minimap shading)Vitaliy2021-03-21
|
* Serialize tool capabilities JSON without whitespacesfan52021-03-20
| | | | fixes #11087
* Schematic: Properly deal with before/after node resolving and document (#11011)SmallJoker2021-03-20
| | | | This fixes an out-of-bounds index access when the node resolver was already applied to the schematic (i.e. biome decoration). Also improves the handling of the two cases: prior node resolving (m_nodenames), and after node resolving (manual lookup)
* Check for duplicate login in TOSERVER_INIT handler (#11017)Elias Fleckenstein2021-03-19
| | | i.e. checks for duplicate logins before sending all media data to the client.
* Scale mouse/joystick sensitivity depending on FOV (#11007)Elias Åström2021-03-19
|
* Drop old text input workarounds (#11089)sfan52021-03-19
| | | | | * Drop unused intlGUIEditBox * Drop unnecessary Linux text input workarounds
* GUIScene: Clear depth buffer + replace deprecated clearZBuffer callsJean-Patrick Guerrero2021-03-16
|
* Fix deprecated calls with Irrlicht 1.9Jean-Patrick Guerrero2021-03-16
|
* Tweak duration_to_string formattingWuzzy2021-03-16
|
* Enable Irrlicht debug logging with --tracesfan52021-03-12
|
* Avoid unnecessary copies during media/mesh loadingsfan52021-03-12
|
* Handle mesh load failure without crashingsfan52021-03-12
|
r *m_scenemgr; IRollbackManager *m_rollbackmgr; EmergeManager *m_emergemgr; }; TestGameDef::TestGameDef() { m_itemdef = createItemDefManager(); m_nodedef = createNodeDefManager(); defineSomeNodes(); } TestGameDef::~TestGameDef() { delete m_itemdef; delete m_nodedef; } void TestGameDef::defineSomeNodes() { IWritableItemDefManager *idef = (IWritableItemDefManager *)m_itemdef; IWritableNodeDefManager *ndef = (IWritableNodeDefManager *)m_nodedef; ItemDefinition itemdef; ContentFeatures f; //// Stone itemdef = ItemDefinition(); itemdef.type = ITEM_NODE; itemdef.name = "default:stone"; itemdef.description = "Stone"; itemdef.groups["cracky"] = 3; itemdef.inventory_image = "[inventorycube" "{default_stone.png" "{default_stone.png" "{default_stone.png"; f = ContentFeatures(); f.name = itemdef.name; for(int i = 0; i < 6; i++) f.tiledef[i].name = "default_stone.png"; f.is_ground_content = true; idef->registerItem(itemdef); t_CONTENT_STONE = ndef->set(f.name, f); //// Grass itemdef = ItemDefinition(); itemdef.type = ITEM_NODE; itemdef.name = "default:dirt_with_grass"; itemdef.description = "Dirt with grass"; itemdef.groups["crumbly"] = 3; itemdef.inventory_image = "[inventorycube" "{default_grass.png" "{default_dirt.png&default_grass_side.png" "{default_dirt.png&default_grass_side.png"; f = ContentFeatures(); f.name = itemdef.name; f.tiledef[0].name = "default_grass.png"; f.tiledef[1].name = "default_dirt.png"; for(int i = 2; i < 6; i++) f.tiledef[i].name = "default_dirt.png^default_grass_side.png"; f.is_ground_content = true; idef->registerItem(itemdef); t_CONTENT_GRASS = ndef->set(f.name, f); //// Torch (minimal definition for lighting tests) itemdef = ItemDefinition(); itemdef.type = ITEM_NODE; itemdef.name = "default:torch"; f = ContentFeatures(); f.name = itemdef.name; f.param_type = CPT_LIGHT; f.light_propagates = true; f.sunlight_propagates = true; f.light_source = LIGHT_MAX-1; idef->registerItem(itemdef); t_CONTENT_TORCH = ndef->set(f.name, f); //// Water itemdef = ItemDefinition(); itemdef.type = ITEM_NODE; itemdef.name = "default:water"; itemdef.description = "Water"; itemdef.inventory_image = "[inventorycube" "{default_water.png" "{default_water.png" "{default_water.png"; f = ContentFeatures(); f.name = itemdef.name; f.alpha = 128; f.liquid_type = LIQUID_SOURCE; f.liquid_viscosity = 4; f.is_ground_content = true; f.groups["liquids"] = 3; for(int i = 0; i < 6; i++) f.tiledef[i].name = "default_water.png"; idef->registerItem(itemdef); t_CONTENT_WATER = ndef->set(f.name, f); //// Lava itemdef = ItemDefinition(); itemdef.type = ITEM_NODE; itemdef.name = "default:lava"; itemdef.description = "Lava"; itemdef.inventory_image = "[inventorycube" "{default_lava.png" "{default_lava.png" "{default_lava.png"; f = ContentFeatures(); f.name = itemdef.name; f.alpha = 128; f.liquid_type = LIQUID_SOURCE; f.liquid_viscosity = 7; f.light_source = LIGHT_MAX-1; f.is_ground_content = true; f.groups["liquids"] = 3; for(int i = 0; i < 6; i++) f.tiledef[i].name = "default_lava.png"; idef->registerItem(itemdef); t_CONTENT_LAVA = ndef->set(f.name, f); //// Brick itemdef = ItemDefinition(); itemdef.type = ITEM_NODE; itemdef.name = "default:brick"; itemdef.description = "Brick"; itemdef.groups["cracky"] = 3; itemdef.inventory_image = "[inventorycube" "{default_brick.png" "{default_brick.png" "{default_brick.png"; f = ContentFeatures(); f.name = itemdef.name; for(int i = 0; i < 6; i++) f.tiledef[i].name = "default_brick.png"; f.is_ground_content = true; idef->registerItem(itemdef); t_CONTENT_BRICK = ndef->set(f.name, f); } //// //// run_tests //// bool run_tests() { DSTACK(FUNCTION_NAME); u32 t1 = porting::getTime(PRECISION_MILLI); TestGameDef gamedef; g_logger.setLevelSilenced(LL_ERROR, true); u32 num_modules_failed = 0; u32 num_total_tests_failed = 0; u32 num_total_tests_run = 0; std::vector<TestBase *> &testmods = TestManager::getTestModules(); for (size_t i = 0; i != testmods.size(); i++) { if (!testmods[i]->testModule(&gamedef)) num_modules_failed++; num_total_tests_failed += testmods[i]->num_tests_failed; num_total_tests_run += testmods[i]->num_tests_run; } u32 tdiff = porting::getTime(PRECISION_MILLI) - t1; g_logger.setLevelSilenced(LL_ERROR, false); const char *overall_status = (num_modules_failed == 0) ? "PASSED" : "FAILED"; rawstream << "++++++++++++++++++++++++++++++++++++++++" << "++++++++++++++++++++++++++++++++++++++++" << std::endl << "Unit Test Results: " << overall_status << std::endl << " " << num_modules_failed << " / " << testmods.size() << " failed modules (" << num_total_tests_failed << " / " << num_total_tests_run << " failed individual tests)." << std::endl << " Testing took " << tdiff << "ms total." << std::endl << "++++++++++++++++++++++++++++++++++++++++" << "++++++++++++++++++++++++++++++++++++++++" << std::endl; return num_modules_failed; } //// //// TestBase //// bool TestBase::testModule(IGameDef *gamedef) { rawstream << "======== Testing module " << getName() << std::endl; u32 t1 = porting::getTime(PRECISION_MILLI); runTests(gamedef); u32 tdiff = porting::getTime(PRECISION_MILLI) - t1; rawstream << "======== Module " << getName() << " " << (num_tests_failed ? "failed" : "passed") << " (" << num_tests_failed << " failures / " << num_tests_run << " tests) - " << tdiff << "ms" << std::endl; if (!m_test_dir.empty()) fs::RecursiveDelete(m_test_dir); return num_tests_failed == 0; } std::string TestBase::getTestTempDirectory() { if (!m_test_dir.empty()) return m_test_dir; char buf[32]; snprintf(buf, sizeof(buf), "%08X", myrand()); m_test_dir = fs::TempPath() + DIR_DELIM "mttest_" + buf; if (!fs::CreateDir(m_test_dir)) throw TestFailedException(); return m_test_dir; } std::string TestBase::getTestTempFile() { char buf[32]; snprintf(buf, sizeof(buf), "%08X", myrand()); return getTestTempDirectory() + DIR_DELIM + buf + ".tmp"; } /* NOTE: These tests became non-working then NodeContainer was removed. These should be redone, utilizing some kind of a virtual interface for Map (IMap would be fine). */ #if 0 struct TestMapBlock: public TestBase { class TC : public NodeContainer { public: MapNode node; bool position_valid; core::list<v3s16> validity_exceptions; TC() { position_valid = true; } virtual bool isValidPosition(v3s16 p) { //return position_valid ^ (p==position_valid_exception); bool exception = false; for(core::list<v3s16>::Iterator i=validity_exceptions.begin(); i != validity_exceptions.end(); i++) { if(p == *i) { exception = true; break; } } return exception ? !position_valid : position_valid; } virtual MapNode getNode(v3s16 p) { if(isValidPosition(p) == false) throw InvalidPositionException(); return node; } virtual void setNode(v3s16 p, MapNode & n) { if(isValidPosition(p) == false) throw InvalidPositionException(); }; virtual u16 nodeContainerId() const { return 666; } }; void Run() { TC parent; MapBlock b(&parent, v3s16(1,1,1)); v3s16 relpos(MAP_BLOCKSIZE, MAP_BLOCKSIZE, MAP_BLOCKSIZE); UASSERT(b.getPosRelative() == relpos); UASSERT(b.getBox().MinEdge.X == MAP_BLOCKSIZE); UASSERT(b.getBox().MaxEdge.X == MAP_BLOCKSIZE*2-1); UASSERT(b.getBox().MinEdge.Y == MAP_BLOCKSIZE); UASSERT(b.getBox().MaxEdge.Y == MAP_BLOCKSIZE*2-1); UASSERT(b.getBox().MinEdge.Z == MAP_BLOCKSIZE); UASSERT(b.getBox().MaxEdge.Z == MAP_BLOCKSIZE*2-1); UASSERT(b.isValidPosition(v3s16(0,0,0)) == true); UASSERT(b.isValidPosition(v3s16(-1,0,0)) == false); UASSERT(b.isValidPosition(v3s16(-1,-142,-2341)) == false); UASSERT(b.isValidPosition(v3s16(-124,142,2341)) == false); UASSERT(b.isValidPosition(v3s16(MAP_BLOCKSIZE-1,MAP_BLOCKSIZE-1,MAP_BLOCKSIZE-1)) == true); UASSERT(b.isValidPosition(v3s16(MAP_BLOCKSIZE-1,MAP_BLOCKSIZE,MAP_BLOCKSIZE-1)) == false); /* TODO: this method should probably be removed if the block size isn't going to be set variable */ /*UASSERT(b.getSizeNodes() == v3s16(MAP_BLOCKSIZE, MAP_BLOCKSIZE, MAP_BLOCKSIZE));*/ // Changed flag should be initially set UASSERT(b.getModified() == MOD_STATE_WRITE_NEEDED); b.resetModified(); UASSERT(b.getModified() == MOD_STATE_CLEAN); // All nodes should have been set to // .d=CONTENT_IGNORE and .getLight() = 0 for(u16 z=0; z<MAP_BLOCKSIZE; z++) for(u16 y=0; y<MAP_BLOCKSIZE; y++) for(u16 x=0; x<MAP_BLOCKSIZE; x++) { //UASSERT(b.getNode(v3s16(x,y,z)).getContent() == CONTENT_AIR); UASSERT(b.getNode(v3s16(x,y,z)).getContent() == CONTENT_IGNORE); UASSERT(b.getNode(v3s16(x,y,z)).getLight(LIGHTBANK_DAY) == 0); UASSERT(b.getNode(v3s16(x,y,z)).getLight(LIGHTBANK_NIGHT) == 0); } { MapNode n(CONTENT_AIR); for(u16 z=0; z<MAP_BLOCKSIZE; z++) for(u16 y=0; y<MAP_BLOCKSIZE; y++) for(u16 x=0; x<MAP_BLOCKSIZE; x++) { b.setNode(v3s16(x,y,z), n); } } /* Parent fetch functions */ parent.position_valid = false; parent.node.setContent(5); MapNode n; // Positions in the block should still be valid UASSERT(b.isValidPositionParent(v3s16(0,0,0)) == true); UASSERT(b.isValidPositionParent(v3s16(MAP_BLOCKSIZE-1,MAP_BLOCKSIZE-1,MAP_BLOCKSIZE-1)) == true); n = b.getNodeParent(v3s16(0,MAP_BLOCKSIZE-1,0)); UASSERT(n.getContent() == CONTENT_AIR); // ...but outside the block they should be invalid UASSERT(b.isValidPositionParent(v3s16(-121,2341,0)) == false); UASSERT(b.isValidPositionParent(v3s16(-1,0,0)) == false); UASSERT(b.isValidPositionParent(v3s16(MAP_BLOCKSIZE-1,MAP_BLOCKSIZE-1,MAP_BLOCKSIZE)) == false); { bool exception_thrown = false; try{ // This should throw an exception MapNode n = b.getNodeParent(v3s16(0,0,-1)); } catch(InvalidPositionException &e) { exception_thrown = true; } UASSERT(exception_thrown); } parent.position_valid = true; // Now the positions outside should be valid UASSERT(b.isValidPositionParent(v3s16(-121,2341,0)) == true); UASSERT(b.isValidPositionParent(v3s16(-1,0,0)) == true); UASSERT(b.isValidPositionParent(v3s16(MAP_BLOCKSIZE-1,MAP_BLOCKSIZE-1,MAP_BLOCKSIZE)) == true); n = b.getNodeParent(v3s16(0,0,MAP_BLOCKSIZE)); UASSERT(n.getContent() == 5); /* Set a node */ v3s16 p(1,2,0); n.setContent(4); b.setNode(p, n); UASSERT(b.getNode(p).getContent() == 4); //TODO: Update to new system /*UASSERT(b.getNodeTile(p) == 4); UASSERT(b.getNodeTile(v3s16(-1,-1,0)) == 5);*/ /* propagateSunlight() */ // Set lighting of all nodes to 0 for(u16 z=0; z<MAP_BLOCKSIZE; z++){ for(u16 y=0; y<MAP_BLOCKSIZE; y++){ for(u16 x=0; x<MAP_BLOCKSIZE; x++){ MapNode n = b.getNode(v3s16(x,y,z)); n.setLight(LIGHTBANK_DAY, 0); n.setLight(LIGHTBANK_NIGHT, 0); b.setNode(v3s16(x,y,z), n); } } } { /* Check how the block handles being a lonely sky block */ parent.position_valid = true; b.setIsUnderground(false); parent.node.setContent(CONTENT_AIR); parent.node.setLight(LIGHTBANK_DAY, LIGHT_SUN); parent.node.setLight(LIGHTBANK_NIGHT, 0); core::map<v3s16, bool> light_sources; // The bottom block is invalid, because we have a shadowing node UASSERT(b.propagateSunlight(light_sources) == false); UASSERT(b.getNode(v3s16(1,4,0)).getLight(LIGHTBANK_DAY) == LIGHT_SUN); UASSERT(b.getNode(v3s16(1,3,0)).getLight(LIGHTBANK_DAY) == LIGHT_SUN); UASSERT(b.getNode(v3s16(1,2,0)).getLight(LIGHTBANK_DAY) == 0); UASSERT(b.getNode(v3s16(1,1,0)).getLight(LIGHTBANK_DAY) == 0); UASSERT(b.getNode(v3s16(1,0,0)).getLight(LIGHTBANK_DAY) == 0); UASSERT(b.getNode(v3s16(1,2,3)).getLight(LIGHTBANK_DAY) == LIGHT_SUN); UASSERT(b.getFaceLight2(1000, p, v3s16(0,1,0)) == LIGHT_SUN); UASSERT(b.getFaceLight2(1000, p, v3s16(0,-1,0)) == 0); UASSERT(b.getFaceLight2(0, p, v3s16(0,-1,0)) == 0); // According to MapBlock::getFaceLight, // The face on the z+ side should have double-diminished light //UASSERT(b.getFaceLight(p, v3s16(0,0,1)) == diminish_light(diminish_light(LIGHT_MAX))); // The face on the z+ side should have diminished light UASSERT(b.getFaceLight2(1000, p, v3s16(0,0,1)) == diminish_light(LIGHT_MAX)); } /* Check how the block handles being in between blocks with some non-sunlight while being underground */ { // Make neighbours to exist and set some non-sunlight to them parent.position_valid = true; b.setIsUnderground(true); parent.node.setLight(LIGHTBANK_DAY, LIGHT_MAX/2); core::map<v3s16, bool> light_sources; // The block below should be valid because there shouldn't be // sunlight in there either UASSERT(b.propagateSunlight(light_sources, true) == true); // Should not touch nodes that are not affected (that is, all of them) //UASSERT(b.getNode(v3s16(1,2,3)).getLight() == LIGHT_SUN); // Should set light of non-sunlighted blocks to 0. UASSERT(b.getNode(v3s16(1,2,3)).getLight(LIGHTBANK_DAY) == 0); } /* Set up a situation where: - There is only air in this block - There is a valid non-sunlighted block at the bottom, and - Invalid blocks elsewhere. - the block is not underground. This should result in bottom block invalidity */ { b.setIsUnderground(false); // Clear block for(u16 z=0; z<MAP_BLOCKSIZE; z++){ for(u16 y=0; y<MAP_BLOCKSIZE; y++){ for(u16 x=0; x<MAP_BLOCKSIZE; x++){ MapNode n; n.setContent(CONTENT_AIR); n.setLight(LIGHTBANK_DAY, 0); b.setNode(v3s16(x,y,z), n); } } } // Make neighbours invalid parent.position_valid = false; // Add exceptions to the top of the bottom block for(u16 x=0; x<MAP_BLOCKSIZE; x++) for(u16 z=0; z<MAP_BLOCKSIZE; z++) { parent.validity_exceptions.push_back(v3s16(MAP_BLOCKSIZE+x, MAP_BLOCKSIZE-1, MAP_BLOCKSIZE+z)); } // Lighting value for the valid nodes parent.node.setLight(LIGHTBANK_DAY, LIGHT_MAX/2); core::map<v3s16, bool> light_sources; // Bottom block is not valid UASSERT(b.propagateSunlight(light_sources) == false); } } }; struct TestMapSector: public TestBase { class TC : public NodeContainer { public: MapNode node; bool position_valid; TC() { position_valid = true; } virtual bool isValidPosition(v3s16 p) { return position_valid; } virtual MapNode getNode(v3s16 p) { if(position_valid == false) throw InvalidPositionException(); return node; } virtual void setNode(v3s16 p, MapNode & n) { if(position_valid == false) throw InvalidPositionException(); }; virtual u16 nodeContainerId() const { return 666; } }; void Run() { TC parent; parent.position_valid = false; // Create one with no heightmaps ServerMapSector sector(&parent, v2s16(1,1)); UASSERT(sector.getBlockNoCreateNoEx(0) == 0); UASSERT(sector.getBlockNoCreateNoEx(1) == 0); MapBlock * bref = sector.createBlankBlock(-2); UASSERT(sector.getBlockNoCreateNoEx(0) == 0); UASSERT(sector.getBlockNoCreateNoEx(-2) == bref); //TODO: Check for AlreadyExistsException /*bool exception_thrown = false; try{ sector.getBlock(0); } catch(InvalidPositionException &e){ exception_thrown = true; } UASSERT(exception_thrown);*/ } }; #endif