Merge lp:~widelands-dev/widelands/allows_seafaring_performance into lp:widelands
Proposed by
GunChleoc
Status: | Merged |
---|---|
Merged at revision: | 8653 |
Proposed branch: | lp:~widelands-dev/widelands/allows_seafaring_performance |
Merge into: | lp:widelands |
Diff against target: |
324 lines (+71/-22) 6 files modified
src/logic/map.cc (+19/-5) src/logic/map.h (+8/-3) src/map_io/s2map.cc (+1/-0) src/scripting/lua_map.cc (+30/-14) src/scripting/lua_map.h (+1/-0) test/maps/two_ponds.wmf/scripting/test_seafaring.lua (+12/-0) |
To merge this branch: | bzr merge lp:~widelands-dev/widelands/allows_seafaring_performance |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Klaus Halfmann | review, compile, automated test | Approve | |
Review via email: mp+342987@code.launchpad.net |
Commit message
Only recalculate whether a map allows seafaring when something has changed
- New function Map::recalculat
- Map::allows_
- On map load
- On editor save
- When a port space is changed via Lua scripting
- When it is triggered by LuaMap:
- Added test
- Some documentation tweaks to lua_map.cc.
- Fixed the check for invalid terrains in LuaField::get_terr.
Description of the change
Only recalculate whether a map allows seafaring when something has changed. This new design is a bit more fragile, but I think the performance gain is worth it, because the AI needs this function.
To post a comment you must log in.
Continuous integration builds have changed state:
Travis build 3369. State: passed. Details: https:/ /travis- ci.org/ widelands/ widelands/ builds/ 364989186. /ci.appveyor. com/project/ widelands- dev/widelands/ build/_ widelands_ dev_widelands_ allows_ seafaring_ performance- 3175.
Appveyor build 3175. State: success. Details: https:/