Compare commits

..

456 Commits
0.4.3 ... 0.4.6

Author SHA1 Message Date
PilzAdam
f85c1165c2 Update doc/lua-api.txt 2013-04-03 22:41:18 +02:00
kwolekr
37acadc2af Bump version to 0.4.6 2013-04-03 16:36:25 -04:00
Weblate
82709549ff Merge remote branch 'origin/master' 2013-04-03 20:32:13 +02:00
Diego Martínez
6e96bc98de Translated using Weblate (Spanish) 2013-04-03 20:32:01 +02:00
Dêivan Ortiz Munhoz
60aaf65b10 Translated using Weblate (Polish) 2013-04-03 20:32:01 +02:00
Chynggyz Jumaliev
7d83fefd7f Translated using Weblate (Kirghiz) 2013-04-03 20:32:01 +02:00
Sfan5
2bb559be82 Translated using Weblate (German) 2013-04-03 20:32:01 +02:00
we prefer instagib metl3
d27f57e48f Translated using Weblate (French) 2013-04-03 20:32:01 +02:00
Pilz Adam
e59d971e7b Translated using Weblate (Estonian) 2013-04-03 17:02:27 +02:00
Ragnar Laud
025f4d28c1 Translated using Weblate (Estonian) 2013-04-03 17:01:52 +02:00
Dêivan Ortiz Munhoz
0ed34e6780 Translated using Weblate (Portuguese) 2013-04-03 16:35:58 +02:00
PilzAdam
9ff8012655 Return an ItemStack in minetest.item_place() if nodes' on rightclick doesnt return it 2013-04-02 15:19:02 +02:00
Esteban I. RM
7d036e3ab2 Translated using Weblate (Spanish) 2013-04-02 01:59:59 +02:00
Markus Lehmann
8f57246620 Translated using Weblate (German) 2013-04-01 18:56:17 +02:00
Diego Martínez
2985dc4fc8 Translated using Weblate (Spanish) 2013-04-01 18:46:24 +02:00
Maciej Kasatkin
dd0b8c3de5 Translated using Weblate (Polish) 2013-04-01 18:41:40 +02:00
we prefer instagib metl3
7dd07cc7c5 Translated using Weblate (French) 2013-04-01 14:08:31 +02:00
kwolekr
8d4b768297 Add Ore generation flags, implement ore absolute height 2013-03-31 20:02:03 -04:00
kwolekr
35ed5198fe Increase value range of Ore::clust_scarcity 2013-03-31 12:26:25 -04:00
Diego Martínez
624461c6c6 Translated using Weblate (Spanish) 2013-03-31 16:25:50 +02:00
Weblate
319662c0ed Merge remote branch 'origin/master' 2013-03-31 12:27:05 +02:00
Fabio Luongo
5b597a6bfa Translated using Weblate (Italian) 2013-03-31 12:27:00 +02:00
Pilz Adam
68fb68a83b Translated using Weblate (German) 2013-03-31 12:27:00 +02:00
Ilya Zhuravlev
a2e5706661 Add Kyrgyz language 2013-03-31 14:24:52 +04:00
ShadowNinja
7d3b3890b5 Add a small optimization to the menu splash and remove a old comment 2013-03-30 22:02:46 -04:00
khonkhortisan
96387ee88a Don't load menu textures every frame 2013-03-30 21:52:13 -04:00
0gb.us
23590a8383 Don't grant priveleges to non-existent players.
When accidentally misspelling a name, privileges are sometimes granted to non-existent players, leaving them with the extra privileges, but without the default privileges, if they ever join the server. This corrects that by disallowing /grant from working with invalid players. For completeness, it does the same for /revoke.
2013-03-30 21:50:07 -04:00
Zeg9
923a97b108 Install locales in minetest directory, so they are correctly loaded 2013-03-30 21:48:12 -04:00
kwolekr
c517215bcf Fix MapgenV6::generateCaves possible division by 0 and misc. cosmetic fixes 2013-03-30 21:24:37 -04:00
kwolekr
414f0275cf Optimize CNodeDefManager::getIds 2013-03-30 19:14:42 -04:00
Pilz Adam
04414a963c Translated using Weblate (German) 2013-03-30 20:01:56 +01:00
PilzAdam
02d8df94a8 Update po files 2013-03-30 19:57:27 +01:00
Weblate
a0566270d9 Merge remote branch 'origin/master' 2013-03-30 19:49:52 +01:00
Lord James
0d83bdc3aa Translated using Weblate (Spanish) 2013-03-30 19:49:43 +01:00
Anton Tsyganenko
062a140b9c Translated using Weblate (Russian) 2013-03-30 19:49:43 +01:00
Mitori Itoshiki
3e9ed6c1c7 Translated using Weblate (Japanese) 2013-03-30 19:49:43 +01:00
Fabio Luongo
3983019fd8 Translated using Weblate (Italian) 2013-03-30 19:49:42 +01:00
Ragnar Laud
3ec3aca78d Translated using Weblate (Estonian) 2013-03-30 19:49:42 +01:00
PilzAdam
1aa50b1362 Make the textbox for serverlist title wider 2013-03-30 18:56:29 +01:00
PilzAdam
e17ae475cf GUI: Make singleplayer default tab, store selected serverlist, show title of serverlist 2013-03-30 18:34:36 +01:00
kwolekr
6cf581e360 Fix build on Linux with some glibcs 2013-03-29 21:12:14 -04:00
proller
177ca4f4d5 Fix backward compatibility for server uptime in master server web page 2013-03-30 02:36:06 +04:00
proller
16c11eb4a3 Masterserver: report gameid, uptime, cosmetic fixes on server web page 2013-03-30 02:03:24 +04:00
kwolekr
df49b93877 Add varying levels of precision to TimeTaker 2013-03-29 16:53:15 -04:00
PilzAdam
5e7e0347cd Add different place sound for nodes 2013-03-29 20:14:18 +01:00
PilzAdam
7d9329ecfe New damage system, add damageGroups to ToolCapabilities, bump protocol version 2013-03-29 20:14:09 +01:00
kwolekr
3640c8c051 Update Credits tab 2013-03-29 14:43:47 -04:00
0gb.us
02cbb58107 Fix node replacement in not-quite-loaded chunks
When first entering an area, sometimes placing nodes replaces other nodes that are not buildable_to. This seems to be caused by the fact that nodes in unloaded map blocks are treated as ignore, a node that is buildable_to. This fixes that, by using get_node_or_nil() instead of the previously-used get_node(), then checking to see if the nodes were actually loaded before replacing.
2013-03-29 14:18:51 -04:00
kwolekr
5b854f95d2 Fix last singlenode modification 2013-03-29 13:18:09 -04:00
kwolekr
b0f39da131 Don't replace existing nodes in singlenode mapgen 2013-03-29 11:15:49 -04:00
4aiman Konsorumaniakku
dc54af7a89 Translated using Weblate (Russian) 2013-03-28 13:15:36 +01:00
kwolekr
d01b74d00a Prevent infinite loop with invalid Inventory format 2013-03-27 23:27:31 -04:00
PilzAdam
a782a88913 Fix parameter list of obj:set_attach() and obj:set_bone_position() 2013-03-28 01:09:01 +01:00
sapier
8800896824 Closed add object <-> object collision handling 2013-03-28 00:09:24 +01:00
Perttu Ahola
880d9e53c3 README.txt: Add some build stuff 2013-03-26 18:40:32 +02:00
kwolekr
26cad481d0 Vary ore sheet y position by noise 2013-03-24 22:35:23 -04:00
kwolekr
8d13967aa3 Ensure ore can fit in OreSheet::generate() 2013-03-24 20:19:59 -04:00
PilzAdam
650d706d35 Use minetest.register_ore() in minimal 2013-03-24 21:20:41 +01:00
kwolekr
0e07a7157f Add more error checking to l_register_ore 2013-03-24 15:40:53 -04:00
Perttu Ahola
423d69bd40 Fix indentation of lua_api.txt 2013-03-24 21:39:15 +02:00
kwolekr
6767ed74f8 Update lua_api.txt 2013-03-24 15:20:37 -04:00
kwolekr
57cbb8bfd8 Add Ore infrastructure and l_register_ore() 2013-03-24 13:23:33 -04:00
proller
f70378f7f5 Mapgen indev: float islands, larger far biomes 2013-03-24 03:40:15 +04:00
Jeija
e1ff5b1361 Allow spawning particles from the server, from lua
Spawn single particles or make use of ParticleSpawner for many randomly spawned particles.
Accessible in Lua using minetest.spawn_particle and minetest.add_particlespawner.
Increase Protocol Version to 17.

Conflicts:
	src/clientserver.h
2013-03-23 23:16:29 +01:00
PilzAdam
ab57fdac44 Move rightclickable to the proper place 2013-03-23 23:15:30 +01:00
Jürgen Doser
dacc8cdb3a Include backface_culling flag in serialization format for TileDefs
This way flowing liquids actually show the backface when specified to
do so. Without this, TileDefs where by default initialized with
backface_culling = true and never set otherwise.

For backwards compatibility, an old client connected to a new server,
or a new client connected to an old server will behave like before
i.e., backface_culling is always true.
2013-03-23 23:10:47 +01:00
Mukul Sati
ca7043e52d Set of changes to build mineTest using Visual Studio 11.0. These affect
the following:
1. String concatenation in guiMainMenu.cpp - it is required for all
individual strings to be of the same type <unicode/non-unicode>; adding
explicit L qualifier before the other strings.
2. Correcting type of BlockMakeData to struct in place of class forward
declarations. This information is used for name decoration by Visual
Studio, leading to linker errors in case of mismatches.
3. Windows headers define max as a macro somewhere, leading to a compile
time error in profiler.h; using () around function to prevent macro match
from occurring.
2013-03-24 00:53:10 +04:00
RealBadAngel
6f8d40ef5d 6d facedir 2013-03-23 21:31:05 +01:00
proller
2318d19bb4 Merge pull request #563 from proller/guest
Random guest name and finite liquid checkbox
2013-03-23 08:21:30 -07:00
proller
f98d0433f9 Random guest name and finite liquid checkbox 2013-03-23 19:17:08 +04:00
Perttu Ahola
34b185e955 Add singlenode mapgen; generates solely the node 'mapgen_singlenode', defaults to air 2013-03-22 19:16:51 +02:00
Perttu Ahola
b6dcadeb79 CMakeLists.txt: Add games/common to be installed when available 2013-03-22 07:46:48 +02:00
Perttu Ahola
c2250d95c4 Support game-specific minetest.conf 2013-03-21 22:22:15 +02:00
Perttu Ahola
adc52f3f3c lua_api.txt: Document paths, games and common mod loading 2013-03-21 20:04:00 +02:00
Perttu Ahola
0a568a6037 Update buildwin32.sh to get minetest/common 2013-03-21 19:45:20 +02:00
Perttu Ahola
0747c285cd Update README.txt to instruct to get minetest/common too 2013-03-21 19:43:08 +02:00
Perttu Ahola
306d1ab866 Common mods support
Implement "common mods", includeable from
  {$user,$share}/games/common/$modname
by using the game.conf setting
  common_mods = $modname,$modname2,...
2013-03-21 18:56:42 +02:00
Splizard
9b5bb5c755 Allow falling nodes to pass through solid "buildable_to" nodes. 2013-03-19 16:38:56 +01:00
Juhani Numminen
450e7ef0c5 Git-ignore SQLite build files 2013-03-19 16:20:13 +01:00
kwolekr
8f0d29f931 Fix Map::initBlockMake to actually use chunksize setting 2013-03-18 22:19:02 -04:00
PilzAdam
d6026a5fee Prevent passing nil to unpack() in minetest.after 2013-03-19 00:15:41 +01:00
kwolekr
939397dd6e Add jungle grass to jungles 2013-03-17 23:08:11 -04:00
Ilya Zhuravlev
d207d359d1 Don't erase modified_blocks 2013-03-17 21:17:13 +04:00
ShadowNinja
5f88cd98ad Add FPS limit to menu clouds 2013-03-17 12:13:48 -04:00
RealBadAngel
7f51b2da28 lua methods set_look_pitch and set_look_yaw 2013-03-17 11:39:35 -04:00
PilzAdam
c00c8832c6 Fix new_style_water 2013-03-17 11:28:43 -04:00
PilzAdam
5a9fd8f433 Add missing settings to minetest.conf.example 2013-03-17 13:07:53 +01:00
Jeija
fc5d2074b9 Allow minetest.after to take a variable number of arguments 2013-03-17 00:23:30 -04:00
proller
10c03e1a9d build with ogles2 driver 2013-03-16 22:37:50 -04:00
kwolekr
67228160ae Some minor cleanups from the last commit 2013-03-16 22:34:12 -04:00
proller
165498cecf initial mapgen indev version with farscale feature and huge caves 2013-03-16 21:48:32 -04:00
kwolekr
e3badd7062 Make saplings only grow on dirt or grass, make jungle tree trunks only replace air 2013-03-16 19:55:29 -04:00
kwolekr
6823ce99a7 Re-add jungles, apple trees 2013-03-16 17:06:11 -04:00
kwolekr
1f1ad9fd23 Optimize Mapgen::updateLighting(), add setLighting() 2013-03-15 23:04:50 -04:00
proller
f5ab056b38 Liquid fine tuning 2013-03-14 17:06:25 -04:00
kwolekr
16c031be77 Remove 'tape and glue', update Credits tab 2013-03-14 16:46:42 -04:00
ShadowNinja
350596b94f Add cloud menu background by Krisi, configurable with the menu_clouds option.
Also add a menuheader, menusplash, menufooter_clouds, and allow HD menu footers.
And finally don't git-ignore textures/base/.
2013-03-13 21:18:40 -04:00
sapier
66750dc88e fix typo invalid for loop end 2013-03-13 19:42:05 -04:00
kwolekr
d10223254a Clean up Mapgen 2013-03-11 21:32:52 -04:00
sapier
eb90c3d92d Move l_get_all_craft_recipes to scriptapi_craft 2013-03-11 19:27:13 -04:00
Ilya Zhuravlev
6a1670dbc3 Migrate to STL containers/algorithms. 2013-03-11 19:08:39 -04:00
Ilya Zhuravlev
e204bedf1d Update menulogo.png 2013-03-10 23:57:30 +04:00
kwolekr
650e932ddf Re-add dungeons in new dungeongen.cpp 2013-03-10 00:42:51 -05:00
Mitori Itoshiki
b7def0fcf4 Translated using Weblate (Russian) 2013-03-09 14:18:29 +01:00
Shen Zheyu
e6bf6950eb Translated using Weblate (Chinese (China)) 2013-03-09 09:41:51 +01:00
4aiman Konsorumaniakku
17bbf4d3f6 Translated using Weblate (Russian) 2013-03-07 22:55:23 +01:00
c h
57f5dc5dcf Translated using Weblate (Japanese) 2013-03-07 22:36:47 +01:00
PilzAdam
aa77ee66c5 Change libjson to libjsoncpp in .gitignore 2013-03-06 17:09:28 -05:00
kwolekr
b9512cab1b Fix Irrlicht includes in scriptapi_* 2013-03-06 17:04:44 -05:00
proller
dd8593f2d6 fix link if system json lib exists 2013-03-05 23:54:07 -05:00
RealBadAngel
5af8acfa6e Added method to get all registered recipes for item(node) 2013-03-05 23:32:33 -05:00
kwolekr
ba78194636 Allow any character in formspec strings with escape char 2013-03-05 23:25:02 -05:00
sapier
bdbdeab005 split scriptapi.cpp
Remerge some files in order to reduce number of additional files

Make necessary changes for split, rename files, reorganize some bits
2013-03-05 00:59:49 -05:00
kwolekr
038529c763 Bump version to 0.4.5 2013-03-04 17:01:36 -05:00
PilzAdam
55097e1985 Fix pickup of dropped items when the player only takes a part of them 2013-03-03 16:35:29 +01:00
kwolekr
c61a2ef44f Merge pull request #513 from sfan5/patch-2
Add python script to doc/protocol.txt
2013-03-02 22:34:56 -08:00
Ilya Zhuravlev
5917e86297 Add one more curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); 2013-03-03 00:02:00 +04:00
Weblate
75a8312f4e Merge remote branch 'origin/master' 2013-03-01 17:13:22 +01:00
Mitori Itoshiki
48b999a8dd Translated using Weblate (Japanese) 2013-03-01 17:13:14 +01:00
Ilya Zhuravlev
3823878305 Add Estonian language template 2013-03-01 20:12:19 +04:00
Ilya Zhuravlev
fceb465fc9 Fix "longjmp causes uninitialized stack frame" (serverlist.cpp) 2013-03-01 17:02:54 +04:00
sfan5
72abd5a88e Add python script to doc/protocol.txt 2013-02-28 20:15:34 +01:00
Weblate
066b0314b1 Merge remote branch 'origin/master' 2013-02-28 18:04:07 +01:00
Weblate
22e186b4aa Merge remote branch 'origin/master' 2013-02-28 18:03:28 +01:00
Mitori Itoshiki
372acf7b8e Translated using Weblate (Russian) 2013-02-28 18:02:51 +01:00
Francizca Rodriguez
5b16271bd6 Translated using Weblate (Portuguese) 2013-02-28 18:02:51 +01:00
Tomona Nanase
8de315738b Translated using Weblate (Japanese) 2013-02-28 18:02:51 +01:00
Sfan5
13504b6adc Translated using Weblate (German) 2013-02-28 18:02:50 +01:00
we prefer instagib metl3
f43b90da38 Translated using Weblate (French) 2013-02-28 18:02:50 +01:00
Rune Biskopstö Christensen
1f11cd09d5 Translated using Weblate (Danish) 2013-02-28 18:02:50 +01:00
Shen Zheyu
82e9faf2a9 Translated using Weblate (Chinese (China)) 2013-02-28 18:02:50 +01:00
kwolekr
7caa28a6aa Change default settings for log level, texture atlas, document new settings 2013-02-27 19:59:05 -05:00
PilzAdam
0183bdad04 Fix nodeplacement prediction 2013-02-27 20:23:32 +01:00
kwolekr
d31f07bd4b Fix most warnings, re-fix MSVC compile error 2013-02-26 01:57:59 -05:00
kwolekr
979ca23f1e Merge pull request #482 from proller/liquid
finite liquid
2013-02-25 20:52:24 -08:00
kwolekr
9b5f182642 Remove dead code, relocate some code 2013-02-25 23:11:12 -05:00
kwolekr
f00d136ab1 Fix selection of # threads, set default to 1 thread 2013-02-25 23:11:00 -05:00
kwolekr
28c50c16cd Fix build on Windows 2013-02-25 23:10:54 -05:00
kwolekr
5bd50a2d90 Fix most walled-off caves 2013-02-25 23:08:55 -05:00
kwolekr
60e6284f30 Tune queue limits, some other adjustments 2013-02-25 23:08:41 -05:00
kwolekr
67c59645ec Misc. cleanup and minor fixes 2013-02-25 23:08:33 -05:00
kwolekr
5ec5b1cbd6 Add multi-Emerge thread support 2013-02-25 23:08:26 -05:00
kwolekr
76217939e0 Add emerge queue limit configuration 2013-02-25 22:59:17 -05:00
kwolekr
206ec36c8e Fix EmergeThread hang on exit 2013-02-25 22:58:24 -05:00
kwolekr
3b7a445cd7 Add global and per-peer queue limits 2013-02-25 22:58:11 -05:00
kwolekr
b9d8e59bbf Add emerge.cpp, initial EmergeThread changes
- Neatly placed all emerge related code into a new file, emerge.cpp
- Greatly cleaned up the code in EmergeThread::Thread()
- Reworked Emerge queue.  Now an actual std::queue of v3s16 block positions
- Removed the completely unnecessary map of peer ids requesting blocks
2013-02-25 22:56:18 -05:00
Sfan5
6d0ea26c2d Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam
92c7bd02fb Update buildbot 2013-02-24 18:52:44 +01:00
PilzAdam
497ff1ecd6 Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
PilzAdam
22b0039ad4 Update README 2013-02-24 18:48:51 +01:00
proller
b90e431fc7 new adjustable finite liquid 2013-02-24 18:39:07 +04:00
kwolekr
9bd76f2972 Merge pull request #505 from RealBadAngel/master
Add seed parameter for default and L-system trees
2013-02-23 18:06:07 -08:00
RealBadAngel
f0d70d4e86 Add seed parameter for default and L-system trees 2013-02-24 02:26:25 +01:00
kwolekr
6b9906687b Merge pull request #503 from RealBadAngel/master
Add sound volume controls to ingame menu
2013-02-23 15:58:00 -08:00
PilzAdam
bc2e9dbaf2 Read server_announce from minetest.conf for GUI 2013-02-23 22:48:02 +01:00
RealBadAngel
4d73d99ebc Add sound volume controls to ingame menu 2013-02-23 16:01:35 +01:00
yuqian wang
a3ad84feef Translated using Weblate (Chinese (China)) 2013-02-23 03:33:10 +01:00
kwolekr
f9a8efb992 Merge pull request #431 from sapier/dtime_clamping
add limit for (collision handling) steps to avoid runaway memory consumption
2013-02-22 16:42:50 -08:00
Maciej Kasatkin
42eb8c8e3b Translated using Weblate (Polish) 2013-02-22 16:59:19 +01:00
kwolekr
7f240aea1e Added debug log level setting 2013-02-21 22:35:04 -05:00
Ilya Zhuravlev
c19fc00b04 Fix json include 2013-02-22 02:41:59 +04:00
proller
ee07c3f7cf new auto masterserver 2013-02-22 02:04:53 +04:00
Pilz Adam
724b0a0162 Translated using Weblate (German) 2013-02-21 17:34:52 +01:00
PilzAdam
ef6b8bee07 Drop nodes as items when dugged and no room in inventory and dont remove dropped items when no room in inventory 2013-02-21 16:58:50 +01:00
celeron55
b29834ab02 Merge pull request #500 from doserj/server_report_missing_deps
Print missing mod dependencies on server start
2013-02-20 11:34:57 -08:00
Jürgen Doser
89b88917a8 Print missing mod dependencies on server start
i.e., not only the mod with missing dependencies, but also the missing
dependencies itself. (This already used to be the case before the mod
selection gui was added)

Also, mods with unsatisfied dependencies are no longer reported as
mods that could not be found.
2013-02-20 20:06:39 +01:00
Mitori Itoshiki
93fc957036 Translated using Weblate (Japanese) 2013-02-20 05:57:45 +01:00
Tomona Nanase
164318bd97 Translated using Weblate (Japanese) 2013-02-19 21:31:41 +01:00
PilzAdam
fc61c8809b Dont drop tools on rightclick 2013-02-19 20:16:55 +01:00
Jeija
365c169b43 Disable placement prediction for nodes that use on_rightclick 2013-02-19 20:02:40 +01:00
Ilya Zhuravlev
214a8b4597 Set numeric locale for Lua 2013-02-18 13:58:55 +04:00
Artem Sinkevich
d2ff536a3b Translated using Weblate (Russian) 2013-02-17 11:28:35 +01:00
kwolekr
8d920dd09b Merge pull request #465 from doserj/mod_selection_empty_modname_fix
Remove use of operator[] on a std::map, so no spurious elements get inse...
2013-02-15 17:45:32 -08:00
Perttu Ahola
c88d89d26e Some kind of middleway values for player acceleration for now 2013-02-15 23:18:19 +02:00
Perttu Ahola
4035bf3259 Restore old acceleration behavior until something is actually agreed on (part 2) 2013-02-15 22:47:23 +02:00
Perttu Ahola
65cb318cd9 Restore old acceleration behavior until something is actually agreed on 2013-02-15 22:25:23 +02:00
Ilya Zhuravlev
30b9a4d6b4 Add Freetype support 2013-02-14 18:46:08 +01:00
MirceaKitsune
df3c925b3c Improved Player Physics 2013-02-14 06:21:30 +10:00
PilzAdam
86b906d015 Fix minetest.item_place_node() and minetest.item_drop() to always return an ItemStack 2013-02-13 18:06:25 +01:00
RealBadAngel
b1019a88ba Fix to on_rightclick not able to change wielded_item 2013-02-13 02:06:36 +04:00
Dmitry Marakasov
8e69b9cb26 Server requires gettext library as well 2013-02-12 20:27:50 +01:00
PilzAdam
9f1ae4084d Enable multiline signs 2013-02-12 19:37:25 +01:00
PilzAdam
2c362badd4 Dont remove grass under unloaded blocks 2013-02-10 12:52:59 +01:00
Jürgen Doser
6b1420a58a Disable backface culling for drawtype plantlike and only draw 2 faces instead of 4
This way, plants actually show the real backface on their back side,
i.e., the front face mirrored around the vertical axis, instead of
showing the front face on both sides. This looked weird when the
texture was not symmetrical around the vertical axis.
2013-02-10 12:45:25 +01:00
ShadowNinja
1cda39d5bb Don't fall off nodes if sneaking with free_move on but without fly privileges 2013-02-10 12:35:04 +01:00
ShadowNinja
32552fede5 Don't see through nodes without noclip privileges 2013-02-10 12:29:46 +01:00
Oleg Matveev
6c3829c2b5 Translated using Weblate (Russian) 2013-02-10 10:22:43 +01:00
Pilz Adam
ea044adf1a Translated using Weblate (Portuguese) 2013-02-10 10:22:43 +01:00
Pilz Adam
47f38d2316 Translated using Weblate (Italian) 2013-02-10 10:22:42 +01:00
pandoro almascarpone
f944ff233d Translated using Weblate (Italian) 2013-02-09 22:18:20 +01:00
Weblate
a27857e938 Merge remote branch 'origin/master' 2013-02-08 16:29:19 +01:00
Pilz Adam
0cda2d5193 Translated using Weblate (Russian) 2013-02-08 16:29:13 +01:00
Francizca Rodriguez
65fa26e93e Translated using Weblate (Portuguese) 2013-02-08 16:29:13 +01:00
Mitori Itoshiki
5d4f2f1528 Translated using Weblate (Japanese) 2013-02-08 16:29:13 +01:00
Pilz Adam
f8d0b7d651 Translated using Weblate (Danish) 2013-02-08 16:29:13 +01:00
Shen Zheyu
7895376821 Translated using Weblate (Chinese (China)) 2013-02-08 16:29:12 +01:00
Francizca Rodriguez
aca501df8c Translated using Weblate (Spanish) 2013-02-07 22:14:11 +01:00
Francizca Rodriguez
06ec9e2e1a Translated using Weblate (Portuguese) 2013-02-07 22:12:26 +01:00
Pilz Adam
f9e28285ac Translated using Weblate (Portuguese) 2013-02-07 21:34:19 +01:00
Francizca Rodriguez
90a8aa1444 Translated using Weblate (Portuguese) 2013-02-07 21:34:14 +01:00
Pilz Adam
9a39548367 Translated using Weblate (Portuguese) 2013-02-07 21:34:06 +01:00
Francizca Rodriguez
db5df028b3 Translated using Weblate (Portuguese) 2013-02-07 21:34:02 +01:00
Pilz Adam
7a8094a9c0 Translated using Weblate (Portuguese) 2013-02-07 21:33:56 +01:00
Francizca Rodriguez
10b12cc86e Translated using Weblate (Portuguese) 2013-02-07 21:33:48 +01:00
Ilya Zhuravlev
9b2044351f Document remote_media setting 2013-02-07 17:58:52 +04:00
Ilya Zhuravlev
86b33c4922 Fix compile error (MSVC2010). 2013-02-07 16:17:55 +04:00
kwolekr
97260d09a8 Add flag string settings, flat map option 2013-02-06 16:52:48 -05:00
L JJ
c4e1a01349 Translated using Weblate (Chinese (China)) 2013-02-06 14:49:00 +01:00
kwolekr
f148ae58c3 Fix assertion condition in initializePaths() 2013-02-06 01:13:19 -05:00
kwolekr
bd55b9cc0f Don't write control character to verbosestream 2013-02-06 01:12:56 -05:00
kwolekr
77dbad72f7 Fix and improve noise map functions 2013-02-06 01:12:36 -05:00
kwolekr
75fe948bf7 Add Perlin noise map Lua API 2013-02-06 01:11:56 -05:00
kwolekr
a73905401a Improve random map seed generation 2013-02-06 01:10:37 -05:00
Mitori Itoshiki
8e5b33d359 Translated using Weblate (Russian) 2013-02-05 20:37:51 +01:00
we prefer instagib metl3
4ba6387980 Translated using Weblate (French) 2013-02-05 18:25:54 +01:00
Weblate
b19726db6c Merge remote branch 'origin/master' 2013-02-05 17:52:07 +01:00
Marco gonzalez
c48c6d188c Translated using Weblate (Spanish) 2013-02-05 17:52:02 +01:00
Ilya Zhuravlev
f6e0e1f5d7 Translated using Weblate (Russian) 2013-02-05 17:52:02 +01:00
Pilz Adam
20031a1008 Translated using Weblate (German) 2013-02-05 17:52:02 +01:00
L JJ
a933cb31d4 Translated using Weblate (Chinese (China)) 2013-02-05 17:52:02 +01:00
Ilya Zhuravlev
2868676693 Add Japanese & Korean languages. 2013-02-05 20:50:26 +04:00
Shen Zheyu
366724f6bf Translated using Weblate (Chinese (China)) 2013-02-05 14:35:38 +01:00
Lord James
c59a9720fd Translated using Weblate (Spanish) 2013-02-04 12:34:44 +01:00
Pilz Adam
2dde1d70ec Translated using Weblate (German) 2013-02-02 18:39:22 +01:00
Weblate
1d248cce30 Merge remote branch 'origin/master' 2013-02-02 21:34:12 +04:00
Lord James
c33654c21a Translated using Weblate (Spanish) 2013-02-02 18:28:40 +01:00
Pavel Elagin
5721ff3837 Translated using Weblate (Russian) 2013-02-02 18:28:39 +01:00
Maciej Kasatkin
e215c9a84f Translated using Weblate (Polish) 2013-02-02 18:28:39 +01:00
Robert Arkenin
e5cdf486aa Translated using Weblate (Italian) 2013-02-02 18:28:39 +01:00
Pilz Adam
820d8a920b Translated using Weblate (German) 2013-02-02 18:28:39 +01:00
sub reptice
0f6af98d09 Translated using Weblate (French) 2013-02-02 18:28:38 +01:00
Ilya Zhuravlev
6424c5b698 Add Chinese Simplified & Portuguese. 2013-02-02 21:27:01 +04:00
Marco gonzalez
eed6e04ed1 Translated using Weblate (Spanish) 2013-02-01 21:52:34 +01:00
Jürgen Doser
9ebf1fd3b7 Remove use of operator[] on a std::map, so no spurious elements get inserted. (fixes #464)
All uses of operator[] in guiConfigureWorld.cpp have been replaced
with .find() operations.

In some places, operator[] had been called with mod names of "Add-Ons"
or "N/A", which would insert a default-constructed ModSpec into the
list of add-on mods. In other places, the use of operator[] was safe
now, but it probably is safer for future changes to use .find()
everywhere.
2013-02-01 15:50:33 +01:00
Diego Martínez
fb12a82d65 Translated using Weblate (Spanish) 2013-01-31 12:25:39 +01:00
Marco gonzalez
c8cdc80fd6 Translated using Weblate (Spanish) 2013-01-31 06:58:08 +01:00
PilzAdam
33cb3d713c Translate key functions in key change menu 2013-01-30 20:27:26 +01:00
Maciej Kasatkin
0addefad05 Translated using Weblate (Polish) 2013-01-30 01:12:14 +01:00
Robert Arkenin
3bb89bb155 Translated using Weblate (Russian) 2013-01-29 23:10:18 +01:00
Pavel Elagin
9d6caa4e5f Translated using Weblate (Russian) 2013-01-29 22:14:40 +01:00
kwolekr
12472a44d4 Merge pull request #442 from kwolekr/mingw_compile_fix
Fix compile under MingW
2013-01-29 13:07:47 -08:00
kwolekr
cbbb6447bf Merge pull request #441 from kwolekr/mapgen_factories
Make mapgen factory setup more elegant, add mapgen_v6.h
2013-01-29 13:05:56 -08:00
Marco gonzalez
154a8bb466 Translated using Weblate (Spanish) 2013-01-29 22:04:41 +01:00
Diego Martínez
d1be82d97c Translated using Weblate (Spanish) 2013-01-29 21:47:49 +01:00
Ilya Zhuravlev
8e2a3c7279 Translated using Weblate (Russian) 2013-01-29 21:41:02 +01:00
Marco gonzalez
ebe2f704d1 Translated using Weblate (Spanish) 2013-01-29 21:38:19 +01:00
Pavel Elagin
63c27766ef Translated using Weblate (Russian) 2013-01-29 21:10:00 +01:00
Ilya Zhuravlev
6912f65cd7 Add Spanish, Russian, Polish and Romanian languages. 2013-01-29 21:21:00 +04:00
PilzAdam
28f5b55643 Dont call on_rightclick() if sneak is pressed 2013-01-27 21:58:46 +01:00
Jeija
c1fee78e85 Place block when holding sneak while right-clicking nodes with formspec 2013-01-28 00:44:42 +04:00
Ilya Zhuravlev
d6f0bf9eef Workaround failing Travis clang build. 2013-01-28 00:37:20 +04:00
kwolekr
bcc0ca93d4 Merge pull request #447 from sapier/add_lua_log_parameter_check
BUGFIX: check parameters for minetest.log lua function
2013-01-26 10:58:53 -08:00
sapier
eb2a8fe8b8 check parameters for minetest.log lua function 2013-01-26 10:32:08 +00:00
Weblate
13358c29b8 Merge remote branch 'origin/master' 2013-01-24 15:56:49 +01:00
Pilz Adam
aaee2786a7 Translated using Weblate (German) 2013-01-24 18:55:12 +04:00
kwolekr
9d69b38583 Slightly improved version of mystrtok_r 2013-01-23 17:37:53 -05:00
kwolekr
69ba485415 Fix compile under MingW 2013-01-23 16:28:15 -05:00
kwolekr
91e88196c7 Make mapgen factory setup more elegant, add mapgen_v6.h 2013-01-23 16:16:49 -05:00
sfan5
035933f806 Tweak buildbot
* CURL support
* only download packages if they don't exist
* fixed download links (libvorbis and libogg)
* manual downloading if automatic downloading fails (only minetest and minetest_game)
* mingwm10.dll and openal_stripped.zip are downloaded automatically
2013-01-23 20:42:46 +02:00
RealBadAngel
1163fdfa11 Treegen update. Some new symbols. Speed up code a bit. 2013-01-23 20:40:09 +02:00
celeron55
0a27e81704 Merge pull request #436 from doserj/mod_selection
Fix some crashes and improved behaviour for mod selection gui
2013-01-23 10:10:25 -08:00
Perttu Ahola
c4af909ac8 Update translation files 2013-01-23 18:27:17 +02:00
Jürgen Doser
f099861245 Make sure that settings are written to config file when settings are removed.
Previously, settings where only written when a value has changed, and
removal of a setting value didn't count as a change.
2013-01-22 19:05:46 +01:00
Jürgen Doser
f214940c96 Fix crash when pressing delete button in server browser and no server is selected.
A check for that was there, but was comparing an unsigned variable to
-1, which doesn't work.
2013-01-22 19:05:46 +01:00
Jürgen Doser
26a0efae23 Improve behaviour for empty modpacks and when no mods at all are installed:
Only show enable all / disable all buttons for all add-ons when at
least one add-on is installed. When no add-on ist installed, don't
show any buttons or checkboxes.

Added is_modpack flag to ModSpec to distinguish empty modpacks from
normal mods and check this flag in mod selection gui so that empty
modpacks are not treated like mods that can be enabled or disabled.
2013-01-22 19:05:28 +01:00
Jürgen Doser
e237c1d07d Fix crash when no world is selected and configure button is pressed.
by moving return statement out of if-then-else clause...
2013-01-22 17:47:12 +01:00
Ilya Zhuravlev
33be32f278 Disable travis email notifications. 2013-01-22 01:43:56 +04:00
Ilya Zhuravlev
297186b834 Add .travis.yml 2013-01-22 01:37:58 +04:00
Ilya Zhuravlev
5696ee8421 Fix msvc build 2013-01-22 01:16:29 +04:00
sapier
d8a0efa6af add support for saving settings by lua command (server doesn't autosave on exit) 2013-01-21 22:44:41 +02:00
Perttu Ahola
b52dfbe510 Add mapgen parameters to minetest.conf.example 2013-01-21 21:41:37 +02:00
kwolekr
b87cd8c58b Use a string identifier for a mapgen instead of version 2013-01-21 21:41:37 +02:00
kwolekr
318669327e Fix compile on certain Linux configurations, reduce spawn point height 2013-01-21 21:41:37 +02:00
kwolekr
278d93a3ee Removed Mapgen V7 for now 2013-01-21 21:41:37 +02:00
kwolekr
b55fb4f2f6 Last set of minor cleanups 2013-01-21 21:41:37 +02:00
kwolekr
1cd8351054 Fix MapgenV6::getGroundLevelAtPoint() 2013-01-21 21:41:37 +02:00
kwolekr
631a835e07 Finish and clean up mapgen configuration 2013-01-21 21:41:37 +02:00
kwolekr
45cf32afc5 Add Settings::getStruct and Settings::setStruct 2013-01-21 21:41:37 +02:00
kwolekr
cde3d38766 Clean up EmergeManager, do initial work on Mapgen configuration 2013-01-21 21:41:37 +02:00
kwolekr
d5029958b9 Readded and optimized mapgen V6 2013-01-21 21:41:37 +02:00
kwolekr
bddd5f2b98 Cleaned & enhanced noise object management 2013-01-21 21:41:37 +02:00
kwolekr
96898c1794 Add initial Lua biomedef support, fixed biome selection 2013-01-21 21:41:37 +02:00
kwolekr
11afcbff69 The new mapgen, noise functions, et al. 2013-01-21 21:41:33 +02:00
kwolekr
736b386554 Make WATER_LEVEL configurable, fix slight comparison bug in findSpawnPos() 2013-01-21 21:41:09 +02:00
kwolekr
a785522194 Only clear block modified flag if writing to db was successful 2013-01-21 21:41:09 +02:00
kwolekr
8e50e256e6 Make cloud height user-configurable 2013-01-21 21:41:09 +02:00
kwolekr
9b3287b865 stop MSVC++ from generating dumb warnings 2013-01-21 21:41:09 +02:00
kwolekr
14657bd29a Proper RUN_IN_PLACE support for OSX and FreeBSD 2013-01-21 21:41:09 +02:00
Jürgen Doser
6af8a34d91 Basic support for configuring which mods to load for each world
settings.h: added function to return all keys used in settings, and a
function to remove a setting

mods.{h,cpp}: added class ModConfiguration that represents a subset of the installed mods.

server.{h,cpp}: server does not load add-on mods that are disabled in
the world.mt file. mods are disabled by a setting of the form
"load_mod_<modname> = false". if no load_mod_<modname> = ... setting
is found, the mod is loaded anyways for backwards compatibilty. server
also complains to errorstream about mods with unstatisfied
dependencies and about mods that are not installed.

guiConfigureWorld.{h,cpp}: shows a treeview of installed add-on mods
and modpacks with little icons in front of their name indicating their
status: a checkmark for enabled mods, a cross for disabled mods, a
question mark for "new" mods

Mods can be enabled/disabled by a checkbox. Mods also show a list of
dependencies and reverse dependencies. double-click on a mod in
dependency or reverse dependency listbox selects the corresponding
mod. Enabling a mod also enables all its dependencies. Disabling a mod
also disables all its reverse dependencies.

For modpacks, show buttons to enable/disable all mods (recursively,
including their dependencies) in it.

Button "Save" saves the current settings to the world.mt file and
returns to the main menu. Button "Cancel" returns to main menu without
saving.

basic keyboard controls (if the proper widget has keyboard focus):

up/down: scroll through tree of mods
left/right: collaps/expand a modpack
space: enable/disable the selected mod
2013-01-21 17:31:50 +02:00
Jeija
6f93c01af9 Add a list of servers to the "Multiplayer" tab
If USE_CURL is set, it also downloads a list from a remote server.
The url of this list is configurable in minetest.conf using the setting "serverlist_url"
The local list of favorite servers is saved in client/serverlist/filename
filename is also configureable using the setting "serverlist_file"
2013-01-21 16:42:56 +02:00
sapier
12e9f3d010 add limit for steps to avoid runaway memory consumption by collision handling 2013-01-16 23:27:11 +00:00
PilzAdam
c691d619c2 Bugfix: else repeat_rightclick_timer = 0; 2013-01-14 21:38:40 +01:00
Jeija
61f5ca6b16 Add particles 2013-01-14 15:27:00 +01:00
PilzAdam
443bbe6a78 Fix spread of items in falling code 2013-01-12 20:55:45 +01:00
Jürgen Doser
183c81b5ec fix integer overflow (fixes #414)
liquid_kind was declared as an u8, but used to hold a content_t value, which is delcared to be a u16.

changing this fixes (at least for me) the problem reported in bug #414.
2013-01-12 23:32:09 +04:00
Jürgen Doser
076f13cc01 fixes node timer bug (fixes #407).
Previously, when a block was activated, on_timer callbacks where
called with the relative position of the node inside the block,
instead of the absolute position of the node.
2013-01-11 18:59:27 +01:00
dannydark
8eb717d4d0 Fixed two typo's in commit 615fd498bc 2013-01-07 18:57:12 +01:00
PilzAdam
8aa190606e Disable all HP handling if enable_damage is false 2013-01-07 18:39:45 +01:00
PilzAdam
0437abbffb Add a setting to enable always flying fast 2013-01-07 18:26:34 +01:00
sapier
0b1d09ff4f Fix buttons not working for Lua-triggered formspecs 2013-01-07 19:00:33 +02:00
RealBadAngel
8b75736c6f L-Systems treegen update. 2013-01-07 18:13:14 +04:00
Ilya Zhuravlev
099d7ff2ad "or" should be "||". Don't use "or", "and", etc.. It breaks build. 2013-01-04 23:39:12 +04:00
Jeija
46d431e7c3 Implement textarea in formspec, a multiline input field 2013-01-04 20:09:09 +01:00
PilzAdam
615fd498bc Fix typo doubletab -> doubletap 2013-01-04 20:04:48 +01:00
dannydark
bc879a1453 Fixed content_abm aliases
Since commit 5a13c49492 when I'm in a new area of the world that hasn't
yet been generated the debug log gets flooded with the following error:

Map::setNode(): Not allowing to place CONTENT_IGNORE while trying to
replace "default:dirt_with_grass" at (729,1,-219) (block (45,0,-14))

This commit fixes that.
2013-01-04 19:05:57 +01:00
PilzAdam
82fd83fd12 Switch to fly mode if spacebar is doubleclicked
Can be turned off in the key change GUI or in minetest.conf via doubletab_space
2013-01-04 18:51:38 +01:00
Jeija
b50da63852 Repeated right clicking when holding the right mouse button
Configure using repeat_rightclick_time in minetest.conf
2013-01-04 18:33:53 +01:00
PilzAdam
5bc14e2fe4 Add on_rightclick(pos, node, clicker) callback for nodes 2013-01-04 17:15:16 +01:00
PilzAdam
d2b1210376 Adjust the maximum alpha of the red hurt screen 2013-01-03 16:15:46 +01:00
Jeija
a27cdf16f4 Tilt camera on player damage (tweaked by PilzAdam) 2013-01-03 15:16:46 +01:00
PilzAdam
5a13c49492 Change the nodenames for dirt -> grass and sapling -> tree abms to match the mapgen aliases 2013-01-02 23:06:31 +01:00
PilzAdam
8493979d86 Replace constant red hurt screen with fade out red 2013-01-02 23:06:17 +01:00
Perttu Ahola
2c472a66d1 Add ServerEnvironment::setNode()/removeNode() to allow setting nodes from the C++ side with proper script-defined initialization/destruction 2013-01-02 23:18:14 +02:00
Perttu Ahola
69bd803a32 Add InvRef:get_location() 2013-01-02 22:53:55 +02:00
Perttu Ahola
b7de864f2e Call this 0.4.4-d1 because it has a protocol addition since 0.4.4 2013-01-02 21:03:47 +02:00
sapier
da9707950e Add TOCLIENT_SHOW_FORMSPEC to display formspecs at client from lua 2013-01-02 20:59:37 +02:00
RealBadAngel
36f03a7f4a Bugfixes to item_image formspec method 2013-01-02 18:29:08 +04:00
dannydark
5d18dc358b Fixed compile issues on windows
With latest upstream L-Systems treegen.
2012-12-30 16:38:53 +04:00
RealBadAngel
b40e599866 L-System treegen 2012-12-30 13:42:19 +04:00
PilzAdam
45029117f5 Use aux1 to move fast when flying 2012-12-27 18:33:24 +01:00
Esteban I. Ruiz Moreno
578ece8dd0 Add selectionbox_color, crosshair_color, and crosshair_alpha options 2012-12-27 13:10:03 -03:00
PilzAdam
896e1a30b0 Fix 'longjmp causes uninitialized stack frame' in cURL 2012-12-26 21:41:00 +01:00
Perttu Ahola
0f1d2c127c Initialize all member variables of LuaEntitySAO 2012-12-23 17:16:46 +02:00
DannyDark
d880a5ec0c Fixed two typos in wireshark lua file. 2012-12-23 02:17:34 +04:00
Ilya Zhuravlev
145e301269 Fix keycodes (#325) 2012-12-23 02:11:32 +04:00
Ilya Zhuravlev
c4172934e5 Prefer shared cURL library instead of the static one. 2012-12-21 20:35:04 +04:00
DannyDark
40dac4cde4 Fixed u64 ambiguous symbol error
Fixed the compiler not being able to determine which symbol it should
use when compiling Minetest as 64bit with Irrlicht 1.8+
2012-12-20 17:53:25 +10:00
sfan5
05b58501f2 Tweak CMake files for cURL 2012-12-18 21:52:56 +04:00
PilzAdam
29c17c14f1 Add ability to change the itemstack in placenode callbacks 2012-12-17 19:49:18 +01:00
PilzAdam
f4ed37ec6f Fix falling damage when not flying 2012-12-17 18:04:41 +01:00
Ilya Zhuravlev
e9006f904c Make m_media_fetch_threads to contain MediaFetchThread* instead of MediaFetchThread 2012-12-17 20:56:59 +04:00
Ilya Zhuravlev
e301bc2d77 Fix hypen used as minus sign (manpages), fix spelling error (server.cpp) 2012-12-17 19:46:54 +04:00
Ilya Zhuravlev
3578e1d4a7 Added ability to fetch media from remote server (using cURL library) 2012-12-16 15:20:18 +04:00
jordan4ibanez
aa46e5c5e7 Fix item entity's collision with nodeboxes 2012-12-15 15:32:17 -05:00
PilzAdam
9786202b08 Dont sneak while flying 2012-12-11 19:04:55 +01:00
PilzAdam
52ba413185 Only fly through walls in noclip mode wich requires the noclip privilege 2012-12-11 16:44:13 +01:00
Ilya Zhuravlev
1d13d106dd Update README 2012-12-07 02:20:42 +04:00
Perttu Ahola
ab06fca4be Bump version to 0.4.4 2012-12-06 21:21:10 +02:00
Perttu Ahola
fd9e226b79 Update GUI texts 2012-12-06 21:02:02 +02:00
Jürgen Doser
7d2f0d7b1b draw gui later. this fixes the hotbar disappearing while rendering to texture. 2012-12-06 20:43:17 +02:00
Jürgen Doser
870f7bcc93 fix screen flickering black when rendering to texture 2012-12-06 19:56:49 +02:00
Perttu Ahola
543fc6702f Set proper field background colors in Irrlicht 1.8 2012-12-06 19:35:40 +02:00
Perttu Ahola
5080b63435 Raise default maximum render distance to 240 2012-12-06 15:49:20 +02:00
Perttu Ahola
8bb36f4650 Fix automagic render distance tuner 2012-12-06 15:49:20 +02:00
Matthew I
a47b829040 Add #include guards to base64.h 2012-12-03 19:44:54 +02:00
Perttu Ahola
07632b7d69 Try to add a bit of topside brightness when not using shaders 2012-12-02 23:48:11 +02:00
Perttu Ahola
ec54e35757 Tweak shader randomly a bit 2012-12-02 23:47:53 +02:00
Perttu Ahola
68e36226b3 Default to preload_item_visuals=true 2012-12-02 20:43:55 +02:00
MirceaKitsune
15b86a6b9b Don't send player position from client to server if the player hasn't moved 2012-12-02 20:22:02 +02:00
Ilya Zhuravlev
eeb0900291 Fix minetest.get_node_drops(). It should always return list of item names, not ItemStack(s). 2012-12-02 21:09:30 +04:00
Perttu Ahola
804a7875a2 Smooth day-night transitions 2012-12-02 18:02:45 +02:00
Perttu Ahola
041585a78e Const-correct util/serialize.h 2012-12-02 14:36:12 +02:00
Perttu Ahola
cd1f604ffe Handle day-night transition in shader and make light sources brighter when shaders are used 2012-12-02 14:24:58 +02:00
Perttu Ahola
566f7f638a Get rid of jordan4ibanez's insane digging animation speed 2012-12-02 03:10:23 +02:00
Perttu Ahola
3e07c5bf82 Fix tile MaterialType to make sense and make lava surface be shader'd lower like water 2012-12-02 02:59:15 +02:00
Perttu Ahola
ca16119adb Install shaders properly 2012-12-02 01:45:31 +02:00
Perttu Ahola
d0b9b10ee0 Remove accidental vim swap file 2012-12-02 01:42:03 +02:00
Perttu Ahola
98fd364672 Add enable_shaders to minetest.conf.example 2012-12-02 00:54:44 +02:00
obneq
151fad1f2b Add checkboxes for shaders and on-demand item visual generation 2012-12-02 00:52:35 +02:00
Perttu Ahola
27373919f4 Implement a global shader parameter passing system and useful shaders 2012-12-02 00:46:18 +02:00
Kahrl
22e6fb7056 ShaderSource and silly example shaders 2012-12-02 00:46:18 +02:00
Perttu Ahola
e3258b78e2 Add setting preload_item_visuals 2012-12-02 00:46:10 +02:00
Perttu Ahola
bee170570d On-demand item meshes and textures 2012-12-02 00:38:26 +02:00
Perttu Ahola
ba73e75ef9 Modify some client log message levels 2012-12-02 00:24:11 +02:00
RealBadAngel
f4b7e1a570 New elements in formspec, item_image and item_image_button.
Fixed also game bug drawing dragged item behind fields, buttons etc.
2012-12-01 20:39:41 +02:00
PilzAdam
fa50341a71 Only check attachment for nodes with group attached_node 2012-12-01 15:20:53 +01:00
PilzAdam
fa76057e7f Add the group attached_node
Nodes in this group will be dropped as items if the node under them or the node in the wallmounted direction is not walkable.
2012-12-01 13:32:32 +01:00
PilzAdam
bb454b1846 Merge support for anaglyph stereo 2012-12-01 12:41:05 +01:00
Perttu Ahola
778d9b0cd6 Add the ability for client to check if image exists 2012-11-30 22:19:54 +02:00
DannyDark
84ace27872 Log /grant and /revoke command usage 2012-11-30 22:12:21 +02:00
Jürgen Doser
c1d8eeb70a Make dragged itemstack following the mouse cursor much smoother
by using the cursor coordinates directly, instead of updating them only when a mouse event is seen.
2012-11-30 22:07:30 +02:00
Matthew I
6cf87e1d23 Ignore directories beginning with a "." when searching for mods
This is not a problem on POSIX systems (these directories are
ignored by the POSIX implementation of fs::GetDirListing() in
filesys.cpp), but these directories still are reported on Windows
systems.  This becomes a problem when mod authors use version
control systems that create directories like ".git" or ".svn"
and collectMods() picks up on them.  It has also been suggested
that ignoring such directories would allow for the easily disabling
mods by inserting a "." in front of their name.

This quick fix simply makes collectMods() ignore directories
beginning with a ".".
2012-11-30 21:41:50 +02:00
Perttu Ahola
8a93581c8a Run scriptapi_on_shutdown() thread-safely and remove some old crap 2012-11-30 19:41:13 +02:00
Matthew I
6c8fa83ecd Add shutdown hook interface to Lua API
Scripts can call minetest.register_on_shutdown() to register a
shutdown hook.

Document that minetest.register_on_shutdown() callbacks may not be run

If the server crashes, it is unlikely that callbacks registered using
minetest.register_on_shutdown() will be called.
2012-11-30 19:26:51 +02:00
Perttu Ahola
ab45133ab4 Add congestion control settings to minetest.conf 2012-11-29 22:13:22 +02:00
Perttu Ahola
7b6d642300 Full protocol 13 compatibility on server side 2012-11-29 22:08:25 +02:00
Perttu Ahola
96a286dcf5 Make strict and non-strict protocol version checking to work more like expected 2012-11-29 22:08:25 +02:00
Perttu Ahola
420de7ad5e Allow server to accept protocol 13 clients altough they don't work too well 2012-11-29 22:08:25 +02:00
Perttu Ahola
8ccdd3bdb4 Ranged support of protocol version on server side 2012-11-29 22:08:25 +02:00
Perttu Ahola
23913f26cd Support serialization of protocol 13 ContentFeatures 2012-11-29 22:08:25 +02:00
Perttu Ahola
9714612999 unit test: TestNodedefSerialization 2012-11-29 22:08:25 +02:00
Perttu Ahola
69cdcea9fc Modify new ObjectProperties format to such that 0.4.3 will eat it 2012-11-29 22:08:25 +02:00
Perttu Ahola
30ec69c7d3 Fix Taoki's messed up generic object command ids 2012-11-29 22:08:25 +02:00
Perttu Ahola
f720c67f3e Change version to 0.4.4-dev because... ehm... why it wasn't that already? 2012-11-29 22:08:25 +02:00
Calinou
655bb526f4 Fix head shifting downards in glass, nodeboxes... 2012-11-28 16:14:52 +04:00
Perttu Ahola
5c26972cdd Fix mesh glitches on MapBlock boundaries 2012-11-27 19:00:09 +02:00
Perttu Ahola
117f208826 Revert "Use wielditem drawtype for all nodes in item_entity"
This reverts commit ffad18e424.
2012-11-27 17:32:58 +02:00
MirceaKitsune
5f798d944e Fix forgotten material properties for meshes (also seems to have been forgotten for cubes previously). This allows transparent png images to work properly 2012-11-27 08:06:13 +02:00
Perttu Ahola
6b927229f5 Default server step to 0.1s and sync object/player update intervals to it 2012-11-26 22:34:59 +02:00
PilzAdam
ffad18e424 Use wielditem drawtype for all nodes in item_entity 2012-11-26 18:30:07 +01:00
Perttu Ahola
e0eaed5fdb Remove unnecessary util/serialize.h from content_mapblock.cpp 2012-11-26 11:56:18 +02:00
Perttu Ahola
5bd638d4a5 Const-correct SharedBuffer::SharedBuffer(const T *t, unsigned int size) 2012-11-26 11:39:52 +02:00
Perttu Ahola
eca1c96412 Move util/serialize.h out from staticobject.h for smaller header dependencies 2012-11-26 11:18:34 +02:00
Perttu Ahola
2f5686ca48 Move a function from clientserver.h to clientserver.cpp 2012-11-26 10:31:24 +02:00
Perttu Ahola
4fa4340b95 Proper versioning of new network-serialized stuff 2012-11-26 09:49:31 +02:00
Perttu Ahola
197542c7ec New PROTOCOL_VERSION scheme (allow client to support a range of versions) 2012-11-26 09:49:07 +02:00
Perttu Ahola
ab507f83e2 Fix LuaEntitySAO::getClientInitializationData() and bump the related version 2012-11-26 09:10:27 +02:00
Perttu Ahola
d67004a3be Bump version to 0.4.4 as this isn't compatible with 0.4.3 2012-11-26 00:56:47 +02:00
Perttu Ahola
c8acc373c1 Update ContentFeatures serialization format now as PROTOCOL_VERSION was changed 2012-11-25 21:11:45 +02:00
MirceaKitsune
3d1c481f0b RealBadAngel's patch which allows the lua api to read pressed player keys. This should make it possible to change the player's animation based on what he is doing
Correct lua api version number

Always update animations and attachments after the entity is added to scene client side. Fixes animations not being applied in client initialization for some reason. Attachments should be re-tested now just to be safe.

Fix a segmentation fault caused by reaching materials that didn't exist in a loop for setting texture
2012-11-25 19:14:24 +02:00
MirceaKitsune
756db8174a A bunch of fixes
No longer hide players who are dead. With models, a death animation should be used instead

Some changes requested by celeron55

Rename a lot of things in the code, and use better lua api function names

Minor code corrections

Bump protocol version up, since the models / animations / attachments code creates new client<->server messages
2012-11-25 19:14:24 +02:00
MirceaKitsune
fa67b46c04 Allow Vanessa's texture filtering / mipmap patch to work on models, as well as all other node types
Initialize m_bone_posrot too

Update pos_translator for attached players, which should fix a bug noticed with carts where a detached player would travel from the detachment spot to where it was detached

Don't make attachments possible to right-click either

Properly apply object and text visibility for local attachments, and fix them showing when they shouldn't
2012-11-25 19:14:24 +02:00
MirceaKitsune
4d656963e4 Fix more things I forgot for attached players. Such players will now properly see themselves moving when attached, and the server will read their position accordingly
Fix attached players being able to bob their view and generate foostep sounds by pressing a movement key (running in place)
2012-11-25 19:14:24 +02:00
MirceaKitsune
9259d028ac Update attachments at the ending of the addToScene function for parents. And with this... *drum roll* Client-side attachments are at last functional and stick visibly.
Fix the last segmentation fault (apparently). So far attachments seem to be fully functional, although removing the parent causes children to go to origin 0,0,0 and possibly still cause such a fault (though this should already be addressed)

Fix a bug in falling code where entities get stuck

Also check if the parent has been removed server-side, and detach the child if so. Fixes children going to origin 0,0,0 when their parent is removed.

Unset all attachment properties when permanently detaching (on both the client and server). Also store less data we don't need

Create a separate function for detaching, and also update lua api documentation

When a child is detached, update its position from the server to clients. This WILL cause it to get positioned slightly differently client side, as the server attachment system only copies parent origin and knows not about mesh / bone transformation. This prevents different clients seeing the object detached in different spots which is most correct

Update the position of attached players to clients. An attached player will see himself move, but this is currently VERY ugly and laggy as it is done by the server (it probably must stay this way too)

Use a different approach for locally attached players. This allows for smooth positio transitions to work, as well at the player turning around freely. Still buggy however
2012-11-25 19:14:24 +02:00
MirceaKitsune
52fcb0b4b9 Send animations, bone overrides and attachments in entity initialization. Clients no longer have to be near an object when an animation or attachment is set to see the changes, and newly connected clients (or a client that simply renders the object for the first time) will get all of those settings. Therefore, the lua script no longer needs to run every X seconds either, just once per entity.
Finish fixing the material color code. But it won't work until MineTest has dynamic lighting... another day another feature.

Extra checks for the bone positioning / rotation code

Many checks and consistency improvements to the client attachment code

Make a separate function for checking if a client object is attached. A more in-depth change will be needed here to fix reading of invalid pointers

Use a different method of fetching the parent. Fixes the mass segmentation faults when rendering an attachment (some still happen though)

Major change to how attachments are handled. Fix the last segmentaton fault, which was due to the parent becoming invalid while being refreshed / removed which would bause the child to remain attached to nothing. Parents remove their children when being deleted themselves and add them back when re-added. Attachments are stored inside a 2D a vector which easily allows both a child to find their parent and a parent to find its children.

Remove attachment list entry when an object is being permanently removed. Also avoid duplicate entries in this list when re-attaching the same object

The "big code comments" can now go away. Client attachments almost work properly, and I know what else needs to be done
2012-11-25 19:14:23 +02:00
MirceaKitsune
d7d759b43f Enable client-side attachments, add detachment code 2012-11-25 19:14:23 +02:00
MirceaKitsune
ba3fd63e29 Fix some remaining issues with attachments, now they work. Tested with object->player and player->player attachments 2012-11-25 19:14:22 +02:00
MirceaKitsune
948b5a8be7 Complete the attachment framework.
The child ID can now be checked against the parent ID in content_cao.cpp so the parent can be detected. Actual attachment code to come

Divide attachment system between server attachments and client attachments, neither coded right now. As explained in the code comment:

// Attachments need to be handled on both the server and client.
// If we attach only on the server, models (which are client-side)
// can't be read so we don't know the origin and orientation of bones.
// If we attach only on the client, the real position of attachments is
// not updated and you can't click them for example.
2012-11-25 18:14:15 +02:00
MirceaKitsune
e42eeec8f6 Framework for the attachment system, new object property which allows changing the color and alpha of mesh materials
New object property which allows changing the color and alpha of mesh materials. Due to the current lighting systems it doesn't work yet, but the full implementation is there

Framework for the attachment system, with no actual functionality yet

Send bone and player object to the setAttachment function in content_sao.cpp, but we need a way to translate it there and send it to the client

I will also want position and rotation offsets to be possible to apply to attachments

Network object ID from server to client. This will be used to identify the parent client-side and know what to attach to
2012-11-25 18:14:15 +02:00
MirceaKitsune
118285e6ba Get the new animation framework properly working
Store start and end frames as v2f

Also move bone animations to their own function instead of object properties
2012-11-25 18:14:15 +02:00
MirceaKitsune
ba4d93027f Joint positioning and rotation code, and fix a problem related to their lua API
Attempt to move the animation system to a more correct implementation, rather than using object properties. Incomplete and breaks functionality
2012-11-25 18:14:15 +02:00
MirceaKitsune
fb0c431864 Allow the LUA API to set animations to meshes as well as the animation speed. Also update animations only when needed.
Support for animation blending, though for some reason it doesn't work.

Don't enable animation transitions by default for many reaosons

Object property to store individual bone positions. LUA can specify a bone name followed by a bone position. No functionality yet. Bone rotation to be added in the following commit

Same system for bone rotation, plus a few other things I missed
2012-11-25 18:14:15 +02:00
MirceaKitsune
9c8ba42750 Get the mesh working through the memory cache properly. Most credit goes to celeron55 for the help on this code
Get the texture from memory as well

Add .x to the list of supported formats

Update LUA API documentation
2012-11-25 18:14:15 +02:00
MirceaKitsune
f9675bd2b4 Add a subfolder for models and transfer models from server to client
(obj, md2 and md3 are currently allowed)

Get rid of the texture string and use the existing textures array. Segmented meshes have multiple materials, and this will allow us to texture each. Do not switch to this commit yet!

If a texture string is left empty in LUA, don't modify that material. Useful so a script can change specific textures without affecting others
2012-11-25 18:14:15 +02:00
MirceaKitsune
cb40b3517a Fix material properties and allow lighting. Models should now be affected by light instead of being black 2012-11-25 18:14:15 +02:00
MirceaKitsune
0a020dbcc8 Properly read the mesh from LUA.
Players can now be set to meshes using the following test script:

function switch_player_visual()
		prop = {
			mesh="player.obj",
			texture="player.png",
			visual="mesh",
		}
	for _, obj in pairs(minetest.get_connected_players()) do
		obj:set_properties(prop)
	end
	minetest.after(1.0, switch_player_visual)
end
minetest.after(1.0, switch_player_visual)
2012-11-25 18:14:14 +02:00
MirceaKitsune
ac97a7f70e 3D model support for players using Irrlicht. Also ready the basis for mesh support on nodes / items via LUA (to be done). Supports any mesh format compatible with Irrlicht, but animations are not set up yet. 2012-11-25 18:14:14 +02:00
Perttu Ahola
e02b95741b Revert "Don't leak textures all over the place"
This causes textures to be deleted before they are no longer accessed,
resulting in a segmentation fault. This needs to be rewritten in such a way
that textures are deleted when the client disconnects from a server.

This reverts commit 41c00e87d4.
2012-11-25 16:39:07 +02:00
Ilya Zhuravlev
bbd990f2cc Fix trees growing into any type of node 2012-11-23 00:36:52 +04:00
xyzz
a0b5605db8 Merge pull request #268 from khonkhortisan/image_button
Allow transparent image_buttons
2012-11-22 09:13:18 -08:00
Anthony
3ba9b26310 Fix server crash on /clearpassword
According to #253, using `/clearpassword` without an argument causes the server to crash from an assertion failure. I've resubmitted matttpt's patch as a pull request to aid in merging.
2012-11-20 16:45:30 +01:00
MirceaKitsune
6c43ec2d2b Add anaglyph settings to minetest.conf.example 2012-11-13 19:21:18 +02:00
MirceaKitsune
9b9eb23b6d Default anaglyph to 0.1 2012-11-13 19:20:57 +02:00
MirceaKitsune
8b16e5f27d Anaglyph stereo support, created by xyz 2012-11-13 19:20:35 +02:00
xyzz
5292476841 Merge pull request #284 from RealBadAngel/master
Adding backgrounds to formspec
2012-11-12 11:50:58 -08:00
PilzAdam
1db0334787 Merge pull request #286 from PilzAdam/digging_animation
Add jordan4ibanez' better digging animation
2012-11-10 10:33:16 -08:00
PilzAdam
6e2ba111af Add jordan4ibanez' better digging animation 2012-11-10 17:36:56 +01:00
Perttu Ahola
5f1d3ad754 Swap out pixel-perfect nyan cat by request of Chris Torres 2012-11-09 20:14:04 +02:00
Vanessa Ezekowitz
46f471c89f added GUI checkboxes in Settings tab for the aforementioned video settings. 2012-11-09 19:12:49 +02:00
Vanessa Ezekowitz
0dd9c14ff8 Added video settings filter options via config file - second try :-)
Set one or more of these in the config to turn the related option on:

mip_map = 1
anisotropic_filter = 1
bilinear_filter = 1
trilinear_filter = 1
2012-11-09 19:12:44 +02:00
Perttu Ahola
0709918bd8 Fix unnecessary network protocol incompatibility in ContentFeatures 2012-11-08 20:43:32 +02:00
RealBadAngel
8e5167d726 Adding background to Formspec 2012-11-08 19:22:37 +01:00
PilzAdam
8c3ffa3907 Merge pull request #279 from RealBadAngel/patch-2
Formspec: Draw images before inventories. Allows to use image as backgro...
2012-11-05 08:12:12 -08:00
RealBadAngel
8540871ebc Formspec: Draw images before inventories. Allows to use image as background. 2012-11-04 21:18:28 +01:00
PilzAdam
23837e4352 Merge pull request #274 from PilzAdam/falling
Fix a bug in falling code where entities get stuck
2012-11-03 15:14:14 -07:00
PilzAdam
3cab24fbcf Merge pull request #243 from xyzz/liquid_renewable
Add liquid_renewable property, allow non-renewable liquids.
2012-11-03 12:34:44 -07:00
PilzAdam
755df5f659 Merge pull request #273 from PilzAdam/air
Make air and ignore drop nothing
2012-11-03 10:36:46 -07:00
PilzAdam
936411e4d1 Make air and ignore drop nothing 2012-11-03 18:29:01 +01:00
PilzAdam
21317be493 Fix a bug in falling code where entities get stuck 2012-11-03 18:07:49 +01:00
Kahrl
41c00e87d4 Don't leak textures all over the place 2012-11-02 18:45:39 +02:00
Perttu Ahola
2863a3291a Fix flowing liquid animation direction calculation 2012-11-02 18:05:42 +02:00
PilzAdam
8adad36a66 Merge pull request #272 from PilzAdam/pow
Replace pow() with multiplikation to improve speed
2012-11-02 08:35:30 -07:00
PilzAdam
b701f8a878 Replace pow() with multiplikation to improve speed 2012-11-02 16:24:57 +01:00
PilzAdam
63e73f29cc Merge pull request #270 from PilzAdam/master
Move falling to builtin
2012-11-01 11:00:57 -07:00
PilzAdam
7fcf153ada Add functions to the default mod of minimal game to support old code 2012-11-01 18:49:12 +01:00
PilzAdam
0443d36abf Add falling_node to special groups in lua-api.txt 2012-11-01 12:33:24 +01:00
PilzAdam
df2ad89518 Remove a useless comment 2012-10-31 19:08:00 +01:00
PilzAdam
10dc2b30fb Move falling to builtin 2012-10-31 19:06:11 +01:00
Kyle
f9087d14a3 Allow transparent image_buttons 2012-10-18 12:06:47 -07:00
Perttu Ahola
25cf3757b2 Add nodedef.on_blast() to lua_api.txt in order to support chained explosions of any explosives 2012-09-09 23:24:48 +03:00
Perttu Ahola
72ef6f637e Statically store always_collect field of __builtin:item 2012-09-09 23:14:41 +03:00
Perttu Ahola
9cadaf824b Add dtime_s to entity activation 2012-09-09 17:12:29 +03:00
Perttu Ahola
1cc1b93e65 Fix ServerActiveObject stuff 2012-09-09 16:11:05 +03:00
Perttu Ahola
c4f400acd0 Fix wielditem entity drawtype brightness control 2012-09-09 13:26:52 +03:00
Perttu Ahola
ac628c9b0a Fix ObjectRef:punch() 2012-09-09 12:05:38 +03:00
Ilya Zhuravlev
926830e0df Add liquid_renewable property. 2012-09-07 20:48:12 +04:00
334 changed files with 53763 additions and 16157 deletions

13
.gitignore vendored
View File

@@ -4,13 +4,16 @@
*bak*
tags
*.vim
*.orig
*.rej
## Non-static Minetest directories
/bin/
/games/*
!/games/minimal/
/cache/
/textures/
/textures/*
!/textures/base/
/sounds/
/mods/*
!/mods/minetest/
@@ -36,6 +39,14 @@ src/jthread/cmake_install.cmake
src/jthread/libjthread.a
src/lua/build/
src/lua/CMakeFiles/
src/cguittfont/CMakeFiles/
src/cguittfont/libcguittfont.a
src/cguittfont/cmake_install.cmake
src/cguittfont/Makefile
src/json/CMakeFiles/
src/json/libjsoncpp.a
src/sqlite/CMakeFiles/*
src/sqlite/libsqlite3.a
CMakeCache.txt
CPackConfig.cmake
CPackSourceConfig.cmake

10
.travis.yml Normal file
View File

@@ -0,0 +1,10 @@
language: cpp
compiler:
- gcc
- clang
before_install:
- if [ $CC = "clang" ]; then export PATH="/usr/bin/:$PATH"; sudo sh -c 'echo "deb http://ppa.launchpad.net/eudoxos/llvm-3.1/ubuntu precise main" >> /etc/apt/sources.list'; sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 92DE8183; sudo apt-get update; sudo apt-get install llvm-3.1; sudo apt-get install clang; fi
- sudo apt-get install libirrlicht-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev
script: cmake . && make
notifications:
email: false

View File

@@ -12,7 +12,7 @@ set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
# Also remember to set PROTOCOL_VERSION in clientserver.h when releasing
set(VERSION_MAJOR 0)
set(VERSION_MINOR 4)
set(VERSION_PATCH 3)
set(VERSION_PATCH 6)
if(VERSION_EXTRA)
set(VERSION_PATCH ${VERSION_PATCH}-${VERSION_EXTRA})
endif()
@@ -85,7 +85,7 @@ elseif(UNIX) # Linux, BSD etc
set(EXAMPLE_CONF_DIR ${DOCDIR})
set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications")
set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/locale")
endif()
endif()
@@ -131,7 +131,13 @@ if(NOT CUSTOM_LOCALEDIR STREQUAL "")
endif()
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/builtin" DESTINATION "${SHAREDIR}")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/client" DESTINATION "${SHAREDIR}")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games/minimal" DESTINATION "${SHAREDIR}/games")
set(COMMON_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/games/common")
if(EXISTS ${COMMON_SOURCE} AND IS_DIRECTORY ${COMMON_SOURCE})
install(FILES ${COMMON_SOURCE}/README.txt DESTINATION "${SHAREDIR}/games/common/")
install(DIRECTORY ${COMMON_SOURCE}/mods DESTINATION "${SHAREDIR}/games/common")
endif()
set(MINETEST_GAME_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/games/minetest_game")
if(EXISTS ${MINETEST_GAME_SOURCE} AND IS_DIRECTORY ${MINETEST_GAME_SOURCE})
install(FILES ${MINETEST_GAME_SOURCE}/game.conf DESTINATION "${SHAREDIR}/games/minetest_game/")
@@ -147,6 +153,8 @@ if(RUN_IN_PLACE)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/textures/all/textures_here.txt" DESTINATION "${SHAREDIR}/textures/all")
endif()
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/fonts" DESTINATION "${SHAREDIR}")
install(FILES "README.txt" DESTINATION "${DOCDIR}")
install(FILES "doc/lua_api.txt" DESTINATION "${DOCDIR}")
install(FILES "doc/mapformat.txt" DESTINATION "${DOCDIR}")

View File

@@ -1,24 +1,26 @@
Minetest-c55
Minetest
============
An InfiniMiner/Minecraft inspired game.
Copyright (c) 2010-2012 Perttu Ahola <celeron55@gmail.com>
and ther contributors (see source file comments and the version control log)
Copyright (c) 2010-2013 Perttu Ahola <celeron55@gmail.com>
and contributors (see source file comments and the version control log)
In case you downloaded the source code:
---------------------------------------
If you downloaded the Minetest Engine source code in which this file is
contained, you probably want to download the minetest_game project too:
https://github.com/celeron55/minetest_game/
See the README.txt in it.
contained, you probably want to download these projects too:
https://github.com/minetest/common/
https://github.com/minetest/minetest_game/
See the README.txt in them.
Further documentation
----------------------
- Website: http://c55.me/minetest/
- Wiki: http://c55.me/minetest/wiki/
- Forum: http://c55.me/minetest/forum/
- Github: https://github.com/celeron55/minetest/
- Website: http://minetest.net/
- Wiki: http://wiki.minetest.com/
- Developer wiki: http://dev.minetest.net/
- Forum: http://forum.minetest.net/
- Github: https://github.com/minetest/minetest/
- doc/ directory of source distribution
This game is not finished
@@ -40,7 +42,7 @@ Default Controls
Paths
------
$bin - Compiled binaries
$share - Cistributed read-only data
$share - Distributed read-only data
$user - User-created modifiable data
Windows .zip / RUN_IN_PLACE source:
@@ -79,18 +81,25 @@ Compiling on GNU/Linux:
-----------------------
Install dependencies. Here's an example for Debian/Ubuntu:
$ apt-get install build-essential libirrlicht-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev
$ apt-get install build-essential libirrlicht-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev
Download source, extract (this is the URL to the latest of source repository, which might not work at all times):
$ wget https://github.com/celeron55/minetest/tarball/master -O master.tar.gz
$ wget https://github.com/minetest/minetest/tarball/master -O master.tar.gz
$ tar xf master.tar.gz
$ cd celeron55-minetest-286edd4 (or similar)
$ cd minetest-minetest-286edd4 (or similar)
Download common (needed for minetest_game and some others)
$ cd games/
$ wget https://github.com/minetest/common/tarball/master -O common.tar.gz
$ tar xf common.tar.gz
$ mv minetest-common-* common
$ cd ..
Download minetest_game (otherwise only the "Minimal development test" game is available)
$ cd games/
$ wget https://github.com/celeron55/minetest_game/tarball/master -O master.tar.gz
$ tar xf master.tar.gz
$ mv celeron55-minetest_game-* minetest_game
$ wget https://github.com/minetest/minetest_game/tarball/master -O minetest_game.tar.gz
$ tar xf minetest_game.tar.gz
$ mv minetest-minetest_game-* minetest_game
$ cd ..
Build a version that runs directly from the source directory:
@@ -106,11 +115,12 @@ $ ./minetest
- You can build a bare server or a bare client by specifying -DBUILD_CLIENT=0 or -DBUILD_SERVER=0
- You can select between Release and Debug build by -DCMAKE_BUILD_TYPE=<Debug or Release>
- Debug build is slower, but gives much more useful output in a debugger
- If you build a bare server, you don't need to have Irrlicht installed. In that case use -DIRRLICHT_SOURCE_DIR=/the/irrlicht/source
Compiling on Windows:
---------------------
- This section is outdated. In addition to what is described here:
- In addition to minetest, you need to download minetest_game.
- In addition to minetest, you need to download common and minetest_game.
- If you wish to have sound support, you need libogg, libvorbis and libopenal
- You need:
@@ -125,11 +135,11 @@ Compiling on Windows:
http://www.winimage.com/zLibDll/index.html
* Zlib library (zlibwapi.lib and zlibwapi.dll from zlib125dll.zip):
http://www.winimage.com/zLibDll/index.html
* Optional: gettext bibrary and tools:
* Optional: gettext library and tools:
http://gnuwin32.sourceforge.net/downlinks/gettext.php
- This is used for other UI languages. Feel free to leave it out.
* And, of course, Minetest-c55:
http://c55.me/minetest/download
* And, of course, Minetest:
http://minetest.net/download.php
- Steps:
- Select a directory called DIR hereafter in which you will operate.
- Make sure you have CMake and a compiler installed.
@@ -244,20 +254,20 @@ popd
echo Failed.
exit /b 1
License of Minetest-c55 textures and sounds
-------------------------------------------
License of Minetest textures and sounds
---------------------------------------
This applies to textures and sounds contained in the main Minetest
distribution.
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/
License of Minetest-c55 source code
-----------------------------------
License of Minetest source code
-------------------------------
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -371,4 +381,8 @@ DejaVu Sans Mono:
Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
Liberation Fonts Copyright:
Copyright (c) 2007 Red Hat, Inc. All rights reserved. LIBERATION is a trademark of Red Hat, Inc.

View File

@@ -8,6 +8,7 @@
-- Initialize some very basic things
print = minetest.debug
math.randomseed(os.time())
os.setlocale("C", "numeric")
-- Load other files
dofile(minetest.get_modpath("__builtin").."/serialize.lua")
@@ -22,4 +23,5 @@ dofile(minetest.get_modpath("__builtin").."/auth.lua")
dofile(minetest.get_modpath("__builtin").."/chatcommands.lua")
dofile(minetest.get_modpath("__builtin").."/static_spawn.lua")
dofile(minetest.get_modpath("__builtin").."/detached_inventory.lua")
dofile(minetest.get_modpath("__builtin").."/falling.lua")

View File

@@ -116,6 +116,9 @@ minetest.register_chatcommand("grant", {
if not grantname or not grantprivstr then
minetest.chat_send_player(name, "Invalid parameters (see /help grant)")
return
elseif not minetest.auth_table[grantname] then
minetest.chat_send_player(name, "Player "..grantname.." does not exist.")
return
end
local grantprivs = minetest.string_to_privs(grantprivstr)
if grantprivstr == "all" then
@@ -138,6 +141,7 @@ minetest.register_chatcommand("grant", {
return
end
minetest.set_player_privs(grantname, privs)
minetest.log(name..' granted ('..minetest.privs_to_string(grantprivs, ', ')..') privileges to '..grantname)
minetest.chat_send_player(name, "Privileges of "..grantname..": "..minetest.privs_to_string(minetest.get_player_privs(grantname), ' '))
if grantname ~= name then
minetest.chat_send_player(grantname, name.." granted you privileges: "..minetest.privs_to_string(grantprivs, ' '))
@@ -158,6 +162,9 @@ minetest.register_chatcommand("revoke", {
if not revokename or not revokeprivstr then
minetest.chat_send_player(name, "Invalid parameters (see /help revoke)")
return
elseif not minetest.auth_table[revokename] then
minetest.chat_send_player(name, "Player "..revokename.." does not exist.")
return
end
local revokeprivs = minetest.string_to_privs(revokeprivstr)
local privs = minetest.get_player_privs(revokename)
@@ -175,6 +182,7 @@ minetest.register_chatcommand("revoke", {
end
end
minetest.set_player_privs(revokename, privs)
minetest.log(name..' revoked ('..minetest.privs_to_string(revokeprivs, ', ')..') privileges from '..revokename)
minetest.chat_send_player(name, "Privileges of "..revokename..": "..minetest.privs_to_string(minetest.get_player_privs(revokename), ' '))
if revokename ~= name then
minetest.chat_send_player(revokename, name.." revoked privileges from you: "..minetest.privs_to_string(revokeprivs, ' '))
@@ -215,8 +223,8 @@ minetest.register_chatcommand("clearpassword", {
privs = {password=true},
func = function(name, param)
toname = param
if not toname then
minetest.chat_send_player(toname, "Name field required")
if toname == "" then
minetest.chat_send_player(name, "Name field required")
return
end
minetest.set_player_password(toname, '')

196
builtin/falling.lua Normal file
View File

@@ -0,0 +1,196 @@
-- Minetest: builtin/item.lua
--
-- Falling stuff
--
minetest.register_entity("__builtin:falling_node", {
initial_properties = {
physical = true,
collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
visual = "wielditem",
textures = {},
visual_size = {x=0.667, y=0.667},
},
nodename = "",
set_node = function(self, nodename)
self.nodename = nodename
local stack = ItemStack(nodename)
local itemtable = stack:to_table()
local itemname = nil
if itemtable then
itemname = stack:to_table().name
end
local item_texture = nil
local item_type = ""
if minetest.registered_items[itemname] then
item_texture = minetest.registered_items[itemname].inventory_image
item_type = minetest.registered_items[itemname].type
end
prop = {
is_visible = true,
textures = {nodename},
}
self.object:set_properties(prop)
end,
get_staticdata = function(self)
return self.nodename
end,
on_activate = function(self, staticdata)
self.nodename = staticdata
self.object:set_armor_groups({immortal=1})
--self.object:setacceleration({x=0, y=-10, z=0})
self:set_node(self.nodename)
end,
on_step = function(self, dtime)
-- Set gravity
self.object:setacceleration({x=0, y=-10, z=0})
-- Turn to actual sand when collides to ground or just move
local pos = self.object:getpos()
local bcp = {x=pos.x, y=pos.y-0.7, z=pos.z} -- Position of bottom center point
local bcn = minetest.env:get_node(bcp)
-- Note: walkable is in the node definition, not in item groups
if minetest.registered_nodes[bcn.name] and
minetest.registered_nodes[bcn.name].walkable then
if minetest.registered_nodes[bcn.name].buildable_to then
minetest.env:remove_node(bcp)
return
end
local np = {x=bcp.x, y=bcp.y+1, z=bcp.z}
-- Check what's here
local n2 = minetest.env:get_node(np)
-- If it's not air or liquid, remove node and replace it with
-- it's drops
if n2.name ~= "air" and (not minetest.registered_nodes[n2.name] or
minetest.registered_nodes[n2.name].liquidtype == "none") then
local drops = minetest.get_node_drops(n2.name, "")
minetest.env:remove_node(np)
-- Add dropped items
local _, dropped_item
for _, dropped_item in ipairs(drops) do
minetest.env:add_item(np, dropped_item)
end
-- Run script hook
local _, callback
for _, callback in ipairs(minetest.registered_on_dignodes) do
callback(np, n2, nil)
end
end
-- Create node and remove entity
minetest.env:add_node(np, {name=self.nodename})
self.object:remove()
nodeupdate(np)
else
-- Do nothing
end
end
})
function spawn_falling_node(p, nodename)
obj = minetest.env:add_entity(p, "__builtin:falling_node")
obj:get_luaentity():set_node(nodename)
end
function drop_attached_node(p)
local nn = minetest.env:get_node(p).name
minetest.env:remove_node(p)
for _,item in ipairs(minetest.get_node_drops(nn, "")) do
local pos = {
x = p.x + math.random()/2 - 0.25,
y = p.y + math.random()/2 - 0.25,
z = p.z + math.random()/2 - 0.25,
}
minetest.env:add_item(pos, item)
end
end
function check_attached_node(p, n)
local def = minetest.registered_nodes[n.name]
local d = {x=0, y=0, z=0}
if def.paramtype2 == "wallmounted" then
if n.param2 == 0 then
d.y = 1
elseif n.param2 == 1 then
d.y = -1
elseif n.param2 == 2 then
d.x = 1
elseif n.param2 == 3 then
d.x = -1
elseif n.param2 == 4 then
d.z = 1
elseif n.param2 == 5 then
d.z = -1
end
else
d.y = -1
end
local p2 = {x=p.x+d.x, y=p.y+d.y, z=p.z+d.z}
local nn = minetest.env:get_node(p2).name
local def2 = minetest.registered_nodes[nn]
if def2 and not def2.walkable then
return false
end
return true
end
--
-- Some common functions
--
function nodeupdate_single(p)
n = minetest.env:get_node(p)
if minetest.get_node_group(n.name, "falling_node") ~= 0 then
p_bottom = {x=p.x, y=p.y-1, z=p.z}
n_bottom = minetest.env:get_node(p_bottom)
-- Note: walkable is in the node definition, not in item groups
if minetest.registered_nodes[n_bottom.name] and
(not minetest.registered_nodes[n_bottom.name].walkable or
minetest.registered_nodes[n_bottom.name].buildable_to) then
minetest.env:remove_node(p)
spawn_falling_node(p, n.name)
nodeupdate(p)
end
end
if minetest.get_node_group(n.name, "attached_node") ~= 0 then
if not check_attached_node(p, n) then
drop_attached_node(p)
nodeupdate(p)
end
end
end
function nodeupdate(p)
-- Round p to prevent falling entities to get stuck
p.x = math.floor(p.x+0.5)
p.y = math.floor(p.y+0.5)
p.z = math.floor(p.z+0.5)
for x = -1,1 do
for y = -1,1 do
for z = -1,1 do
p2 = {x=p.x+x, y=p.y+y, z=p.z+z}
nodeupdate_single(p2)
end
end
end
end
--
-- Global callbacks
--
function on_placenode(p, node)
nodeupdate(p)
end
minetest.register_on_placenode(on_placenode)
function on_dignode(p, node)
nodeupdate(p)
end
minetest.register_on_dignode(on_dignode)

View File

@@ -76,10 +76,10 @@ function minetest.get_node_drops(nodename, toolname)
local drop = ItemStack({name=nodename}):get_definition().drop
if drop == nil then
-- default drop
return {ItemStack({name=nodename})}
return {nodename}
elseif type(drop) == "string" then
-- itemstring drop
return {ItemStack(drop)}
return {drop}
elseif drop.items == nil then
-- drop = {} to disable default drop
return {}
@@ -129,11 +129,18 @@ function minetest.item_place_node(itemstack, placer, pointed_thing)
end
local under = pointed_thing.under
local oldnode_under = minetest.env:get_node(under)
local oldnode_under = minetest.env:get_node_or_nil(under)
local above = pointed_thing.above
local oldnode_above = minetest.env:get_node_or_nil(above)
if not oldnode_under or not oldnode_above then
minetest.log("info", placer:get_player_name() .. " tried to place"
.. " node in unloaded position " .. minetest.pos_to_string(above))
return itemstack
end
local olddef_under = ItemStack({name=oldnode_under.name}):get_definition()
olddef_under = olddef_under or minetest.nodedef_default
local above = pointed_thing.above
local oldnode_above = minetest.env:get_node(above)
local olddef_above = ItemStack({name=oldnode_above.name}):get_definition()
olddef_above = olddef_above or minetest.nodedef_default
@@ -141,7 +148,7 @@ function minetest.item_place_node(itemstack, placer, pointed_thing)
minetest.log("info", placer:get_player_name() .. " tried to place"
.. " node in invalid position " .. minetest.pos_to_string(above)
.. ", replacing " .. oldnode_above.name)
return
return itemstack
end
-- Place above pointed node
@@ -181,14 +188,26 @@ function minetest.item_place_node(itemstack, placer, pointed_thing)
end
end
-- Check if the node is attached and if it can be placed there
if minetest.get_item_group(def.name, "attached_node") ~= 0 and
not check_attached_node(place_to, newnode) then
minetest.log("action", "attached node " .. def.name ..
" can not be placed at " .. minetest.pos_to_string(place_to))
return itemstack
end
-- Add node and update
minetest.env:add_node(place_to, newnode)
local take_item = true
-- Run callback
if def.after_place_node then
-- Copy place_to because callback can modify it
local place_to_copy = {x=place_to.x, y=place_to.y, z=place_to.z}
def.after_place_node(place_to_copy, placer)
if def.after_place_node(place_to_copy, placer, itemstack) then
take_item = false
end
end
-- Run script hook
@@ -198,10 +217,14 @@ function minetest.item_place_node(itemstack, placer, pointed_thing)
local place_to_copy = {x=place_to.x, y=place_to.y, z=place_to.z}
local newnode_copy = {name=newnode.name, param1=newnode.param1, param2=newnode.param2}
local oldnode_copy = {name=oldnode.name, param1=oldnode.param1, param2=oldnode.param2}
callback(place_to_copy, newnode_copy, placer, oldnode_copy)
if callback(place_to_copy, newnode_copy, placer, oldnode_copy, itemstack) then
take_item = false
end
end
itemstack:take_item()
if take_item then
itemstack:take_item()
end
return itemstack
end
@@ -215,11 +238,20 @@ function minetest.item_place_object(itemstack, placer, pointed_thing)
end
function minetest.item_place(itemstack, placer, pointed_thing)
-- Call on_rightclick if the pointed node defines it
if pointed_thing.type == "node" and placer and
not placer:get_player_control().sneak then
local n = minetest.env:get_node(pointed_thing.under)
local nn = n.name
if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].on_rightclick then
return minetest.registered_nodes[nn].on_rightclick(pointed_thing.under, n, placer, itemstack) or itemstack
end
end
if itemstack:get_definition().type == "node" then
return minetest.item_place_node(itemstack, placer, pointed_thing)
else
return minetest.item_place_object(itemstack, placer, pointed_thing)
end
return itemstack
end
function minetest.item_drop(itemstack, dropper, pos)
@@ -236,7 +268,7 @@ function minetest.item_drop(itemstack, dropper, pos)
else
minetest.env:add_item(pos, itemstack)
end
return ""
return ItemStack("")
end
function minetest.item_eat(hp_change, replace_with_item)
@@ -265,7 +297,15 @@ function minetest.handle_node_drops(pos, drops, digger)
if digger:get_inventory() then
local _, dropped_item
for _, dropped_item in ipairs(drops) do
digger:get_inventory():add_item("main", dropped_item)
local left = digger:get_inventory():add_item("main", dropped_item)
if not left:is_empty() then
local p = {
x = pos.x + math.random()/2-0.25,
y = pos.y + math.random()/2-0.25,
z = pos.z + math.random()/2-0.25,
}
minetest.env:add_item(p, left)
end
end
end
end
@@ -359,6 +399,7 @@ minetest.nodedef_default = {
can_dig = nil,
on_punch = redef_wrapper(minetest, 'node_punch'), -- minetest.node_punch
on_rightclick = nil,
on_dig = redef_wrapper(minetest, 'node_dig'), -- minetest.node_dig
on_receive_fields = nil,
@@ -448,7 +489,7 @@ minetest.noneitemdef_default = { -- This is used for the hand and unknown items
tool_capabilities = nil,
-- Interaction callbacks
on_place = nil,
on_place = redef_wrapper(minetest, 'item_place'),
on_drop = nil,
on_use = nil,
}

View File

@@ -57,11 +57,23 @@ minetest.register_entity("__builtin:item", {
end,
get_staticdata = function(self)
return self.itemstring
--return self.itemstring
return minetest.serialize({
itemstring = self.itemstring,
always_collect = self.always_collect,
})
end,
on_activate = function(self, staticdata)
self.itemstring = staticdata
if string.sub(staticdata, 1, string.len("return")) == "return" then
local data = minetest.deserialize(staticdata)
if data and type(data) == "table" then
self.itemstring = data.itemstring
self.always_collect = data.always_collect
end
else
self.itemstring = staticdata
end
self.object:set_armor_groups({immortal=1})
self.object:setvelocity({x=0, y=2, z=0})
self.object:setacceleration({x=0, y=-10, z=0})
@@ -72,8 +84,9 @@ minetest.register_entity("__builtin:item", {
local p = self.object:getpos()
p.y = p.y - 0.3
local nn = minetest.env:get_node(p).name
-- If node is not registered or node is walkably solid
if not minetest.registered_nodes[nn] or minetest.registered_nodes[nn].walkable then
-- If node is not registered or node is walkably solid and resting on nodebox
local v = self.object:getvelocity()
if not minetest.registered_nodes[nn] or minetest.registered_nodes[nn].walkable and v.y == 0 then
if self.physical_state then
self.object:setvelocity({x=0,y=0,z=0})
self.object:setacceleration({x=0, y=0, z=0})
@@ -96,7 +109,11 @@ minetest.register_entity("__builtin:item", {
on_punch = function(self, hitter)
if self.itemstring ~= '' then
hitter:get_inventory():add_item("main", self.itemstring)
local left = hitter:get_inventory():add_item("main", self.itemstring)
if not left:is_empty() then
self.itemstring = left:to_string()
return
end
end
self.object:remove()
end,

View File

@@ -14,14 +14,14 @@ minetest.register_globalstep(function(dtime)
for index, timer in ipairs(minetest.timers) do
timer.time = timer.time - dtime
if timer.time <= 0 then
timer.func(timer.param)
timer.func(unpack(timer.args or {}))
table.remove(minetest.timers,index)
end
end
end)
function minetest.after(time, func, param)
table.insert(minetest.timers_to_add, {time=time, func=func, param=param})
function minetest.after(time, func, ...)
table.insert(minetest.timers_to_add, {time=time, func=func, args={...}})
end
function minetest.check_player_privs(name, privs)
@@ -99,3 +99,10 @@ function minetest.setting_get_pos(name)
return minetest.string_to_pos(value)
end
function minetest.formspec_escape(str)
str = string.gsub(str, "\\", "\\\\")
str = string.gsub(str, "%[", "\\[")
str = string.gsub(str, "%]", "\\]")
return str
end

View File

@@ -259,6 +259,7 @@ minetest.register_node(":air", {
diggable = false,
buildable_to = true,
air_equivalent = true,
drop = "",
groups = {not_in_creative_inventory=1},
})
@@ -274,6 +275,7 @@ minetest.register_node(":ignore", {
diggable = false,
buildable_to = true, -- A way to remove accidentally placed ignores
air_equivalent = true,
drop = "",
groups = {not_in_creative_inventory=1},
})
@@ -301,6 +303,7 @@ end
minetest.registered_on_chat_messages, minetest.register_on_chat_message = make_registration()
minetest.registered_globalsteps, minetest.register_globalstep = make_registration()
minetest.registered_on_shutdown, minetest.register_on_shutdown = make_registration()
minetest.registered_on_punchnodes, minetest.register_on_punchnode = make_registration()
minetest.registered_on_placenodes, minetest.register_on_placenode = make_registration()
minetest.registered_on_dignodes, minetest.register_on_dignode = make_registration()

View File

@@ -44,5 +44,9 @@ minetest.register_privilege("fast", {
description = "Can walk fast using the fast_move mode",
give_to_singleplayer = false,
})
minetest.register_privilege("noclip", {
description = "Can fly through walls",
give_to_singleplayer = false,
})
minetest.register_privilege("rollback", "Can use the rollback functionality")

2
client/serverlist/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*
!.gitignore

View File

@@ -0,0 +1 @@
trans_alphach_ref

View File

@@ -0,0 +1,25 @@
uniform sampler2D myTexture;
uniform vec4 skyBgColor;
uniform float fogDistance;
varying vec3 vPosition;
void main (void)
{
//vec4 col = vec4(1.0, 0.0, 0.0, 1.0);
vec4 col = texture2D(myTexture, vec2(gl_TexCoord[0]));
float a = col.a;
col *= gl_Color;
col = col * col; // SRGB -> Linear
col *= 1.8;
col.r = 1.0 - exp(1.0 - col.r) / exp(1.0);
col.g = 1.0 - exp(1.0 - col.g) / exp(1.0);
col.b = 1.0 - exp(1.0 - col.b) / exp(1.0);
col = sqrt(col); // Linear -> SRGB
if(fogDistance != 0.0){
float d = max(0.0, min(vPosition.z / fogDistance * 1.5 - 0.6, 1.0));
col = mix(col, skyBgColor, d);
}
gl_FragColor = vec4(col.r, col.g, col.b, a);
}

View File

@@ -0,0 +1,58 @@
uniform mat4 mWorldViewProj;
uniform mat4 mInvWorld;
uniform mat4 mTransWorld;
uniform float dayNightRatio;
varying vec3 vPosition;
void main(void)
{
gl_Position = mWorldViewProj * gl_Vertex;
vPosition = (mWorldViewProj * gl_Vertex).xyz;
vec4 color;
//color = vec4(1.0, 1.0, 1.0, 1.0);
float day = gl_Color.r;
float night = gl_Color.g;
float light_source = gl_Color.b;
/*color.r = mix(night, day, dayNightRatio);
color.g = color.r;
color.b = color.r;*/
float rg = mix(night, day, dayNightRatio);
rg += light_source * 1.0; // Make light sources brighter
float b = rg;
// Moonlight is blue
b += (day - night) / 13.0;
rg -= (day - night) / 13.0;
// Emphase blue a bit in darker places
// See C++ implementation in mapblock_mesh.cpp finalColorBlend()
b += max(0.0, (1.0 - abs(b - 0.13)/0.17) * 0.025);
// Artificial light is yellow-ish
// See C++ implementation in mapblock_mesh.cpp finalColorBlend()
rg += max(0.0, (1.0 - abs(rg - 0.85)/0.15) * 0.065);
color.r = rg;
color.g = rg;
color.b = b;
// Make sides and bottom darker than the top
color = color * color; // SRGB -> Linear
if(gl_Normal.y <= 0.5)
color *= 0.6;
//color *= 0.7;
color = sqrt(color); // Linear -> SRGB
color.a = gl_Color.a;
gl_FrontColor = gl_BackColor = color;
gl_TexCoord[0] = gl_MultiTexCoord0;
}

View File

@@ -0,0 +1 @@
trans_alphach

View File

@@ -0,0 +1,23 @@
uniform sampler2D myTexture;
uniform float fogDistance;
varying vec3 vPosition;
void main (void)
{
vec4 col = texture2D(myTexture, vec2(gl_TexCoord[0]));
col *= gl_Color;
float a = gl_Color.a;
col = col * col; // SRGB -> Linear
col *= 1.8;
col.r = 1.0 - exp(1.0 - col.r) / exp(1.0);
col.g = 1.0 - exp(1.0 - col.g) / exp(1.0);
col.b = 1.0 - exp(1.0 - col.b) / exp(1.0);
col = sqrt(col); // Linear -> SRGB
if(fogDistance != 0.0){
float d = max(0.0, min(vPosition.z / fogDistance * 1.5 - 0.6, 1.0));
a = mix(a, 0.0, d);
}
gl_FragColor = vec4(col.r, col.g, col.b, a);
}

View File

@@ -0,0 +1,51 @@
uniform mat4 mWorldViewProj;
uniform mat4 mInvWorld;
uniform mat4 mTransWorld;
uniform float dayNightRatio;
varying vec3 vPosition;
void main(void)
{
gl_Position = mWorldViewProj * gl_Vertex;
vPosition = (mWorldViewProj * gl_Vertex).xyz;
vec4 color;
//color = vec4(1.0, 1.0, 1.0, 1.0);
float day = gl_Color.r;
float night = gl_Color.g;
float light_source = gl_Color.b;
/*color.r = mix(night, day, dayNightRatio);
color.g = color.r;
color.b = color.r;*/
float rg = mix(night, day, dayNightRatio);
rg += light_source * 1.0; // Make light sources brighter
float b = rg;
// Moonlight is blue
b += (day - night) / 13.0;
rg -= (day - night) / 13.0;
// Emphase blue a bit in darker places
// See C++ implementation in mapblock_mesh.cpp finalColorBlend()
b += max(0.0, (1.0 - abs(b - 0.13)/0.17) * 0.025);
// Artificial light is yellow-ish
// See C++ implementation in mapblock_mesh.cpp finalColorBlend()
rg += max(0.0, (1.0 - abs(rg - 0.85)/0.15) * 0.065);
color.r = rg;
color.g = rg;
color.b = b;
color.a = gl_Color.a;
gl_FrontColor = gl_BackColor = color;
gl_TexCoord[0] = gl_MultiTexCoord0;
}

View File

@@ -0,0 +1,42 @@
# - Find curl
# Find the native CURL headers and libraries.
#
# CURL_INCLUDE_DIR - where to find curl/curl.h, etc.
# CURL_LIBRARY - List of libraries when using curl.
# CURL_FOUND - True if curl found.
if( UNIX )
FIND_PATH(CURL_INCLUDE_DIR NAMES curl.h
PATHS
/usr/local/include/curl
/usr/include/curl
)
FIND_LIBRARY(CURL_LIBRARY NAMES curl
PATHS
/usr/local/lib
/usr/lib
)
else( UNIX )
FIND_PATH(CURL_INCLUDE_DIR NAMES curl/curl.h) # Look for the header file.
FIND_LIBRARY(CURL_LIBRARY NAMES curl) # Look for the library.
INCLUDE(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR) # all listed variables are TRUE
endif( UNIX )
if( WIN32 )
if( CURL_LIBRARY AND CURL_INCLUDE_DIR AND CURL_DLL ) # libcurl.dll is required on Windows
SET(CURL_FOUND TRUE)
else( CURL_LIBRARY AND CURL_INCLUDE_DIR AND CURL_DLL )
SET(CURL_FOUND FALSE)
endif( CURL_LIBRARY AND CURL_INCLUDE_DIR AND CURL_DLL )
else ( WIN32 )
if( CURL_LIBRARY AND CURL_INCLUDE_DIR )
SET(CURL_FOUND TRUE)
else( CURL_LIBRARY AND CURL_INCLUDE_DIR )
SET(CURL_FOUND FALSE)
endif( CURL_LIBRARY AND CURL_INCLUDE_DIR )
endif ( WIN32 )
MESSAGE(STATUS "CURL_INCLUDE_DIR = ${CURL_INCLUDE_DIR}")
MESSAGE(STATUS "CURL_LIBRARY = ${CURL_LIBRARY}")

View File

@@ -0,0 +1,18 @@
# Look for json, use our own if not found
#FIND_PATH(JSON_INCLUDE_DIR json.h)
#FIND_LIBRARY(JSON_LIBRARY NAMES jsoncpp)
#IF(JSON_LIBRARY AND JSON_INCLUDE_DIR)
# SET( JSON_FOUND TRUE )
#ENDIF(JSON_LIBRARY AND JSON_INCLUDE_DIR)
#IF(JSON_FOUND)
# MESSAGE(STATUS "Found system jsoncpp header file in ${JSON_INCLUDE_DIR}")
# MESSAGE(STATUS "Found system jsoncpp library ${JSON_LIBRARY}")
#ELSE(JSON_FOUND)
SET(JSON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/json)
SET(JSON_LIBRARY jsoncpp)
MESSAGE(STATUS "Using project jsoncpp library")
#ENDIF(JSON_FOUND)

View File

@@ -0,0 +1,130 @@
#-------------------------------------------------------------------
# This file is stolen from part of the CMake build system for OGRE (Object-oriented Graphics Rendering Engine) http://www.ogre3d.org/
#
# The contents of this file are placed in the public domain. Feel
# free to make use of it in any way you like.
#-------------------------------------------------------------------
# - Try to find OpenGLES and EGL
# Once done this will define
#
# OPENGLES2_FOUND - system has OpenGLES
# OPENGLES2_INCLUDE_DIR - the GL include directory
# OPENGLES2_LIBRARIES - Link these to use OpenGLES
#
# EGL_FOUND - system has EGL
# EGL_INCLUDE_DIR - the EGL include directory
# EGL_LIBRARIES - Link these to use EGL
# win32, apple, android NOT TESED
# linux tested and works
IF (WIN32)
IF (CYGWIN)
FIND_PATH(OPENGLES2_INCLUDE_DIR GLES2/gl2.h )
FIND_LIBRARY(OPENGLES2_gl_LIBRARY libGLESv2 )
ELSE (CYGWIN)
IF(BORLAND)
SET (OPENGLES2_gl_LIBRARY import32 CACHE STRING "OpenGL ES 2.x library for win32")
ELSE(BORLAND)
# todo
# SET (OPENGLES_gl_LIBRARY ${SOURCE_DIR}/Dependencies/lib/release/libGLESv2.lib CACHE STRING "OpenGL ES 2.x library for win32"
ENDIF(BORLAND)
ENDIF (CYGWIN)
ELSE (WIN32)
IF (APPLE)
create_search_paths(/Developer/Platforms)
findpkg_framework(OpenGLES2)
set(OPENGLES2_gl_LIBRARY "-framework OpenGLES")
ELSE(APPLE)
FIND_PATH(OPENGLES2_INCLUDE_DIR GLES2/gl2.h
/usr/openwin/share/include
/opt/graphics/OpenGL/include /usr/X11R6/include
/usr/include
)
FIND_LIBRARY(OPENGLES2_gl_LIBRARY
NAMES GLESv2
PATHS /opt/graphics/OpenGL/lib
/usr/openwin/lib
/usr/shlib /usr/X11R6/lib
/usr/lib
)
IF (NOT BUILD_ANDROID)
FIND_PATH(EGL_INCLUDE_DIR EGL/egl.h
/usr/openwin/share/include
/opt/graphics/OpenGL/include /usr/X11R6/include
/usr/include
)
FIND_LIBRARY(EGL_egl_LIBRARY
NAMES EGL
PATHS /opt/graphics/OpenGL/lib
/usr/openwin/lib
/usr/shlib /usr/X11R6/lib
/usr/lib
)
# On Unix OpenGL most certainly always requires X11.
# Feel free to tighten up these conditions if you don't
# think this is always true.
# It's not true on OSX.
IF (OPENGLES2_gl_LIBRARY)
IF(NOT X11_FOUND)
INCLUDE(FindX11)
ENDIF(NOT X11_FOUND)
IF (X11_FOUND)
IF (NOT APPLE)
SET (OPENGLES2_LIBRARIES ${X11_LIBRARIES})
ENDIF (NOT APPLE)
ENDIF (X11_FOUND)
ENDIF (OPENGLES2_gl_LIBRARY)
ENDIF ()
ENDIF(APPLE)
ENDIF (WIN32)
#SET( OPENGLES2_LIBRARIES ${OPENGLES2_gl_LIBRARY} ${OPENGLES2_LIBRARIES})
IF (BUILD_ANDROID)
IF(OPENGLES2_gl_LIBRARY)
SET( OPENGLES2_LIBRARIES ${OPENGLES2_gl_LIBRARY} ${OPENGLES2_LIBRARIES})
SET( EGL_LIBRARIES)
SET( OPENGLES2_FOUND "YES" )
ENDIF(OPENGLES2_gl_LIBRARY)
ELSE ()
SET( OPENGLES2_LIBRARIES ${OPENGLES2_gl_LIBRARY} ${OPENGLES2_LIBRARIES})
IF(OPENGLES2_gl_LIBRARY AND EGL_egl_LIBRARY)
SET( OPENGLES2_LIBRARIES ${OPENGLES2_gl_LIBRARY} ${OPENGLES2_LIBRARIES})
SET( EGL_LIBRARIES ${EGL_egl_LIBRARY} ${EGL_LIBRARIES})
SET( OPENGLES2_FOUND "YES" )
ENDIF(OPENGLES2_gl_LIBRARY AND EGL_egl_LIBRARY)
ENDIF ()
MARK_AS_ADVANCED(
OPENGLES2_INCLUDE_DIR
OPENGLES2_gl_LIBRARY
EGL_INCLUDE_DIR
EGL_egl_LIBRARY
)
IF(OPENGLES2_FOUND)
MESSAGE(STATUS "Found system opengles2 library ${OPENGLES2_LIBRARIES}")
ELSE ()
SET(OPENGLES2_LIBRARIES "")
ENDIF ()

View File

@@ -1,5 +1,5 @@
Minetest Lua Modding API Reference 0.4.0
==========================================
Minetest Lua Modding API Reference 0.4.6
========================================
More information at http://c55.me/minetest/
Introduction
@@ -27,6 +27,39 @@ Startup
Mods are loaded during server startup from the mod load paths by running
the init.lua scripts in a shared environment.
Paths
-----
RUN_IN_PLACE=1: (Windows release, local build)
$path_user: Linux: <build directory>
Windows: <build directory>
$path_share: Linux: <build directory>
Windows: <build directory>
RUN_IN_PLACE=0: (Linux release)
$path_share: Linux: /usr/share/minetest
Windows: <install directory>/minetest-0.4.x
$path_user: Linux: ~/.minetest
Windows: C:/users/<user>/AppData/minetest (maybe)
Games
-----
Games are looked up from:
$path_share/games/gameid/
$path_user/games/gameid/
where gameid is unique to each game.
The game directory contains the file game.conf, which contains these fields:
name = <Human-readable full name of the game>
common_mods = <Comma-separated list of common mods>
eg.
name = Minetest
common_mods = bucket, default, doors, fire, stairs
Common mods are loaded from the pseudo-game "common".
The game directory can contain the file minetest.conf, which will be used
to set default settings when running the particular game.
Mod load path
-------------
Generic:
@@ -170,18 +203,18 @@ from the available ones of the following files:
Examples of sound parameter tables:
-- Play locationless on all clients
{
gain = 1.0, -- default
gain = 1.0, -- default
}
-- Play locationless to a player
{
to_player = name,
gain = 1.0, -- default
to_player = name,
gain = 1.0, -- default
}
-- Play in a location
{
pos = {x=1,y=2,z=3},
gain = 1.0, -- default
max_hear_distance = 32, -- default
pos = {x=1,y=2,z=3},
gain = 1.0, -- default
max_hear_distance = 32, -- default
}
-- Play connected to an object, looped
{
@@ -233,11 +266,11 @@ local drawtype = get_nodedef_field(nodename, "drawtype")
Example: minetest.get_item_group(name, group) has been implemented as:
function minetest.get_item_group(name, group)
if not minetest.registered_items[name] or not
minetest.registered_items[name].groups[group] then
return 0
end
return minetest.registered_items[name].groups[group]
if not minetest.registered_items[name] or not
minetest.registered_items[name].groups[group] then
return 0
end
return minetest.registered_items[name].groups[group]
end
Nodes
@@ -277,6 +310,10 @@ param2 is reserved for the engine when any of these are used:
paramtype2 == "facedir"
^ The rotation of the node is stored in param2. Furnaces and chests are
rotated this way. Can be made by using minetest.dir_to_facedir().
Values range 0 - 23
facedir modulo 4 = axisdir
0 = y+ 1 = z+ 2 = z- 3 = x+ 4 = x- 5 = y-
facedir's two less significant bits are rotation around the axis
Nodes can also contain extra data. See "Node Metadata".
@@ -335,6 +372,35 @@ A box is defined as:
A box of a regular node would look like:
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
Ore types
---------------
These tell in what manner the ore is generated.
All default ores are of the uniformly-distributed scatter type.
- scatter
Randomly chooses a location and generates a cluster of ore.
If noise_params is specified, the ore will be placed if the 3d perlin noise at
that point is greater than the noise_threshhold, giving the ability to create a non-equal
distribution of ore.
- sheet
Creates a sheet of ore in a blob shape according to the 2d perlin noise described by noise_params.
The relative height of the sheet can be controlled by the same perlin noise as well, by specifying
a non-zero 'scale' parameter in noise_params. IMPORTANT: The noise is not transformed by offset or
scale when comparing against the noise threshhold, but scale is used to determine relative height.
The height of the blob is randomly scattered, with a maximum height of clust_size.
clust_scarcity and clust_num_ores are ignored.
This is essentially an improved version of the so-called "stratus" ore seen in some unofficial mods.
- claylike - NOT YET IMPLEMENTED
Places ore if there are no more than clust_scarcity number of specified nodes within a Von Neumann
neighborhood of clust_size radius.
Ore attributes
-------------------
Currently supported flags: absheight
- absheight
Also produce this same ore between the height range of -height_max and -height_min.
Useful for having ore in sky realms without having to duplicate ore entries.
Representations of simple things
--------------------------------
Position/vector:
@@ -412,9 +478,11 @@ a node is destroyable and how long it takes to destroy by a tool.
Groups of entities
-------------------
For entities, groups are, as of now, used only for calculating damage.
The rating is the percentage of damage caused by tools with this damage group.
See "Entity damage mechanism".
object.get_armor_groups() -> a group-rating table (eg. {fleshy=3})
object.set_armor_groups({level=2, fleshy=2, cracky=2})
object.get_armor_groups() -> a group-rating table (eg. {fleshy=100})
object.set_armor_groups({fleshy=30, cracky=80})
Groups of tools
----------------
@@ -435,7 +503,7 @@ An example: Make meat soup from any meat, any water and any bowl
}
An another example: Make red wool from white wool and red dye
{
type = 'shapeless',
type = 'shapeless',
output = 'wool:red',
recipe = {'wool:white', 'group:dye,basecolor_red'},
}
@@ -446,7 +514,7 @@ Special groups
- level: Can be used to give an additional sense of progression in the game.
- A larger level will cause eg. a weapon of a lower level make much less
damage, and get weared out much faster, or not be able to get drops
from destroyed nodes.
from destroyed nodes.
- 0 is something that is directly accessible at the start of gameplay
- There is no upper limit
- dig_immediate: (player can always pick up node without tool wear)
@@ -456,10 +524,13 @@ Special groups
- disable_jump: Player (and possibly other things) cannot jump from node
- fall_damage_add_percent: damage speed = speed * (1 + value/100)
- bouncy: value is bounce speed in percent
- falling_node: if there is no walkable block under the node it will fall
- attached_node: if the node under it is not a walkable block the node will be
dropped as an item. If the node is wallmounted the
wallmounted direction is checked.
Known damage and digging time defining groups
----------------------------------------------
Valid ratings for these are 0, 1, 2 and 3, unless otherwise stated.
- crumbly: dirt, sand
- cracky: tough but crackable stuff like stone.
- snappy: something that can be cut using fine tools; eg. leaves, small
@@ -512,6 +583,7 @@ groups to enable interaction with tools.
* Uses (until the tool breaks)
* Maximum level (usually 0, 1, 2 or 3)
* Digging times
* Damage groups
**Full punch interval**:
When used as a weapon, the tool will do full damage if this time is spent
@@ -543,17 +615,19 @@ maximum level.
result in the tool to be able to dig nodes that have a rating of 2 or 3
for this group, and unable to dig the rating 1, which is the toughest.
Unless there is a matching group that enables digging otherwise.
* For entities, damage equals the amount of nodes dug in the time spent
between hits, with a maximum time of ''full_punch_interval''.
**Damage groups**
List of damage for groups of entities. See "Entity damage mechanism".
Example definition of the capabilities of a tool
-------------------------------------------------
tool_capabilities = {
full_punch_interval=1.5,
max_drop_level=1,
groupcaps={
crumbly={maxlevel=2, uses=20, times={[1]=1.60, [2]=1.20, [3]=0.80}}
}
full_punch_interval=1.5,
max_drop_level=1,
groupcaps={
crumbly={maxlevel=2, uses=20, times={[1]=1.60, [2]=1.20, [3]=0.80}}
}
damage_groups = {fleshy=2},
}
This makes the tool be able to dig nodes that fullfill both of these:
@@ -584,10 +658,12 @@ Notes:
Entity damage mechanism
------------------------
Damage calculation:
- Take the time spent after the last hit
- Limit time to full_punch_interval
- Take the damage groups and imagine a bunch of nodes that have them
- Damage in HP is the amount of nodes destroyed in this time.
damage = 0
foreach group in cap.damage_groups:
damage += cap.damage_groups[group] * limit(actual_interval / cap.full_punch_interval, 0.0, 1.0)
* (object.armor_groups[group] / 100.0)
-- Where object.armor_groups[group] is 0 for inexisting values
return damage
Client predicts damage based on damage groups. Because of this, it is able to
give an immediate response when an entity is damaged or dies; the response is
@@ -693,6 +769,15 @@ image[<X>,<Y>;<W>,<H>;<texture name>]
^ Show an image
^ Position and size units are inventory slots
item_image[<X>,<Y>;<W>,<H>;<item name>]
^ Show an inventory image of registered item/node
^ Position and size units are inventory slots
background[<X>,<Y>;<W>,<H>;<texture name>]
^ Use a background. Inventory rectangles are not drawn then.
^ Position and size units are inventory slots
^ Example for formspec 8x4 in 16x resolution: image shall be sized 8*16px x 4*16px
field[<X>,<Y>;<W>,<H>;<name>;<label>;<default>]
^ Textual field; will be sent to server when a button is clicked
^ x and y position the field relative to the top left of the menu
@@ -704,7 +789,7 @@ field[<X>,<Y>;<W>,<H>;<name>;<label>;<default>]
^ default is the default value of the field
^ default may contain variable references such as '${text}' which
will fill the value from the metadata value 'text'
^ Note: no extra text or more than a single variable is supported ATM.
^ Note: no extra text or more than a single variable is supported ATM.
field[<name>;<label>;<default>]
^ as above but without position/size units
@@ -712,6 +797,9 @@ field[<name>;<label>;<default>]
^ must be used without a size[] element
^ a 'Proceed' button will be added automatically
textarea[<X>,<Y>;<W>,<H>;<name>;<label>;<default>]
^ same as fields above, but with multi-line input
label[<X>,<Y>;<label>]
^ x and y work as per field
^ label is the text on the label
@@ -729,6 +817,12 @@ image_button[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>]
^ image is the filename of an image
^ Position and size units are inventory slots
item_image_button[<X>,<Y>;<W>,<H>;<item name>;<name>;<label>]
^ x, y, w, h, name and label work as per button
^ item name is the registered name of an item/node,
tooltip will be made out of its descritption
^ Position and size units are inventory slots
button_exit[<X>,<Y>;<W>,<H>;<name>;<label>]
^ When clicked, fields will be sent and the form will quit.
@@ -756,6 +850,9 @@ string:trim()
minetest.pos_to_string({x=X,y=Y,z=Z}) -> "(X,Y,Z)"
^ Convert position to a printable string
minetest.string_to_pos(string) -> position
^ Same but in reverse
minetest.formspec_escape(string) -> string
^ escapes characters like [, ], and \ that can not be used in formspecs
minetest namespace reference
-----------------------------
@@ -782,12 +879,19 @@ minetest.register_tool(name, item definition)
minetest.register_craftitem(name, item definition)
minetest.register_alias(name, convert_to)
minetest.register_craft(recipe)
minetest.register_ore(ore definition)
Global callback registration functions: (Call these only at load time)
minetest.register_globalstep(func(dtime))
^ Called every server step, usually interval of 0.05s
minetest.register_on_placenode(func(pos, newnode, placer, oldnode))
minetest.register_on_shutdown(func())
^ Called before server shutdown
^ WARNING: If the server terminates abnormally (i.e. crashes), the registered
callbacks WILL LIKELY NOT BE RUN. Data should be saved at
semi-frequent intervals as well as on server shutdown.
minetest.register_on_placenode(func(pos, newnode, placer, oldnode, itemstack))
^ Called when a node has been placed
^ If return true no item is taken from itemstack
^ Deprecated: Use on_construct or after_place_node in node definition instead
minetest.register_on_dignode(func(pos, oldnode, digger))
^ Called when a node has been dug.
@@ -832,6 +936,7 @@ minetest.setting_set(name, value)
minetest.setting_get(name) -> string or nil
minetest.setting_getbool(name) -> boolean value or nil
minetest.setting_get_pos(name) -> position or nil
minetest.setting_save() -> nil, save all settings to config file
minetest.add_to_creative_inventory(itemstring)
Authentication:
@@ -863,6 +968,11 @@ minetest.get_inventory(location) -> InvRef
minetest.create_detached_inventory(name, callbacks) -> InvRef
^ callbacks: See "Detached inventory callbacks"
^ Creates a detached inventory. If it already exists, it is cleared.
minetest.show_formspec(playername, formname, formspec)
^ playername: name of player to show formspec
^ formname: name passed to on_player_receive_fields callbacks
^ should follow "modname:<whatever>" naming convention
^ formspec: formspec to display
Item handling:
minetest.inventorycube(img1, img2, img3)
@@ -885,12 +995,17 @@ minetest.get_craft_result(input) -> output, decremented_input
^ output.time = number, if unsuccessful: 0
^ decremented_input = like input
minetest.get_craft_recipe(output) -> input
^ returns last registered recipe for output item (node)
^ output is a node or item type such as 'default:torch'
^ input.method = 'normal' or 'cooking' or 'fuel'
^ input.width = for example 3
^ input.items = for example { stack 1, stack 2, stack 3, stack 4,
stack 5, stack 6, stack 7, stack 8, stack 9 }
^ input.items = nil if no recipe found
minetest.get_all_craft_recipes(output) -> table or nil
^ returns table with all registered recipes for output item (node)
^ returns nil if no recipe was found
^ table entries have same format as minetest.get_craft_recipe
minetest.handle_node_drops(pos, drops, digger)
^ drops: list of itemstrings
^ Handles drops from nodes after digging: Default action is to put them into
@@ -914,6 +1029,8 @@ minetest.item_place_object(itemstack, placer, pointed_thing)
^ Place item as-is
minetest.item_place(itemstack, placer, pointed_thing)
^ Use one of the above based on what the item is.
^ Calls on_rightclick of pointed_thing.under if defined instead
^ Note: is not called when wielded item overrides on_place
minetest.item_drop(itemstack, dropper, pos)
^ Drop the item
minetest.item_eat(hp_change, replace_with_item)
@@ -933,9 +1050,9 @@ minetest.sound_play(spec, parameters) -> handle
minetest.sound_stop(handle)
Timing:
minetest.after(time, func, param)
minetest.after(time, func, ...)
^ Call function after time seconds
^ param is optional; to pass multiple parameters, pass a table.
^ Optional: Variable number of arguments that are passed to func
Server:
minetest.request_shutdown() -> request for server shutdown
@@ -947,6 +1064,37 @@ minetest.get_ban_description(ip_or_name) -> ban description (string)
minetest.ban_player(name) -> ban a player
minetest.unban_player_or_ip(name) -> unban player or IP address
Particles:
minetest.add_particle(pos, velocity, acceleration, expirationtime,
size, collisiondetection, texture, playername)
^ Spawn particle at pos with velocity and acceleration
^ Disappears after expirationtime seconds
^ collisiondetection: if true collides with physical objects
^ Uses texture (string)
^ Playername is optional, if specified spawns particle only on the player's client
minetest.add_particlespawner(amount, time,
minpos, maxpos,
minvel, maxvel,
minacc, maxacc,
minexptime, maxexptime,
minsize, maxsize,
collisiondetection, texture, playername)
^ Add a particlespawner, an object that spawns an amount of particles over time seconds
^ The particle's properties are random values in between the boundings:
^ minpos/maxpos, minvel/maxvel (velocity), minacc/maxacc (acceleration),
^ minsize/maxsize, minexptime/maxexptime (expirationtime)
^ collisiondetection: if true uses collisiondetection
^ Uses texture (string)
^ Playername is optional, if specified spawns particle only on the player's client
^ If time is 0 has infinite lifespan and spawns the amount on a per-second base
^ Returns and id
minetest.delete_particlespawner(id, player)
^ Delete ParticleSpawner with id (return value from add_particlespawner)
^ If playername is specified, only deletes on the player's client,
^ otherwise on all clients
Random:
minetest.get_connected_players() -> list of ObjectRefs
minetest.hash_node_position({x=,y=,z=}) -> 48-bit integer
@@ -1038,6 +1186,68 @@ methods:
^ Return world-specific perlin noise (int(worldseed)+seeddiff)
- clear_objects()
^ clear all objects in the environments
- spawn_tree (pos, {treedef})
^ spawns L-System tree at given pos with definition in treedef table
treedef={
axiom, - string initial tree axiom
rules_a, - string rules set A
rules_b, - string rules set B
rules_c, - string rules set C
rules_d, - string rules set D
trunk, - string trunk node name
leaves, - string leaves node name
leaves2, - string secondary leaves node name
leaves2_chance,- num chance (0-100) to replace leaves with leaves2
angle, - num angle in deg
iterations, - num max # of iterations, usually 2 -5
random_level, - num factor to lower nr of iterations, usually 0 - 3
trunk_type, - string single/double/crossed) type of trunk: 1 node, 2x2 nodes or 3x3 in cross shape
thin_branches, - boolean true -> use thin (1 node) branches
fruit, - string fruit node name
fruit_chance, - num chance (0-100) to replace leaves with fruit node
seed, - num random seed
}
Key for Special L-System Symbols used in Axioms
G - move forward one unit with the pen up
F - move forward one unit with the pen down drawing trunks and branches
f - move forward one unit with the pen down drawing leaves (100% chance)
T - move forward one unit with the pen down drawing trunks only
R - move forward one unit with the pen down placing fruit
A - replace with rules set A
B - replace with rules set B
C - replace with rules set C
D - replace with rules set D
a - replace with rules set A, chance 90%
b - replace with rules set B, chance 80%
c - replace with rules set C, chance 70%
d - replace with rules set D, chance 60%
+ - yaw the turtle right by angle parameter
- - yaw the turtle left by angle parameter
& - pitch the turtle down by angle parameter
^ - pitch the turtle up by angle parameter
/ - roll the turtle to the right by angle parameter
* - roll the turtle to the left by angle parameter
[ - save in stack current state info
] - recover from stack state info
Example usage: spawn small apple tree
apple_tree={
axiom="FFFFFAFFBF",
rules_a="[&&&FFFFF&&FFFF][&&&++++FFFFF&&FFFF][&&&----FFFFF&&FFFF]",
rules_b="[&&&++FFFFF&&FFFF][&&&--FFFFF&&FFFF][&&&------FFFFF&&FFFF]",
trunk="default:tree",
leaves="default:leaves",
angle=30,
iterations=2,
random_level=0,
trunk_type="single",
thin_branches=true,
fruit_chance=10,
fruit="default:apple"
}
minetest.env:spawn_tree(pos,apple_tree)
Deprecated:
- add_rat(pos): Add C++ rat object (no-op)
- add_firefly(pos): Add C++ firefly object (no-op)
@@ -1087,6 +1297,7 @@ methods:
- punch(puncher, time_from_last_punch, tool_capabilities, direction)
^ puncher = an another ObjectRef,
^ time_from_last_punch = time since last punch action of the puncher
^ direction: can be nil
- right_click(clicker); clicker = an another ObjectRef
- get_hp(): returns number of hitpoints (2 * number of hearts)
- set_hp(hp): set number of hitpoints (2 * number of hearts)
@@ -1096,6 +1307,16 @@ methods:
- get_wielded_item() -> ItemStack
- set_wielded_item(item): replaces the wielded item, returns true if successful
- set_armor_groups({group1=rating, group2=rating, ...})
- set_animation({x=1,y=1}, frame_speed=15, frame_blend=0)
- set_attach(parent, bone, position, rotation)
^ bone = string
^ position = {x=num, y=num, z=num} (relative)
^ rotation = {x=num, y=num, z=num}
- set_detach()
- set_bone_position(bone, position, rotation)
^ bone = string
^ position = {x=num, y=num, z=num} (relative)
^ rotation = {x=num, y=num, z=num}
- set_properties(object property table)
LuaEntitySAO-only: (no-op for other objects)
- setvelocity({x=num, y=num, z=num})
@@ -1117,11 +1338,17 @@ Player-only: (no-op for other objects)
- get_look_dir(): get camera direction as a unit vector
- get_look_pitch(): pitch in radians
- get_look_yaw(): yaw in radians (wraps around pretty randomly as of now)
- set_look_pitch(radians): sets look pitch
- set_look_yaw(radians): sets look yaw
- set_inventory_formspec(formspec)
^ Redefine player's inventory form
^ Should usually be called in on_joinplayer
- get_inventory_formspec() -> formspec string
- get_player_control(): returns table with player pressed keys
{jump=bool,right=bool,left=bool,LMB=bool,RMB=bool,sneak=bool,aux1=bool,down=bool,up=bool}
- get_player_control_bits(): returns integer with bit packed player pressed keys
bit nr/meaning: 0/up ,1/down ,2/left ,3/right ,4/jump ,5/aux1 ,6/sneak ,7/LMB ,8/RMB
InvRef: Reference to an inventory
methods:
- is_empty(listname): return true if list is empty
@@ -1140,6 +1367,8 @@ methods:
can be fully taken from the list
remove_item(listname, stack): take as many items as specified from the list,
returns the items that were actually removed (as an ItemStack)
- get_location() -> location compatible to minetest.get_inventory(location)
-> {type="undefined"} in case location is not known
ItemStack: A stack of items.
- Can be created via ItemStack(itemstack or itemstring or table or nil)
@@ -1204,8 +1433,8 @@ Registered entities
^ puncher: ObjectRef (can be nil)
^ time_from_last_punch: Meant for disallowing spamming of clicks (can be nil)
^ tool_capabilities: capability table of used tool (can be nil)
^ dir: unit vector of direction of punch. Always defined. Points from
the puncher to the punched.
^ dir: unit vector of direction of punch. Always defined. Points from
the puncher to the punched.
- on_rightclick(self, clicker)
- get_staticdata(self)
^ Should return a string that will be passed to on_activate when
@@ -1220,9 +1449,11 @@ Object Properties
physical = true,
weight = 5,
collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
visual = "cube"/"sprite"/"upright_sprite",
visual = "cube"/"sprite"/"upright_sprite"/"mesh",
visual_size = {x=1, y=1},
mesh = "model",
textures = {}, -- number of required textures depends on visual
colors = {}, -- number of required colors depends on visual
spritediv = {x=1, y=1},
initial_sprite_basepos = {x=0, y=0},
is_visible = true,
@@ -1236,7 +1467,7 @@ Entity definition (register_entity)
initial_properties = <initial object properties>,
on_activate = function(self, staticdata),
on_activate = function(self, staticdata, dtime_s),
on_step = function(self, dtime),
on_punch = function(self, hitter),
on_rightclick = function(self, clicker),
@@ -1278,10 +1509,10 @@ Item definition (register_node, register_craftitem, register_tool)
max_drop_level=0,
groupcaps={
-- For example:
fleshy={times={[2]=0.80, [3]=0.40}, maxwear=0.05, maxlevel=1},
snappy={times={[2]=0.80, [3]=0.40}, maxwear=0.05, maxlevel=1},
choppy={times={[3]=0.90}, maxwear=0.05, maxlevel=0}
}
},
damage_groups = {groupname=damage},
}
node_placement_prediction = nil,
^ If nil and item is node, prediction is made automatically
@@ -1290,6 +1521,9 @@ Item definition (register_node, register_craftitem, register_tool)
^ Otherwise should be name of node which the client immediately places
on ground when the player places the item. Server will always update
actual result to client in a short moment.
sound = {
place = <SimpleSoundSpec>,
}
on_place = func(itemstack, placer, pointed_thing),
^ Shall place item and return the leftover itemstack
@@ -1324,10 +1558,10 @@ Node definition (register_node)
drawtype = "normal", -- See "Node drawtypes"
visual_scale = 1.0,
tiles = {tile definition 1, def2, def3, def4, def5, def6},
^ Textures of node; +Y, -Y, +X, -X, +Z, -Z (old field name: tile_images)
^ Textures of node; +Y, -Y, +X, -X, +Z, -Z (old field name: tile_images)
^ List can be shortened to needed length
special_tiles = {tile definition 1, Tile definition 2},
^ Special textures of node; used rarely (old field name: special_materials)
^ Special textures of node; used rarely (old field name: special_materials)
^ List can be shortened to needed length
alpha = 255,
post_effect_color = {a=0, r=0, g=0, b=0}, -- If player is inside node
@@ -1345,6 +1579,8 @@ Node definition (register_node)
liquid_alternative_flowing = "", -- Flowing version of source liquid
liquid_alternative_source = "", -- Source version of flowing liquid
liquid_viscosity = 0, -- Higher viscosity = slower flow (max. 7)
liquid_renewable = true, -- Can new liquid source be created by placing
two or more sources nearly?
light_source = 0, -- Amount of light emitted by node
damage_per_second = 0, -- If player is inside node, this damage is caused
node_box = {type="regular"}, -- See "Node boxes"
@@ -1355,6 +1591,7 @@ Node definition (register_node)
footstep = <SimpleSoundSpec>,
dig = <SimpleSoundSpec>, -- "__group" = group-based sound (default)
dug = <SimpleSoundSpec>,
place = <SimpleSoundSpec>,
},
on_construct = func(pos),
@@ -1368,9 +1605,10 @@ Node definition (register_node)
^ Node destructor; always called after removing node
^ default: nil
after_place_node = func(pos, placer),
after_place_node = func(pos, placer, itemstack),
^ Called after constructing node when node was placed using
minetest.item_place_node / minetest.env:place_node
^ If return true no item is taken from itemstack
^ default: nil
after_dig_node = func(pos, oldnode, oldmetadata, digger),
^ oldmetadata is in table format
@@ -1380,10 +1618,14 @@ Node definition (register_node)
can_dig = function(pos,player)
^ returns true if node can be dug, or false if not
^ default: nil
on_punch = func(pos, node, puncher),
^ default: minetest.node_punch
^ By default: does nothing
on_rightclick = func(pos, node, clicker, itemstack),
^ default: nil
^ if defined, itemstack will hold clicker's wielded item
Shall return the leftover itemstack
on_dig = func(pos, node, digger),
^ default: minetest.node_dig
^ By default: checks privileges, wears out tool and removes node
@@ -1399,27 +1641,32 @@ Node definition (register_node)
^ Called when an UI form (eg. sign text input) returns data
^ default: nil
allow_metadata_inventory_move = func(pos, from_list, from_index,
to_list, to_index, count, player),
^ Called when a player wants to move items inside the inventory
^ Return value: number of items allowed to move
allow_metadata_inventory_put = func(pos, listname, index, stack, player),
^ Called when a player wants to put something into the inventory
^ Return value: number of items allowed to put
^ Return value: -1: Allow and don't modify item count in inventory
allow_metadata_inventory_move = func(pos, from_list, from_index,
to_list, to_index, count, player),
^ Called when a player wants to move items inside the inventory
^ Return value: number of items allowed to move
allow_metadata_inventory_put = func(pos, listname, index, stack, player),
^ Called when a player wants to put something into the inventory
^ Return value: number of items allowed to put
^ Return value: -1: Allow and don't modify item count in inventory
allow_metadata_inventory_take = func(pos, listname, index, stack, player),
^ Called when a player wants to take something out of the inventory
^ Return value: number of items allowed to take
^ Return value: -1: Allow and don't modify item count in inventory
allow_metadata_inventory_take = func(pos, listname, index, stack, player),
^ Called when a player wants to take something out of the inventory
^ Return value: number of items allowed to take
^ Return value: -1: Allow and don't modify item count in inventory
on_metadata_inventory_move = func(pos, from_list, from_index,
to_list, to_index, count, player),
on_metadata_inventory_put = func(pos, listname, index, stack, player),
on_metadata_inventory_take = func(pos, listname, index, stack, player),
^ Called after the actual action has happened, according to what was allowed.
^ No return value
on_metadata_inventory_move = func(pos, from_list, from_index,
to_list, to_index, count, player),
on_metadata_inventory_put = func(pos, listname, index, stack, player),
on_metadata_inventory_take = func(pos, listname, index, stack, player),
^ Called after the actual action has happened, according to what was allowed.
^ No return value
on_blast = func(pos, intensity),
^ intensity: 1.0 = mid range of regular TNT
^ If defined, called when an explosion touches the node, instead of
removing the node
}
Recipe for register_craft: (shaped)
@@ -1468,6 +1715,30 @@ Recipe for register_craft (furnace fuel)
burntime = 1,
}
Ore definition (register_ore)
{
ore_type = "scatter" -- See "Ore types"
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 8*8*8,
^ Ore has a 1 out of clust_scarcity chance of spawning in a node
^ This value should be *MUCH* higher than your intuition might tell you!
clust_num_ores = 8,
^ Number of ores in a cluster
clust_size = 3,
^ Size of the bounding box of the cluster
^ In this example, there is a 3x3x3 cluster where 8 out of the 27 nodes are coal ore
height_min = -31000,
height_max = 64,
flags = "",
^ Attributes for this ore generation
noise_threshhold = 0.5,
^ If noise is above this threshhold, ore is placed. Not needed for a uniform distribution
noise_params = {offset=0, scale=1, spread={x=100, y=100, z=100}, seed=23, octaves=3, persist=0.70}
^ NoiseParams structure describing the perlin noise used for ore distribution.
^ Needed for sheet ore_type. Omit from scatter ore_type for a uniform ore distribution
}
Chatcommand definition (register_chatcommand)
{
params = "<name> <privilege>", -- short parameter description
@@ -1478,24 +1749,24 @@ Chatcommand definition (register_chatcommand)
Detached inventory callbacks
{
allow_move = func(inv, from_list, from_index, to_list, to_index, count, player),
allow_move = func(inv, from_list, from_index, to_list, to_index, count, player),
^ Called when a player wants to move items inside the inventory
^ Return value: number of items allowed to move
^ Return value: number of items allowed to move
allow_put = func(inv, listname, index, stack, player),
^ Called when a player wants to put something into the inventory
^ Return value: number of items allowed to put
^ Return value: -1: Allow and don't modify item count in inventory
^ Return value: number of items allowed to put
^ Return value: -1: Allow and don't modify item count in inventory
allow_take = func(inv, listname, index, stack, player),
^ Called when a player wants to take something out of the inventory
^ Return value: number of items allowed to take
^ Return value: -1: Allow and don't modify item count in inventory
on_move = func(inv, from_list, from_index, to_list, to_index, count, player),
^ Return value: number of items allowed to take
^ Return value: -1: Allow and don't modify item count in inventory
on_move = func(inv, from_list, from_index, to_list, to_index, count, player),
on_put = func(inv, listname, index, stack, player),
on_take = func(inv, listname, index, stack, player),
^ Called after the actual action has happened, according to what was allowed.
^ No return value
^ Called after the actual action has happened, according to what was allowed.
^ No return value
}

View File

@@ -41,7 +41,7 @@ Show allowed options
Set logfile path (debug.txt)
.TP
\-\-map\-dir <value>
Same as --world (deprecated)
Same as \-\-world (deprecated)
.TP
\-\-name <value>
Set player name

View File

@@ -35,7 +35,7 @@ Show allowed options
Set logfile path (debug.txt)
.TP
\-\-map\-dir <value>
Same as --world (deprecated)
Same as \-\-world (deprecated)
.TP
\-\-port <value>
Set network port (UDP) to use

View File

@@ -1,4 +1,4 @@
Minetest-c55 protocol (incomplete, early draft):
Minetest protocol (incomplete, early draft):
Updated 2011-06-18
A custom protocol over UDP.
@@ -70,3 +70,39 @@ function check_if_minetestserver_up($host, $port)
return false;
}
- Here's a Python script for checking if a minetest server is up, confirmed working
#!/usr/bin/env python
import sys, time, socket
address = ""
port = 30000
if len(sys.argv) <= 1:
print("Usage: %s <address>" % sys.argv[0])
exit()
if ':' in sys.argv[1]:
address = sys.argv[1].split(':')[0]
try:
port = int(sys.argv[1].split(':')[1])
except ValueError:
print("Please specify a valid port")
exit()
else:
address = sys.argv[1]
try:
start = time.time()
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.settimeout(2.0)
buf = "\x4f\x45\x74\x03\x00\x00\x00\x01"
sock.sendto(buf, (address, port))
data, addr = sock.recvfrom(1000)
if data:
peer_id = data[12:14]
buf = "\x4f\x45\x74\x03" + peer_id + "\x00\x00\x03"
sock.sendto(buf, (address, port))
sock.close()
end = time.time()
print("%s is up (%0.5fms)" % (sys.argv[1],end-start))
else:
print("%s seems to be down " % sys.argv[1])
except:
print("%s seems to be down " % sys.argv[1])

BIN
fonts/liberationmono.ttf Normal file

Binary file not shown.

BIN
fonts/liberationsans.ttf Normal file

Binary file not shown.

View File

@@ -659,6 +659,8 @@ function default.node_sound_dirt_defaults(table)
{name="", gain=0.5}
--table.dug = table.dug or
-- {name="default_dirt_break", gain=0.5}
table.place = table.place or
{name="default_grass_footstep", gain=0.5}
default.node_sound_defaults(table)
return table
end
@@ -769,7 +771,7 @@ minetest.register_node("default:sand", {
description = "Sand",
tiles ={"default_sand.png"},
is_ground_content = true,
groups = {crumbly=3},
groups = {crumbly=3, falling_node=1},
sounds = default.node_sound_sand_defaults(),
})
@@ -777,7 +779,7 @@ minetest.register_node("default:gravel", {
description = "Gravel",
tiles ={"default_gravel.png"},
is_ground_content = true,
groups = {crumbly=2},
groups = {crumbly=2, falling_node=1},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.45},
}),
@@ -837,7 +839,7 @@ minetest.register_node("default:junglegrass", {
wield_image = "default_junglegrass.png",
paramtype = "light",
walkable = false,
groups = {snappy=3},
groups = {snappy=3,attached_node=1},
sounds = default.node_sound_leaves_defaults(),
})
@@ -1106,7 +1108,7 @@ minetest.register_node("default:torch", {
wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1},
},
groups = {choppy=2,dig_immediate=3},
groups = {choppy=2,dig_immediate=3,attached_node=1},
legacy_wallmounted = true,
sounds = default.node_sound_defaults(),
})
@@ -1127,7 +1129,7 @@ minetest.register_node("default:sign_wall", {
--wall_bottom = <default>
--wall_side = <default>
},
groups = {choppy=2,dig_immediate=2},
groups = {choppy=2,dig_immediate=2,attached_node=1},
legacy_wallmounted = true,
sounds = default.node_sound_defaults(),
on_construct = function(pos)
@@ -1495,7 +1497,7 @@ minetest.register_node("default:sapling", {
wield_image = "default_sapling.png",
paramtype = "light",
walkable = false,
groups = {snappy=2,dig_immediate=3},
groups = {snappy=2,dig_immediate=3,attached_node=1},
sounds = default.node_sound_defaults(),
})
@@ -1586,73 +1588,115 @@ minetest.register_alias("mapgen_stone_with_coal", "default:stone_with_coal")
minetest.register_alias("mapgen_stone_with_iron", "default:stone_with_iron")
minetest.register_alias("mapgen_mese", "default:mese")
--
-- Some common functions
--
minetest.register_biome_groups({
0.35, 0.10, 0.30
})
default.falling_node_names = {}
--
-- Register the biomes for the map generator
--
minetest.register_biome({
group_id = 0,
name = "Ocean",
terrain_type = "liquid",
node_top = "default:gravel",
node_filler = "default:stone",
num_top_nodes = 4,
height_min = -3000,
height_max = 3000,
heat_min = -20.0,
heat_max = 100.0,
humidity_min = 0.0,
humidity_max = 100.0,
scale = 10.0,
offset = -10.0,
})
function nodeupdate_single(p)
n = minetest.env:get_node(p)
if default.falling_node_names[n.name] ~= nil then
p_bottom = {x=p.x, y=p.y-1, z=p.z}
n_bottom = minetest.env:get_node(p_bottom)
if n_bottom.name == "air" then
minetest.env:remove_node(p)
minetest.env:add_entity(p, "default:falling_"..n.name)
nodeupdate(p)
end
end
minetest.register_biome({
group_id = 1,
name = "Beach",
terrain_type = "normal",
node_top = "default:sand",
node_filler = "default:stone",
num_top_nodes = 5,
height_min = -3000,
height_max = 3000,
heat_min = 5.0,
heat_max = 100.0,
humidity_min = 0.0,
humidity_max = 100.0,
scale = 5.0,
offset = 5.0,
})
minetest.register_biome({
group_id = 1,
name = "Gravel Beach",
terrain_type = "normal",
node_top = "default:gravel",
node_filler = "default:cobble",
num_top_nodes = 5,
height_min = -3000,
height_max = 3000,
heat_min = -50.0,
heat_max = 5.0,
humidity_min = 0.0,
humidity_max = 100.0,
scale = 5.0,
offset = 5.0,
})
minetest.register_biome({
group_id = 2,
name = "Land",
terrain_type = "normal",
node_top = "default:dirt_with_grass",
node_filler = "default:stone",
num_top_nodes = 5,
height_min = -3000,
height_max = 3000,
heat_min = -50.0,
heat_max = 100.0,
humidity_min = 0.0,
humidity_max = 100.0,
scale = 12.0,
offset = 20.0,
})
minetest.register_biome({
group_id = 3,
name = "Hills",
terrain_type = "normal",
node_top = "default:dirt",
node_filler = "default:stone",
num_top_nodes = 3,
height_min = -3000,
height_max = 3000,
heat_min = -50.0,
heat_max = 100.0,
humidity_min = 0.0,
humidity_max = 100.0,
scale = 60.0,
offset = 20.0,
})
-- Support old code
function default.spawn_falling_node(p, nodename)
spawn_falling_node(p, nodename)
end
function nodeupdate(p)
for x = -1,1 do
for y = -1,1 do
for z = -1,1 do
p2 = {x=p.x+x, y=p.y+y, z=p.z+z}
nodeupdate_single(p2)
end
end
end
end
--
-- Falling stuff
--
-- Horrible crap to support old code
-- Don't use this and never do what this does, it's completely wrong!
-- (More specifically, the client and the C++ code doesn't get the group)
function default.register_falling_node(nodename, texture)
default.falling_node_names[nodename] = true
-- Override naming conventions for stuff like :default:falling_default:sand
minetest.register_entity(":default:falling_"..nodename, {
-- Static definition
physical = true,
collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
visual = "cube",
textures = {texture,texture,texture,texture,texture,texture},
-- State
-- Methods
on_step = function(self, dtime)
-- Set gravity
self.object:setacceleration({x=0, y=-10, z=0})
-- Turn to actual sand when collides to ground or just move
local pos = self.object:getpos()
local bcp = {x=pos.x, y=pos.y-0.7, z=pos.z} -- Position of bottom center point
local bcn = minetest.env:get_node(bcp)
if bcn.name ~= "air" then
-- Turn to a sand node
local np = {x=bcp.x, y=bcp.y+1, z=bcp.z}
minetest.env:add_node(np, {name=nodename})
self.object:remove()
else
-- Do nothing
end
end
})
minetest.log("error", debug.traceback())
minetest.log('error', "WARNING: default.register_falling_node is deprecated")
if minetest.registered_nodes[nodename] then
minetest.registered_nodes[nodename].groups.falling_node = 1
end
end
default.register_falling_node("default:sand", "default_sand.png")
default.register_falling_node("default:gravel", "default_gravel.png")
--
-- Global callbacks
--
@@ -1665,13 +1709,11 @@ minetest.register_globalstep(on_step)
function on_placenode(p, node)
--print("on_placenode")
nodeupdate(p)
end
minetest.register_on_placenode(on_placenode)
function on_dignode(p, node)
--print("on_dignode")
nodeupdate(p)
end
minetest.register_on_dignode(on_dignode)

View File

@@ -27,52 +27,74 @@ minetest.register_alias("mapgen_mese", "default:mese")
-- Ore generation
--
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, ore_per_chunk, height_min, height_max)
if maxp.y < height_min or minp.y > height_max then
return
end
local y_min = math.max(minp.y, height_min)
local y_max = math.min(maxp.y, height_max)
local volume = (maxp.x-minp.x+1)*(y_max-y_min+1)*(maxp.z-minp.z+1)
local pr = PseudoRandom(seed)
local num_chunks = math.floor(chunks_per_volume * volume)
local chunk_size = 3
if ore_per_chunk <= 4 then
chunk_size = 2
end
local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
--print("generate_ore num_chunks: "..dump(num_chunks))
for i=1,num_chunks do
local y0 = pr:next(y_min, y_max-chunk_size+1)
if y0 >= height_min and y0 <= height_max then
local x0 = pr:next(minp.x, maxp.x-chunk_size+1)
local z0 = pr:next(minp.z, maxp.z-chunk_size+1)
local p0 = {x=x0, y=y0, z=z0}
for x1=0,chunk_size-1 do
for y1=0,chunk_size-1 do
for z1=0,chunk_size-1 do
if pr:next(1,inverse_chance) == 1 then
local x2 = x0+x1
local y2 = y0+y1
local z2 = z0+z1
local p2 = {x=x2, y=y2, z=z2}
if minetest.env:get_node(p2).name == wherein then
minetest.env:set_node(p2, {name=name})
end
end
end
end
end
end
end
--print("generate_ore done")
end
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 8*8*8,
clust_num_ores = 5,
clust_size = 3,
height_min = -31000,
height_max = 64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 16*16*16,
clust_num_ores = 5,
clust_size = 3,
height_min = -5,
height_max = 7,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 12*12*12,
clust_num_ores = 5,
clust_size = 3,
height_min = -16,
height_max = -5,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 9*9*9,
clust_num_ores = 5,
clust_size = 3,
height_min = -31000,
height_max = -17,
})
-- for float islands and far scaled
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 8*8*8,
clust_num_ores = 5,
clust_size = 3,
height_min = 200,
height_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 9*9*9,
clust_num_ores = 5,
clust_size = 3,
height_min = 200,
height_max = 31000,
})
minetest.register_on_generated(function(minp, maxp, seed)
generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed, 1/8/8/8, 5, -31000, 64)
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+1, 1/16/16/16, 5, -5, 7)
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+2, 1/12/12/12, 5, -16, -5)
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+3, 1/9/9/9, 5, -31000, -17)
-- Generate clay
if maxp.y >= 2 and minp.y <= 0 then
-- Assume X and Z lengths are equal

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 231 B

View File

@@ -51,6 +51,10 @@
#keymap_screenshot = KEY_F12
# If true, keymap_special1 instead of keymap_sneak is used for climbing down and descending
#aux1_descends = false
# Doubletaping the jump key toogles fly mode
#doubletap_jump = false
# If false aux1 is used to fly fast
#always_fly_fast = true
# Some (temporary) keys for debugging
#keymap_print_debug_stacks = KEY_KEY_P
#keymap_quicktune_prev = KEY_HOME
@@ -76,6 +80,7 @@
# when set to higher number than 0
#fsaa = 0
#vsync = false
#fov = 72
# Address to connect to (#blank = start local server)
#address =
# Enable random user input, for testing
@@ -86,6 +91,16 @@
#enable_fog = true
# Enable a bit lower water surface; disable for speed (not quite optimized)
#new_style_water = false
# Constant volume liquids
#liquid_finite = false
# Update liquids every .. recommend for finite: 0.2
#liquid_update = 1.0
# When finite liquid: relax flowing blocks to source if level near max and N nearby source blocks, more realistic, but not true constant. values: 0,1,2,3,4 : 0 - disable, 1 - most aggresive
#liquid_relax = 2
# Optimization: faster cave flood (and not true constant)
#liquid_fast_flood = 1
# Underground water and lava springs, its infnity sources if liquid_finite enabled
#underground_springs = 1
# Enable nice leaves; disable for speed
#new_style_leaves = true
# Enable smooth lighting with simple ambient occlusion;
@@ -93,7 +108,7 @@
#smooth_lighting = true
# Enable combining mainly used textures to a bigger one for improved speed
# disable if it causes graphics glitches.
#enable_texture_atlas = true
#enable_texture_atlas = false
# Path to texture directory. All textures are first searched from here.
#texture_path =
# Video back-end.
@@ -113,24 +128,75 @@
#farmesh_distance = 40
# Enable/disable clouds
#enable_clouds = true
#cloud_height = 120
#enable_3d_clouds = true
# Use a cloud animation for the main menu background
#menu_clouds = true
# Path for screenshots
#screenshot_path = .
# Amount of view bobbing (0 = no view bobbing, 1.0 = normal, 2.0 = double)
#view_bobbing_amount = 1.0
# Anaglyph stereo
#anaglyph = false
#anaglyph_strength = 0.1
# In-game chat console background color (R,G,B)
#console_color = (0,0,0)
# In-game chat console background alpha (opaqueness, between 0 and 255)
#console_alpha = 200
# Selection box border color (R,G,B)
#selectionbox_color = (0,0,0)
# Crosshair color (R,G,B)
#crosshair_color = (255,255,255)
# Cross alpha (opaqueness, between 0 and 255)
#crosshair_alpha = 255
# Sound settings
#enable_sound = true
#sound_volume = 0.7
# Whether node texture animations should be desynchronized per MapBlock
#desynchronize_mapblock_texture_animation = true
# Texture filtering settings
#mip_map = false
#anisotropic_filter = false
#bilinear_filter = false
#trilinear_filter = false
# Set to true to pre-generate all item visuals
#preload_item_visuals = true
# 0: disable shaders
# (1: low level shaders; not implemented)
# 2: enable high level shaders
#enable_shaders = 2
# The time in seconds it takes between repeated
# right clicks when holding the right mouse button
#repeat_rightclick_time = 0.25
# will only work for servers which use remote_media setting
# and only for clients compiled with cURL
#media_fetch_threads = 8
# Url to the server list displayed in the Multiplayer Tab
#serverlist_url = servers.minetest.net
# File in client/serverlist/ that contains your favorite servers displayed in the Multiplayer Tab
#serverlist_file = favoriteservers.txt
#font_path = fonts/liberationsans.ttf
#font_size = 13
#mono_font_path = fonts/liberationmono.ttf
#mono_font_size = 13
#
# Server stuff
#
# Name of server
#server_name = Minetest server
# Description of server
#server_description = mine here
# Domain name of server
#server_address = game.minetest.net
# Homepage of server
#server_url = http://minetest.net
# Automaticaly report to masterserver
#server_announce = 0
# Default game (default when creating a new world)
#default_game = minetest
# World directory (everything in the world is stored here)
@@ -139,8 +205,8 @@
#motd = Welcome to this awesome Minetest server!
# Maximum number of players connected simultaneously
#max_users = 100
# Set to false to allow old clients to connect
#strict_protocol_version_checking = true
# Set to true to disallow old clients from connecting
#strict_protocol_version_checking = false
# Set to true to enable creative mode (unlimited inventory)
#creative_mode = false
# Enable players getting damage and dying
@@ -194,7 +260,96 @@
# To reduce lag, block transfers are slowed down when a player is building something.
# This determines how long they are slowed down after placing or removing a node.
#full_block_send_enable_min_time_from_building = 2.0
# Length of a server tick in dedicated server
#dedicated_server_step = 0.05
# Length of a server tick and the interval at which objects are generally updated over network
#dedicated_server_step = 0.1
# Can be set to true to disable shutting down on invalid world data
#ignore_world_load_errors = false
# Congestion control parameters
# time in seconds, rate in ~500B packets
#congestion_control_aim_rtt = 0.2
#congestion_control_max_rate = 400
#congestion_control_min_rate = 10
# Specifies URL from which client fetches media instead of using UDP
# $filename should be accessible from $remote_media$filename via cURL
# (obviously, remote_media should end with a slash)
# Files that are not present would be fetched the usual way
#remote_media =
# Level of logging to be written to debug.txt.
# 0 = none, 1 = errors and debug, 2 = action, 3 = info, 4 = verbose
#debug_log_level = 2
# Maximum number of blocks that can be queued for loading.
#emergequeue_limit_total = 256
# Maximum number of blocks to be queued that are to be loaded from file.
# Leave blank for an appropriate amount to be chosen automatically.
#emergequeue_limit_diskonly =
# Maximum number of blocks to be queued that are to be generated.
# Leave blank for an appropriate amount to be chosen automatically.
#emergequeue_limit_generate =
# Number of emerge threads to use. Make this field blank, or increase this number, to use multiple threads.
# On multiprocessor systems, this will improve mapgen speed greatly, at the cost of slightly buggy caves.
#num_emerge_threads = 1
#
# Physics stuff
#
#movement_acceleration_default = 3
#movement_acceleration_air = 2
#movement_acceleration_fast = 10
#movement_speed_walk = 4
#movement_speed_crouch = 1.35
#movement_speed_fast = 20
#movement_speed_climb = 2
#movement_speed_jump = 6.5
#movement_speed_descend = 6
#movement_liquid_fluidity = 1
#movement_liquid_fluidity_smooth = 0.5
#movement_liquid_sink = 10
#movement_gravity = 9.81
#
# Mapgen stuff
#
# Name of map generator to be used. Currently v6, indev and singlenode are supported.
#mg_name = v6
# Water level of map.
#water_level = 1
# Size of chunks to be generated.
#chunksize = 5
# Map generation attributes. Currently supported: trees, caves, flat, v6_biome_blend, v6_jungles, dungeons
#mg_flags = trees, caves, v6_biome_blend
# How large deserts and beaches are
#mgv6_freq_desert = 0.45
#mgv6_freq_beach = 0.15
# Perlin noise attributes for different map generation parameters
# Offset, scale, spread factor, seed offset, number of octaves, persistence
#mgv6_np_terrain_base = -4, 20, (250, 250, 250), 82341, 5, 0.6
#mgv6_np_terrain_higher = 20, 16, (500, 500, 500), 85039, 5, 0.6
#mgv6_np_steepness = 0.85, 0.5, (125, 125, 125), -932, 5, 0.7
#mgv6_np_height_select = 0.5, 1, (250, 250, 250), 4213, 5, 0.69
#mgv6_np_mud = 4, 2, (200, 200, 200), 91013, 3, 0.55
#mgv6_np_beach = 0, 1, (250, 250, 250), 59420, 3, 0.50
#mgv6_np_biome = 0, 1, (250, 250, 250), 9130, 3, 0.50
#mgv6_np_cave = 6, 6, (250, 250, 250), 34329, 3, 0.50
#mgv6_np_humidity = 0.5, 0.5, (500, 500, 500), 72384, 4, 0.66
#mgv6_np_trees = 0, 1, (125, 125, 125), 2, 4, 0.66
#mgv6_np_apple_trees = 0, 1, (100, 100, 100), 342902, 3, 0.45
#mgv7_np_terrain = 10, 12, (350, 350, 350), 82341, 5, 0.6
#mgv7_np_bgroup = 0.5, 0.3125, (350, 350, 350), 5923, 2, 0.6
#mgv7_np_heat = 25, 50, (500, 500, 500), 35293, 1, 0
#mgv7_np_humidity = 50, 31.25, (750, 750, 750), 12094, 2, 0.6
# Offset, scale, spread factor, seed offset, number of octaves, persistence, farscale, farspread
#mgindev_np_terrain_base = -4, 20, (250, 250, 250), 82341, 5, 0.6, 10, 10
#mgindev_np_terrain_higher = 20, 16, (500, 500, 500), 85039, 5, 0.6, 10, 10
#mgindev_np_steepness = 0.85, 0.5, (125, 125, 125), -932, 5, 0.7, 2, 10
#mgindev_np_mud = 4, 2, (200, 200, 200), 91013, 3, 0.55, 1, 1
#mgindev_np_float_islands1 = 0, 1, (64, 64, 64 ), 3683, 5, 0.5, 1, 1.5
#mgindev_np_float_islands2 = 0, 1, (8, 8, 8 ), 9292, 2, 0.5, 1, 1.5
#mgindev_np_float_islands3 = 0, 1, (256, 256, 256), 6412, 2, 0.5, 1, 0.5
#mgindev_np_biome = 0, 1, (250, 250, 250), 9130, 3, 0.50, 1, 10
# Float islands starts from height, 0 to disable
#mgindev_float_islands = 500

View File

@@ -1,4 +1,4 @@
Minetest-c55 changelog
Minetest changelog
----------------------
This should contain all the major changes.
For minor stuff, refer to the commit log of the repository.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

779
po/es/minetest.po Normal file
View File

@@ -0,0 +1,779 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
"PO-Revision-Date: 2013-04-03 17:22+0200\n"
"Last-Translator: Diego Martínez <lkaezadl3@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Weblate 1.4-dev\n"
#: src/guiConfigureWorld.cpp:125
msgid ""
"Warning: Some mods are not configured yet.\n"
"They will be enabled by default when you save the configuration. "
msgstr ""
"ADVERTENCIA: Algunos mods no están aún configurados.\n"
"Se habilitarán de forma predeterminada al guardar la configuración. "
#: src/guiConfigureWorld.cpp:144
msgid ""
"Warning: Some configured mods are missing.\n"
"Their setting will be removed when you save the configuration. "
msgstr ""
"ADVERTENCIA: Algunos mods configurados faltan.\n"
"Su ajuste se quitará al guardar la configuración. "
#: src/guiConfigureWorld.cpp:208
msgid "enabled"
msgstr "Activado"
#: src/guiConfigureWorld.cpp:215
msgid "Enable All"
msgstr "Activar todos"
#: src/guiConfigureWorld.cpp:222
msgid "Disable All"
msgstr "Desactivar todos"
#: src/guiConfigureWorld.cpp:228
msgid "depends on:"
msgstr "Dependencias:"
#: src/guiConfigureWorld.cpp:240
msgid "is required by:"
msgstr "es requerido por:"
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
msgid "Cancel"
msgstr "Cancelar"
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
msgid "Save"
msgstr "Guardar"
#: src/guiConfigureWorld.cpp:394
msgid "Configuration saved. "
msgstr "Configuración guardada. "
#: src/guiConfigureWorld.cpp:402
msgid "Warning: Configuration not consistent. "
msgstr "ADVERTENCIA: La configuración no corresponde. "
#: src/guiConfirmMenu.cpp:120
msgid "Yes"
msgstr "Sí"
#: src/guiConfirmMenu.cpp:126
msgid "No"
msgstr "No"
#: src/guiCreateWorld.cpp:116
msgid "World name"
msgstr "Nombre del mundo"
#: src/guiCreateWorld.cpp:135
msgid "Game"
msgstr "Juego"
#: src/guiCreateWorld.cpp:159
msgid "Create"
msgstr "Crear"
#: src/guiDeathScreen.cpp:96
msgid "You died."
msgstr "Has muerto."
#: src/guiDeathScreen.cpp:104
msgid "Respawn"
msgstr "Revivir"
#: src/guiFormSpecMenu.cpp:582
msgid "Left click: Move all items, Right click: Move single item"
msgstr ""
"Click izquierdo: Mover todos los objetos. Click derecho: Mover un objeto."
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
#: src/guiTextInputMenu.cpp:131
msgid "Proceed"
msgstr "Continuar"
#: src/guiKeyChangeMenu.cpp:114
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
msgstr ""
"Combinaciones de teclas.(Si este menú da error, cambiar configuración en "
"minetest.conf)"
#: src/guiKeyChangeMenu.cpp:151
msgid "\"Use\" = climb down"
msgstr "\"Usar\" = Descender"
#: src/guiKeyChangeMenu.cpp:164
msgid "Double tap \"jump\" to toggle fly"
msgstr "Dos veces \"saltar\" para volar"
#: src/guiKeyChangeMenu.cpp:269
msgid "Key already in use"
msgstr "La tecla se está utilizando"
#: src/guiKeyChangeMenu.cpp:347
msgid "press key"
msgstr "Pulsa una tecla"
#: src/guiKeyChangeMenu.cpp:372
msgid "Forward"
msgstr "Adelante"
#: src/guiKeyChangeMenu.cpp:373
msgid "Backward"
msgstr "Atrás"
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
msgid "Left"
msgstr "Izquierda"
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
msgid "Right"
msgstr "Derecha"
#: src/guiKeyChangeMenu.cpp:376
msgid "Use"
msgstr "Usar"
#: src/guiKeyChangeMenu.cpp:377
msgid "Jump"
msgstr "Saltar"
#: src/guiKeyChangeMenu.cpp:378
msgid "Sneak"
msgstr "Caminar"
#: src/guiKeyChangeMenu.cpp:379
msgid "Drop"
msgstr "Tirar"
#: src/guiKeyChangeMenu.cpp:380
msgid "Inventory"
msgstr "Inventario"
#: src/guiKeyChangeMenu.cpp:381
msgid "Chat"
msgstr "Chat"
#: src/guiKeyChangeMenu.cpp:382
msgid "Command"
msgstr "Comando"
#: src/guiKeyChangeMenu.cpp:383
msgid "Console"
msgstr "Consola"
#: src/guiKeyChangeMenu.cpp:384
msgid "Toggle fly"
msgstr "Activar Volar"
#: src/guiKeyChangeMenu.cpp:385
msgid "Toggle fast"
msgstr "Activar Modo Rápido"
#: src/guiKeyChangeMenu.cpp:386
msgid "Toggle noclip"
msgstr "Activar noclip"
#: src/guiKeyChangeMenu.cpp:387
msgid "Range select"
msgstr "Seleccionar distancia"
#: src/guiKeyChangeMenu.cpp:388
msgid "Print stacks"
msgstr "Imprimir Pilas"
#: src/guiMainMenu.cpp:92
msgid "Cannot create world: Name contains invalid characters"
msgstr "No se puede crear el mundo: El nombre contiene caracteres no válidos"
#: src/guiMainMenu.cpp:101
msgid "Cannot create world: A world by this name already exists"
msgstr "No se puede crear el mundo: Hay un mundo con este nombre"
#: src/guiMainMenu.cpp:283
msgid "Singleplayer"
msgstr "Un jugador"
#: src/guiMainMenu.cpp:284
msgid "Multiplayer"
msgstr "Multijugador"
#: src/guiMainMenu.cpp:285
msgid "Advanced"
msgstr "Avanzado"
#: src/guiMainMenu.cpp:286
msgid "Settings"
msgstr "Configuración"
#: src/guiMainMenu.cpp:287
msgid "Credits"
msgstr "Créditos"
#: src/guiMainMenu.cpp:317
msgid "Select World:"
msgstr "Selecciona un mundo:"
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
msgid "Delete"
msgstr "Borrar"
#: src/guiMainMenu.cpp:346
msgid "New"
msgstr "Nuevo"
#: src/guiMainMenu.cpp:354
msgid "Configure"
msgstr "Configurar"
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
msgid "Play"
msgstr "Jugar"
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
msgid "Creative Mode"
msgstr "Modo creativo"
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
msgid "Enable Damage"
msgstr "Permitir daños"
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
msgid "Name/Password"
msgstr "Nombre/Clave"
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
msgid "Favorites:"
msgstr "Favoritos:"
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
msgid "Public Server List:"
msgstr "Lista de Servidores Públicos:"
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
msgid "Address/Port"
msgstr "Dirección/Puerto"
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
msgid "Show Public"
msgstr "Servidores Públicos"
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
msgid "Show Favorites"
msgstr "Mostrar Favoritos"
#: src/guiMainMenu.cpp:521
msgid "Connect"
msgstr "Conectar"
#: src/guiMainMenu.cpp:591
msgid "Leave address blank to start a local server."
msgstr "Dejar la dirección en blanco para iniciar un servidor local."
#: src/guiMainMenu.cpp:600
msgid "Start Game / Connect"
msgstr "Iniciar juego/Conectar"
#: src/guiMainMenu.cpp:632
msgid "Public"
msgstr "Público"
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
msgid "Delete world"
msgstr "Eliminar Mundo"
#: src/guiMainMenu.cpp:647
msgid "Create world"
msgstr "Crear Mundo"
#: src/guiMainMenu.cpp:681
msgid "Fancy trees"
msgstr "Árboles detallados"
#: src/guiMainMenu.cpp:687
msgid "Smooth Lighting"
msgstr "Iluminación Suave"
#: src/guiMainMenu.cpp:693
msgid "3D Clouds"
msgstr "Nubes 3D"
#: src/guiMainMenu.cpp:699
msgid "Opaque water"
msgstr "Agua Opaca"
#: src/guiMainMenu.cpp:709
msgid "Mip-Mapping"
msgstr "Mip-Mapping"
#: src/guiMainMenu.cpp:716
msgid "Anisotropic Filtering"
msgstr "Filtrado Anisotrópico"
#: src/guiMainMenu.cpp:723
msgid "Bi-Linear Filtering"
msgstr "Filtrado Bi-Lineal"
#: src/guiMainMenu.cpp:730
msgid "Tri-Linear Filtering"
msgstr "Filtrado Tri-Lineal"
#: src/guiMainMenu.cpp:738
msgid "Shaders"
msgstr "Sombreadores"
#: src/guiMainMenu.cpp:745
msgid "Preload item visuals"
msgstr "Precarga elementos visuales"
#: src/guiMainMenu.cpp:752
msgid "Enable Particles"
msgstr "Habilitar partículas"
#: src/guiMainMenu.cpp:759
msgid "Finite liquid"
msgstr "Líquidos Finitos"
#: src/guiMainMenu.cpp:769
msgid "Change keys"
msgstr "Configurar Teclas"
#: src/guiMainMenu.cpp:1084
msgid "Address required."
msgstr "Requiere una dirección."
#: src/guiMainMenu.cpp:1102
msgid "Cannot delete world: Nothing selected"
msgstr "No se puede eliminar el mundo: ninguno ha sido seleccionado"
#: src/guiMainMenu.cpp:1117
msgid "Files to be deleted"
msgstr "Archivos que se eliminarán"
#: src/guiMainMenu.cpp:1133
msgid "Cannot create world: No games found"
msgstr "No se puede crear el mundo: No se encontraron juegos"
#: src/guiMainMenu.cpp:1149
msgid "Cannot configure world: Nothing selected"
msgstr "No se puede configurar el mundo: Ninguno seleccionado"
#: src/guiMainMenu.cpp:1256
msgid "Failed to delete all world files"
msgstr "No se pudo eliminar todos los archivos del mundo"
#: src/guiPasswordChange.cpp:108
msgid "Old Password"
msgstr "Contraseña anterior"
#: src/guiPasswordChange.cpp:125
msgid "New Password"
msgstr "Nueva contraseña"
#: src/guiPasswordChange.cpp:141
msgid "Confirm Password"
msgstr "Confirmar contraseña"
#: src/guiPasswordChange.cpp:158
msgid "Change"
msgstr "Cambiar"
#: src/guiPasswordChange.cpp:167
msgid "Passwords do not match!"
msgstr "¡Las contraseñas no coinciden!"
#: src/guiPauseMenu.cpp:123
msgid "Continue"
msgstr "Continuar"
#: src/guiPauseMenu.cpp:132
msgid "Change Password"
msgstr "Modificar contraseña"
#: src/guiPauseMenu.cpp:140
msgid "Sound Volume"
msgstr "Volúmen del Sonido"
#: src/guiPauseMenu.cpp:147
msgid "Exit to Menu"
msgstr "Salir al menú"
#: src/guiPauseMenu.cpp:154
msgid "Exit to OS"
msgstr "Salir al S.O."
#: src/guiPauseMenu.cpp:161
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""
"Controles predeterminados:\n"
"- WASD: Caminar \n"
"- Ratón, izquierdo: Cavar/Golpear\n"
"- Ratón, derecho: Poner bloque/Usar\n"
"- Ratón, rueda: seleccionar objecto\n"
"- 0... 9: Seleccionar objecto\n"
"- Mayúscula: caminar despacio\n"
"- R: Ajustar distancia de los pedazos cargados\n"
"- I: Inventario \n"
"- ESC: Este Menu\n"
"- T: Conversar\n"
#: src/guiVolumeChange.cpp:108
msgid "Sound Volume: "
msgstr "Volúmen del Sonido: "
#: src/guiVolumeChange.cpp:121
msgid "Exit"
msgstr "Salir"
#: src/keycode.cpp:223
msgid "Left Button"
msgstr "Click Izquierdo"
#: src/keycode.cpp:223
msgid "Middle Button"
msgstr "Click Centro"
#: src/keycode.cpp:223
msgid "Right Button"
msgstr "Click Derecho"
#: src/keycode.cpp:223
msgid "X Button 1"
msgstr "X Button 1"
#: src/keycode.cpp:224
msgid "Back"
msgstr "Atras"
#: src/keycode.cpp:224
msgid "Clear"
msgstr "Limpiar"
#: src/keycode.cpp:224
msgid "Return"
msgstr "Intro"
#: src/keycode.cpp:224
msgid "Tab"
msgstr "Tabulador"
#: src/keycode.cpp:224
msgid "X Button 2"
msgstr "X Button 2"
#: src/keycode.cpp:225
msgid "Capital"
msgstr "Bloq mayús"
#: src/keycode.cpp:225
msgid "Control"
msgstr "Control"
#: src/keycode.cpp:225
msgid "Kana"
msgstr "Kana"
#: src/keycode.cpp:225
msgid "Menu"
msgstr "Menú"
#: src/keycode.cpp:225
msgid "Pause"
msgstr "Pausa"
#: src/keycode.cpp:225
msgid "Shift"
msgstr "Mayús"
#: src/keycode.cpp:226
msgid "Convert"
msgstr "Convertir"
#: src/keycode.cpp:226
msgid "Escape"
msgstr "Escape"
#: src/keycode.cpp:226
msgid "Final"
msgstr "Final"
#: src/keycode.cpp:226
msgid "Junja"
msgstr "Junja"
#: src/keycode.cpp:226
msgid "Kanji"
msgstr "Kanji"
#: src/keycode.cpp:226
msgid "Nonconvert"
msgstr "No convertir"
#: src/keycode.cpp:227
msgid "Accept"
msgstr "Aceptar"
#: src/keycode.cpp:227
msgid "End"
msgstr "Fin"
#: src/keycode.cpp:227
msgid "Home"
msgstr "Inicio"
#: src/keycode.cpp:227
msgid "Mode Change"
msgstr "Cambio de modo"
#: src/keycode.cpp:227
msgid "Next"
msgstr "Siguiente"
#: src/keycode.cpp:227
msgid "Prior"
msgstr "Anterior"
#: src/keycode.cpp:227
msgid "Space"
msgstr "Espacio"
#: src/keycode.cpp:228
msgid "Down"
msgstr "Abajo"
#: src/keycode.cpp:228
msgid "Execute"
msgstr "Ejecutar"
#: src/keycode.cpp:228
msgid "Print"
msgstr "Captura"
#: src/keycode.cpp:228
msgid "Select"
msgstr "Seleccionar"
#: src/keycode.cpp:228
msgid "Up"
msgstr "Arriba"
#: src/keycode.cpp:229
msgid "Help"
msgstr "Ayuda"
#: src/keycode.cpp:229
msgid "Insert"
msgstr "Introducir"
#: src/keycode.cpp:229
msgid "Snapshot"
msgstr "Captura de pantalla"
#: src/keycode.cpp:232
msgid "Left Windows"
msgstr "Win Izquierdo"
#: src/keycode.cpp:233
msgid "Apps"
msgstr "Aplicaciones"
#: src/keycode.cpp:233
msgid "Numpad 0"
msgstr "Teclado numérico 0"
#: src/keycode.cpp:233
msgid "Numpad 1"
msgstr "Teclado Numérico 1"
#: src/keycode.cpp:233
msgid "Right Windows"
msgstr "Win Derecho"
#: src/keycode.cpp:233
msgid "Sleep"
msgstr "Suspender"
#: src/keycode.cpp:234
msgid "Numpad 2"
msgstr "Teclado numérico 2"
#: src/keycode.cpp:234
msgid "Numpad 3"
msgstr "Teclado Numérico 3"
#: src/keycode.cpp:234
msgid "Numpad 4"
msgstr "Teclado numérico 4"
#: src/keycode.cpp:234
msgid "Numpad 5"
msgstr "Teclado Numérico 5"
#: src/keycode.cpp:234
msgid "Numpad 6"
msgstr "Teclado Numérico 6"
#: src/keycode.cpp:234
msgid "Numpad 7"
msgstr "Teclado numérico 7"
#: src/keycode.cpp:235
msgid "Numpad *"
msgstr "Teclado numérico *"
#: src/keycode.cpp:235
msgid "Numpad +"
msgstr "Teclado Numérico +"
#: src/keycode.cpp:235
msgid "Numpad -"
msgstr "Teclado Numérico -"
#: src/keycode.cpp:235
msgid "Numpad /"
msgstr "Teclado Numérico /"
#: src/keycode.cpp:235
msgid "Numpad 8"
msgstr "Teclado Numérico 8"
#: src/keycode.cpp:235
msgid "Numpad 9"
msgstr "Teclado Numérico 9"
#: src/keycode.cpp:239
msgid "Num Lock"
msgstr "Bloq Núm"
#: src/keycode.cpp:239
msgid "Scroll Lock"
msgstr "Bloq Despl"
#: src/keycode.cpp:240
msgid "Left Shift"
msgstr "Mayús Izqda"
#: src/keycode.cpp:240
msgid "Right Shift"
msgstr "Mayús Dcha"
#: src/keycode.cpp:241
msgid "Left Control"
msgstr "Control Izqdo"
#: src/keycode.cpp:241
msgid "Left Menu"
msgstr "Menú Izquierdo"
#: src/keycode.cpp:241
msgid "Right Control"
msgstr "Control Dcho"
#: src/keycode.cpp:241
msgid "Right Menu"
msgstr "Menú Derecho"
#: src/keycode.cpp:243
msgid "Comma"
msgstr "Coma"
#: src/keycode.cpp:243
msgid "Minus"
msgstr "Menos"
#: src/keycode.cpp:243
msgid "Period"
msgstr "Punto"
#: src/keycode.cpp:243
msgid "Plus"
msgstr "Más"
#: src/keycode.cpp:247
msgid "Attn"
msgstr "Attn"
#: src/keycode.cpp:247
msgid "CrSel"
msgstr "CrSel"
#: src/keycode.cpp:248
msgid "Erase OEF"
msgstr "Borrar OEF"
#: src/keycode.cpp:248
msgid "ExSel"
msgstr "ExSel"
#: src/keycode.cpp:248
msgid "OEM Clear"
msgstr "OEM Limpiar"
#: src/keycode.cpp:248
msgid "PA1"
msgstr "PA1"
#: src/keycode.cpp:248
msgid "Zoom"
msgstr "Zoom"
#: src/main.cpp:1506
msgid "Main Menu"
msgstr "Menú Principal"
#: src/main.cpp:1830
msgid "Failed to initialize world"
msgstr "Fallo al iniciar el mundo"
#: src/main.cpp:1842
msgid "No world selected and no address provided. Nothing to do."
msgstr ""
"No se seleccionó mundo y no se ha especificado una dirección. Nada que hacer."
#: src/main.cpp:1850
msgid "Could not find or load game \""
msgstr "No se puede encontrar o cargar el juego \""
#: src/main.cpp:1864
msgid "Invalid gamespec."
msgstr "Juego especificado no válido."
#: src/main.cpp:1904
msgid "Connection error (timed out?)"
msgstr "Error de conexión (¿tiempo agotado?)"
#: src/main.cpp:1915
msgid ""
"\n"
"Check debug.txt for details."
msgstr ""
"\n"
"Consulta debug.txt para obtener más detalles."

778
po/et/minetest.po Normal file
View File

@@ -0,0 +1,778 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
"PO-Revision-Date: 2013-04-03 17:02+0200\n"
"Last-Translator: Pilz Adam <PilzAdam@gmx.de>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: et\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Weblate 1.4-dev\n"
#: src/guiConfigureWorld.cpp:125
msgid ""
"Warning: Some mods are not configured yet.\n"
"They will be enabled by default when you save the configuration. "
msgstr ""
"Hoiatus: Mõned modifikatsioonid pole sätitud veel.\n"
"Need lülitatakse sisse kohe pärast sätete salvestamist."
#: src/guiConfigureWorld.cpp:144
msgid ""
"Warning: Some configured mods are missing.\n"
"Their setting will be removed when you save the configuration. "
msgstr ""
"Hoiatus: Mõned konfigureeritud modifikatsioonid on kaotsi läinud.\n"
"Nende sätted kustutatakse kui salvestada konfiguratsioon."
#: src/guiConfigureWorld.cpp:208
msgid "enabled"
msgstr "Sisse lülitatud"
#: src/guiConfigureWorld.cpp:215
msgid "Enable All"
msgstr "Lülita kõik sisse"
#: src/guiConfigureWorld.cpp:222
msgid "Disable All"
msgstr "Lülita kõik välja"
#: src/guiConfigureWorld.cpp:228
msgid "depends on:"
msgstr "Vajab:"
#: src/guiConfigureWorld.cpp:240
msgid "is required by:"
msgstr "Seda vajavad:"
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
msgid "Cancel"
msgstr "Tühista"
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
msgid "Save"
msgstr "Salvesta"
#: src/guiConfigureWorld.cpp:394
msgid "Configuration saved. "
msgstr "Konfiguratsioon salvestatud. "
#: src/guiConfigureWorld.cpp:402
msgid "Warning: Configuration not consistent. "
msgstr "Hoiatus: Konfiguratsioon pole kindel."
#: src/guiConfirmMenu.cpp:120
msgid "Yes"
msgstr "Jah"
#: src/guiConfirmMenu.cpp:126
msgid "No"
msgstr "Ei"
#: src/guiCreateWorld.cpp:116
msgid "World name"
msgstr "Maailma nimi"
#: src/guiCreateWorld.cpp:135
msgid "Game"
msgstr "Mäng"
#: src/guiCreateWorld.cpp:159
msgid "Create"
msgstr "Loo"
#: src/guiDeathScreen.cpp:96
msgid "You died."
msgstr "Sa surid."
#: src/guiDeathScreen.cpp:104
msgid "Respawn"
msgstr "Ärka ellu"
#: src/guiFormSpecMenu.cpp:582
msgid "Left click: Move all items, Right click: Move single item"
msgstr ""
"Vasak hiireklõps: Liiguta kõiki asju, Parem hiireklõps: Liiguta üksikut asja"
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
#: src/guiTextInputMenu.cpp:131
msgid "Proceed"
msgstr "Jätka"
#: src/guiKeyChangeMenu.cpp:114
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
msgstr ""
"Nupusätted. (Kui see menüü sassi läheb, siis kustuta asju failist minetest."
"conf)"
#: src/guiKeyChangeMenu.cpp:151
msgid "\"Use\" = climb down"
msgstr "\"Tegevus\" = Roni alla"
#: src/guiKeyChangeMenu.cpp:164
msgid "Double tap \"jump\" to toggle fly"
msgstr "Topeltklõpsa \"Hüppamist\" et sisse lülitada lendamine"
#: src/guiKeyChangeMenu.cpp:269
msgid "Key already in use"
msgstr "Nupp juba kasutuses"
#: src/guiKeyChangeMenu.cpp:347
msgid "press key"
msgstr "Vajuta nuppu"
#: src/guiKeyChangeMenu.cpp:372
msgid "Forward"
msgstr "Edasi"
#: src/guiKeyChangeMenu.cpp:373
msgid "Backward"
msgstr "Tagasi"
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
msgid "Left"
msgstr "Vasakule"
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
msgid "Right"
msgstr "Paremale"
#: src/guiKeyChangeMenu.cpp:376
msgid "Use"
msgstr "Tegevus"
#: src/guiKeyChangeMenu.cpp:377
msgid "Jump"
msgstr "Hüppamine"
#: src/guiKeyChangeMenu.cpp:378
msgid "Sneak"
msgstr "Hiilimine"
#: src/guiKeyChangeMenu.cpp:379
msgid "Drop"
msgstr "Viska maha"
#: src/guiKeyChangeMenu.cpp:380
msgid "Inventory"
msgstr "Seljakott"
#: src/guiKeyChangeMenu.cpp:381
msgid "Chat"
msgstr "Jututuba"
#: src/guiKeyChangeMenu.cpp:382
msgid "Command"
msgstr "Käsklus"
#: src/guiKeyChangeMenu.cpp:383
msgid "Console"
msgstr "Konsool"
#: src/guiKeyChangeMenu.cpp:384
msgid "Toggle fly"
msgstr "Lülita lendamine sisse"
#: src/guiKeyChangeMenu.cpp:385
msgid "Toggle fast"
msgstr "Lülita kiirus sisse"
#: src/guiKeyChangeMenu.cpp:386
msgid "Toggle noclip"
msgstr "Lülita läbi seinte minek sisse"
#: src/guiKeyChangeMenu.cpp:387
msgid "Range select"
msgstr "Kauguse valik"
#: src/guiKeyChangeMenu.cpp:388
msgid "Print stacks"
msgstr "Prindi kogused"
#: src/guiMainMenu.cpp:92
msgid "Cannot create world: Name contains invalid characters"
msgstr "Maailma loomine ebaõnnestus: Nimes esineb keelatud tähti"
#: src/guiMainMenu.cpp:101
msgid "Cannot create world: A world by this name already exists"
msgstr "Maailma loomine ebaõnnestus: Samanimeline maailm on juba olemas"
#: src/guiMainMenu.cpp:283
msgid "Singleplayer"
msgstr "Üksikmäng"
#: src/guiMainMenu.cpp:284
msgid "Multiplayer"
msgstr "Mitmikmäng"
#: src/guiMainMenu.cpp:285
msgid "Advanced"
msgstr "Arenenud sätted"
#: src/guiMainMenu.cpp:286
msgid "Settings"
msgstr "Sätted"
#: src/guiMainMenu.cpp:287
msgid "Credits"
msgstr "Tänuavaldused"
#: src/guiMainMenu.cpp:317
msgid "Select World:"
msgstr "Vali maailm:"
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
msgid "Delete"
msgstr "Kustuta"
#: src/guiMainMenu.cpp:346
msgid "New"
msgstr "Uus"
#: src/guiMainMenu.cpp:354
msgid "Configure"
msgstr "Konfigureeri"
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
msgid "Play"
msgstr "Mängi"
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
msgid "Creative Mode"
msgstr "Kujunduslik mängumood"
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
msgid "Enable Damage"
msgstr "Lülita valu sisse"
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
msgid "Name/Password"
msgstr "Nimi/Parool"
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
msgid "Favorites:"
msgstr "Lemmikud:"
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
msgid "Public Server List:"
msgstr "Avatud serverite nimekiri:"
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
msgid "Address/Port"
msgstr "IP/Port"
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
msgid "Show Public"
msgstr "Näita avalikke"
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
msgid "Show Favorites"
msgstr "Näita lemmikuid"
#: src/guiMainMenu.cpp:521
msgid "Connect"
msgstr "Liitu"
#: src/guiMainMenu.cpp:591
msgid "Leave address blank to start a local server."
msgstr "Jäta IP lahter tühjaks et alustada LAN serverit."
#: src/guiMainMenu.cpp:600
msgid "Start Game / Connect"
msgstr "Alusta mängu / Liitu"
#: src/guiMainMenu.cpp:632
msgid "Public"
msgstr "Avalik"
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
msgid "Delete world"
msgstr "Kustuta maailm"
#: src/guiMainMenu.cpp:647
msgid "Create world"
msgstr "Loo maailm"
#: src/guiMainMenu.cpp:681
msgid "Fancy trees"
msgstr "Uhked puud"
#: src/guiMainMenu.cpp:687
msgid "Smooth Lighting"
msgstr "Ilus valgustus"
#: src/guiMainMenu.cpp:693
msgid "3D Clouds"
msgstr "3D pilved"
#: src/guiMainMenu.cpp:699
msgid "Opaque water"
msgstr "Läbipaistmatu vesi"
#: src/guiMainMenu.cpp:709
msgid "Mip-Mapping"
msgstr "Väga hea kvaliteet"
#: src/guiMainMenu.cpp:716
msgid "Anisotropic Filtering"
msgstr "Anisotroopne Filtreerimine"
#: src/guiMainMenu.cpp:723
msgid "Bi-Linear Filtering"
msgstr "Bi-lineaarsed Filtreerimine"
#: src/guiMainMenu.cpp:730
msgid "Tri-Linear Filtering"
msgstr "Tri-Linear Filtreerimine"
#: src/guiMainMenu.cpp:738
msgid "Shaders"
msgstr "Varjutajad"
#: src/guiMainMenu.cpp:745
msgid "Preload item visuals"
msgstr "Lae asjade visuaale"
#: src/guiMainMenu.cpp:752
msgid "Enable Particles"
msgstr "Lülita osakesed sisse"
#: src/guiMainMenu.cpp:759
msgid "Finite liquid"
msgstr "Löppev vedelik"
#: src/guiMainMenu.cpp:769
msgid "Change keys"
msgstr "Vaheta nuppe"
#: src/guiMainMenu.cpp:1084
msgid "Address required."
msgstr "IP on vajalkik."
#: src/guiMainMenu.cpp:1102
msgid "Cannot delete world: Nothing selected"
msgstr "Maailma kustutamine ebaõnnestus: Maailma pole valitud"
#: src/guiMainMenu.cpp:1117
msgid "Files to be deleted"
msgstr "Failid mida kustutada"
#: src/guiMainMenu.cpp:1133
msgid "Cannot create world: No games found"
msgstr "Maailma loomine ebaõnnestus: Mängu ei leitud"
#: src/guiMainMenu.cpp:1149
msgid "Cannot configure world: Nothing selected"
msgstr "Maailma konfigureerimine ebaõnnestus: Pole midagi valitud"
#: src/guiMainMenu.cpp:1256
msgid "Failed to delete all world files"
msgstr "Kõigi maailma failide kustutamine ebaõnnestus"
#: src/guiPasswordChange.cpp:108
msgid "Old Password"
msgstr "Vana parool"
#: src/guiPasswordChange.cpp:125
msgid "New Password"
msgstr "Uus parool"
#: src/guiPasswordChange.cpp:141
msgid "Confirm Password"
msgstr "Kinnita parooli"
#: src/guiPasswordChange.cpp:158
msgid "Change"
msgstr "Muuda"
#: src/guiPasswordChange.cpp:167
msgid "Passwords do not match!"
msgstr "Paroolid ei ole samad!"
#: src/guiPauseMenu.cpp:123
msgid "Continue"
msgstr "Jätka"
#: src/guiPauseMenu.cpp:132
msgid "Change Password"
msgstr "Vaheta parooli"
#: src/guiPauseMenu.cpp:140
msgid "Sound Volume"
msgstr "Hääle volüüm"
#: src/guiPauseMenu.cpp:147
msgid "Exit to Menu"
msgstr "Välju menüüsse"
#: src/guiPauseMenu.cpp:154
msgid "Exit to OS"
msgstr "Välju mängust"
#: src/guiPauseMenu.cpp:161
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""
"Algsed nupusätted:\n"
"- WASD: Kõnni\n"
"- Vasak hiireklõps: Kaeva/löö\n"
"- Parem hiireklõps: Aseta/kasuta\n"
"- Hiireratas: Vali asi\n"
"- 0...9: Vali asi\n"
"- Shift: Hiili\n"
"- R: Vaheta nägemiskaugust\n"
"- I: Seljakott\n"
"- ESC: Menüü\n"
"- T: Jututupa\n"
#: src/guiVolumeChange.cpp:108
msgid "Sound Volume: "
msgstr "Hääle Volüüm: "
#: src/guiVolumeChange.cpp:121
msgid "Exit"
msgstr "Välju"
#: src/keycode.cpp:223
msgid "Left Button"
msgstr "Vasak nupp"
#: src/keycode.cpp:223
msgid "Middle Button"
msgstr "Keskmine nupp"
#: src/keycode.cpp:223
msgid "Right Button"
msgstr "Parem nupp"
#: src/keycode.cpp:223
msgid "X Button 1"
msgstr "X Nuppp 1"
#: src/keycode.cpp:224
msgid "Back"
msgstr "Tagasi"
#: src/keycode.cpp:224
msgid "Clear"
msgstr "Tühjenda"
#: src/keycode.cpp:224
msgid "Return"
msgstr "Enter"
#: src/keycode.cpp:224
msgid "Tab"
msgstr "Reavahetus"
#: src/keycode.cpp:224
msgid "X Button 2"
msgstr "X Nupp 2"
#: src/keycode.cpp:225
msgid "Capital"
msgstr "Caps Lock"
#: src/keycode.cpp:225
msgid "Control"
msgstr "CTRL"
#: src/keycode.cpp:225
msgid "Kana"
msgstr "Kana"
#: src/keycode.cpp:225
msgid "Menu"
msgstr "Menüü"
#: src/keycode.cpp:225
msgid "Pause"
msgstr "Paus"
#: src/keycode.cpp:225
msgid "Shift"
msgstr "Shift,"
#: src/keycode.cpp:226
msgid "Convert"
msgstr "Konverteeri"
#: src/keycode.cpp:226
msgid "Escape"
msgstr "Põgene"
#: src/keycode.cpp:226
msgid "Final"
msgstr "Viimane"
#: src/keycode.cpp:226
msgid "Junja"
msgstr "Junja"
#: src/keycode.cpp:226
msgid "Kanji"
msgstr "Kanji"
#: src/keycode.cpp:226
msgid "Nonconvert"
msgstr "Konverteerimatta"
#: src/keycode.cpp:227
msgid "Accept"
msgstr "Nõustu"
#: src/keycode.cpp:227
msgid "End"
msgstr "Lõpeta"
#: src/keycode.cpp:227
msgid "Home"
msgstr "Kodu"
#: src/keycode.cpp:227
msgid "Mode Change"
msgstr "Moodi vahetamine"
#: src/keycode.cpp:227
msgid "Next"
msgstr "Järgmine"
#: src/keycode.cpp:227
msgid "Prior"
msgstr "Eelnev"
#: src/keycode.cpp:227
msgid "Space"
msgstr "Tühik"
#: src/keycode.cpp:228
msgid "Down"
msgstr "Alla"
#: src/keycode.cpp:228
msgid "Execute"
msgstr "Soorita"
#: src/keycode.cpp:228
msgid "Print"
msgstr "Prindi"
#: src/keycode.cpp:228
msgid "Select"
msgstr "Vali"
#: src/keycode.cpp:228
msgid "Up"
msgstr "Üles"
#: src/keycode.cpp:229
msgid "Help"
msgstr "Abi"
#: src/keycode.cpp:229
msgid "Insert"
msgstr "Sisesta"
#: src/keycode.cpp:229
msgid "Snapshot"
msgstr "Mängupilt"
#: src/keycode.cpp:232
msgid "Left Windows"
msgstr "Vasak Windowsi nupp"
#: src/keycode.cpp:233
msgid "Apps"
msgstr "Aplikatsioonid"
#: src/keycode.cpp:233
msgid "Numpad 0"
msgstr "Numbrilaual 0"
#: src/keycode.cpp:233
msgid "Numpad 1"
msgstr "Numbrilaual 1"
#: src/keycode.cpp:233
msgid "Right Windows"
msgstr "Parem Windowsi nupp"
#: src/keycode.cpp:233
msgid "Sleep"
msgstr "Maga"
#: src/keycode.cpp:234
msgid "Numpad 2"
msgstr "Numbrilaual 2"
#: src/keycode.cpp:234
msgid "Numpad 3"
msgstr "Numbrilaual 3"
#: src/keycode.cpp:234
msgid "Numpad 4"
msgstr "Numbrilaual 4"
#: src/keycode.cpp:234
msgid "Numpad 5"
msgstr "Numbrilaual 5"
#: src/keycode.cpp:234
msgid "Numpad 6"
msgstr "Numbrilaual 6"
#: src/keycode.cpp:234
msgid "Numpad 7"
msgstr "Numbrilaual 7"
#: src/keycode.cpp:235
msgid "Numpad *"
msgstr "Numbrilaual *"
#: src/keycode.cpp:235
msgid "Numpad +"
msgstr "Numbrilaual +"
#: src/keycode.cpp:235
msgid "Numpad -"
msgstr "Numbrilaual -"
#: src/keycode.cpp:235
msgid "Numpad /"
msgstr "Numbrilaual /"
#: src/keycode.cpp:235
msgid "Numpad 8"
msgstr "Numbrilaual 8"
#: src/keycode.cpp:235
msgid "Numpad 9"
msgstr "Numbrilaual 9"
#: src/keycode.cpp:239
msgid "Num Lock"
msgstr "Numbrilaual Num Lock"
#: src/keycode.cpp:239
msgid "Scroll Lock"
msgstr "Scroll lukk"
#: src/keycode.cpp:240
msgid "Left Shift"
msgstr "Vasak Shift"
#: src/keycode.cpp:240
msgid "Right Shift"
msgstr "Parem Shift"
#: src/keycode.cpp:241
msgid "Left Control"
msgstr "Vasak CTRL"
#: src/keycode.cpp:241
msgid "Left Menu"
msgstr "Vasak Menüü"
#: src/keycode.cpp:241
msgid "Right Control"
msgstr "Parem CTRL"
#: src/keycode.cpp:241
msgid "Right Menu"
msgstr "Parem Menüü"
#: src/keycode.cpp:243
msgid "Comma"
msgstr "Koma"
#: src/keycode.cpp:243
msgid "Minus"
msgstr "Miinus"
#: src/keycode.cpp:243
msgid "Period"
msgstr "Punkt"
#: src/keycode.cpp:243
msgid "Plus"
msgstr "Pluss"
#: src/keycode.cpp:247
msgid "Attn"
msgstr "Attn"
#: src/keycode.cpp:247
msgid "CrSel"
msgstr "CrSel"
#: src/keycode.cpp:248
msgid "Erase OEF"
msgstr "Kustuta OEF"
#: src/keycode.cpp:248
msgid "ExSel"
msgstr "ExSel"
#: src/keycode.cpp:248
msgid "OEM Clear"
msgstr "OEM Tühi"
#: src/keycode.cpp:248
msgid "PA1"
msgstr "PA1"
#: src/keycode.cpp:248
msgid "Zoom"
msgstr "Suumi"
#: src/main.cpp:1506
msgid "Main Menu"
msgstr "Menüü"
#: src/main.cpp:1830
msgid "Failed to initialize world"
msgstr "Maailma initsialiseerimine ebaõnnestus"
#: src/main.cpp:1842
msgid "No world selected and no address provided. Nothing to do."
msgstr "Pole valitud ei maailma ega IP aadressi. Pole midagi teha."
#: src/main.cpp:1850
msgid "Could not find or load game \""
msgstr "Ei leia ega suuda jätkata mängu."
#: src/main.cpp:1864
msgid "Invalid gamespec."
msgstr "Vale mängu ID."
#: src/main.cpp:1904
msgid "Connection error (timed out?)"
msgstr "Ühenduse viga (Aeg otsas?)"
#: src/main.cpp:1915
msgid ""
"\n"
"Check debug.txt for details."
msgstr ""
"\n"
"Vaata debug.txt info jaoks."

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

801
po/ja/minetest.po Normal file
View File

@@ -0,0 +1,801 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
"PO-Revision-Date: 2013-03-07 23:06+0200\n"
"Last-Translator: Mitori Itoshiki <mito551@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 1.4-dev\n"
#: src/guiConfigureWorld.cpp:125
msgid ""
"Warning: Some mods are not configured yet.\n"
"They will be enabled by default when you save the configuration. "
msgstr ""
"警告: マインテストの改造がいくつか設定されていません。\n"
"これらを設定を保存すると自動で有効化されます。 "
#: src/guiConfigureWorld.cpp:144
msgid ""
"Warning: Some configured mods are missing.\n"
"Their setting will be removed when you save the configuration. "
msgstr ""
"警告: いくつかの設定みの改造ファイルが見つかりません.\n"
"これらの情報は設定を保存すると削除されます. "
#: src/guiConfigureWorld.cpp:208
msgid "enabled"
msgstr "有効にしました"
#: src/guiConfigureWorld.cpp:215
msgid "Enable All"
msgstr "全部を有効にしました"
#: src/guiConfigureWorld.cpp:222
msgid "Disable All"
msgstr "全部を無効にしました"
#: src/guiConfigureWorld.cpp:228
msgid "depends on:"
msgstr "この改造ファイルが必要です:"
#: src/guiConfigureWorld.cpp:240
msgid "is required by:"
msgstr "この改造に必要されます:"
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
msgid "Cancel"
msgstr "キャンセル"
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
msgid "Save"
msgstr "保存"
#: src/guiConfigureWorld.cpp:394
msgid "Configuration saved. "
msgstr "設定を保存しました. "
#: src/guiConfigureWorld.cpp:402
msgid "Warning: Configuration not consistent. "
msgstr "注意:設定が一定でわありません。"
#: src/guiConfirmMenu.cpp:120
msgid "Yes"
msgstr "はい"
#: src/guiConfirmMenu.cpp:126
msgid "No"
msgstr "いいえ"
#: src/guiCreateWorld.cpp:116
msgid "World name"
msgstr "ワールド名"
#: src/guiCreateWorld.cpp:135
msgid "Game"
msgstr "ゲーム"
#: src/guiCreateWorld.cpp:159
msgid "Create"
msgstr "作成"
#: src/guiDeathScreen.cpp:96
msgid "You died."
msgstr "死亡しました。"
#: src/guiDeathScreen.cpp:104
msgid "Respawn"
msgstr "リスポーン"
#: src/guiFormSpecMenu.cpp:582
msgid "Left click: Move all items, Right click: Move single item"
msgstr "左クリックは全部のアイテムを動かす,右クリックは一つのアイテムを動かす"
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
#: src/guiTextInputMenu.cpp:131
msgid "Proceed"
msgstr "続く"
#: src/guiKeyChangeMenu.cpp:114
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
msgstr "キーバインド"
#: src/guiKeyChangeMenu.cpp:151
msgid "\"Use\" = climb down"
msgstr "「使う」は下りる"
#: src/guiKeyChangeMenu.cpp:164
msgid "Double tap \"jump\" to toggle fly"
msgstr "「ジャンプ」を二回押すと飛べる"
#: src/guiKeyChangeMenu.cpp:269
msgid "Key already in use"
msgstr "既に使われているキーです"
#: src/guiKeyChangeMenu.cpp:347
msgid "press key"
msgstr "キー入力待ち"
#: src/guiKeyChangeMenu.cpp:372
msgid "Forward"
msgstr "前進"
#: src/guiKeyChangeMenu.cpp:373
msgid "Backward"
msgstr "後退"
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
msgid "Left"
msgstr "左へ進む"
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
msgid "Right"
msgstr "右へ進む"
#: src/guiKeyChangeMenu.cpp:376
msgid "Use"
msgstr "使う"
#: src/guiKeyChangeMenu.cpp:377
msgid "Jump"
msgstr "ジャンプ"
#: src/guiKeyChangeMenu.cpp:378
msgid "Sneak"
msgstr "こっそり進む"
#: src/guiKeyChangeMenu.cpp:379
msgid "Drop"
msgstr "落とす"
#: src/guiKeyChangeMenu.cpp:380
msgid "Inventory"
msgstr "インベントリ"
#: src/guiKeyChangeMenu.cpp:381
msgid "Chat"
msgstr "チャット"
#: src/guiKeyChangeMenu.cpp:382
msgid "Command"
msgstr "コマンド"
#: src/guiKeyChangeMenu.cpp:383
msgid "Console"
msgstr "コンソール"
#: src/guiKeyChangeMenu.cpp:384
msgid "Toggle fly"
msgstr "飛べるモードをトグル"
#: src/guiKeyChangeMenu.cpp:385
msgid "Toggle fast"
msgstr "ファストモードをトグル"
#: src/guiKeyChangeMenu.cpp:386
msgid "Toggle noclip"
msgstr "ノクリップモードをトグル"
#: src/guiKeyChangeMenu.cpp:387
msgid "Range select"
msgstr "範囲選択"
#: src/guiKeyChangeMenu.cpp:388
msgid "Print stacks"
msgstr "スタックの表示"
#: src/guiMainMenu.cpp:92
msgid "Cannot create world: Name contains invalid characters"
msgstr "ワールドを作成できません: 名前に無効な文字が含まれています"
#: src/guiMainMenu.cpp:101
msgid "Cannot create world: A world by this name already exists"
msgstr "ワールドを作成できません: 同名のワールドが既に存在しています"
#: src/guiMainMenu.cpp:283
msgid "Singleplayer"
msgstr "シングルプレイヤー"
#: src/guiMainMenu.cpp:284
msgid "Multiplayer"
msgstr "マルチプレイヤー"
#: src/guiMainMenu.cpp:285
msgid "Advanced"
msgstr "高度"
#: src/guiMainMenu.cpp:286
msgid "Settings"
msgstr "設定"
#: src/guiMainMenu.cpp:287
msgid "Credits"
msgstr "クレジット"
#: src/guiMainMenu.cpp:317
msgid "Select World:"
msgstr "ワールド選択:"
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
msgid "Delete"
msgstr "削除"
#: src/guiMainMenu.cpp:346
msgid "New"
msgstr "新規作成"
#: src/guiMainMenu.cpp:354
msgid "Configure"
msgstr "設定"
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
msgid "Play"
msgstr "選択した世界に入る"
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
msgid "Creative Mode"
msgstr "クリエイティブモード"
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
msgid "Enable Damage"
msgstr "ダメージ有効"
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
msgid "Name/Password"
msgstr "名前/パスワード"
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
#, fuzzy
msgid "Favorites:"
msgstr "お気に入りを見せる"
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
msgid "Public Server List:"
msgstr ""
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
msgid "Address/Port"
msgstr "アドレス/ポート"
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
msgid "Show Public"
msgstr "公共を見せる"
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
msgid "Show Favorites"
msgstr "お気に入りを見せる"
#: src/guiMainMenu.cpp:521
msgid "Connect"
msgstr "接続"
#: src/guiMainMenu.cpp:591
msgid "Leave address blank to start a local server."
msgstr "アドレスを入力しないかぎりロカルサーバーを開始。"
#: src/guiMainMenu.cpp:600
msgid "Start Game / Connect"
msgstr "ゲーム開始 / 接続"
#: src/guiMainMenu.cpp:632
#, fuzzy
msgid "Public"
msgstr "公共を見せる"
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
msgid "Delete world"
msgstr "ワールド削除"
#: src/guiMainMenu.cpp:647
msgid "Create world"
msgstr "ワールド作成"
#: src/guiMainMenu.cpp:681
msgid "Fancy trees"
msgstr "きれいな木"
#: src/guiMainMenu.cpp:687
#, fuzzy
msgid "Smooth Lighting"
msgstr "自然な光表現"
#: src/guiMainMenu.cpp:693
msgid "3D Clouds"
msgstr "3Dの雲"
#: src/guiMainMenu.cpp:699
msgid "Opaque water"
msgstr "不透明な水面"
#: src/guiMainMenu.cpp:709
msgid "Mip-Mapping"
msgstr "ミップマップ"
#: src/guiMainMenu.cpp:716
msgid "Anisotropic Filtering"
msgstr "異方性フィルタリング"
#: src/guiMainMenu.cpp:723
msgid "Bi-Linear Filtering"
msgstr "バイリニアフィルタリング"
#: src/guiMainMenu.cpp:730
msgid "Tri-Linear Filtering"
msgstr "トリリニアフィルタリング"
#: src/guiMainMenu.cpp:738
msgid "Shaders"
msgstr "シェーダー"
#: src/guiMainMenu.cpp:745
msgid "Preload item visuals"
msgstr "アイテム外観のプリロード"
#: src/guiMainMenu.cpp:752
msgid "Enable Particles"
msgstr "破片表現の有効化"
#: src/guiMainMenu.cpp:759
msgid "Finite liquid"
msgstr ""
#: src/guiMainMenu.cpp:769
msgid "Change keys"
msgstr "キー割当て変更"
#: src/guiMainMenu.cpp:1084
msgid "Address required."
msgstr "アドレスが必要です."
#: src/guiMainMenu.cpp:1102
msgid "Cannot delete world: Nothing selected"
msgstr "ワールドを削除できません: 何も選択されていません"
#: src/guiMainMenu.cpp:1117
msgid "Files to be deleted"
msgstr "削除されるファイル"
#: src/guiMainMenu.cpp:1133
msgid "Cannot create world: No games found"
msgstr "ワールドを作成できません: ゲームが見つかりませんでした"
#: src/guiMainMenu.cpp:1149
msgid "Cannot configure world: Nothing selected"
msgstr "ワールドの設定ができません: 何も選択されていません"
#: src/guiMainMenu.cpp:1256
msgid "Failed to delete all world files"
msgstr "ワールドファイルの全ての削除に失敗"
#: src/guiPasswordChange.cpp:108
msgid "Old Password"
msgstr "古いパスワード"
#: src/guiPasswordChange.cpp:125
msgid "New Password"
msgstr "新しいパスワード"
#: src/guiPasswordChange.cpp:141
msgid "Confirm Password"
msgstr "パスワードの確認"
#: src/guiPasswordChange.cpp:158
msgid "Change"
msgstr "変更"
#: src/guiPasswordChange.cpp:167
msgid "Passwords do not match!"
msgstr "新しいパスワードが一致しません!"
#: src/guiPauseMenu.cpp:123
msgid "Continue"
msgstr "続ける"
#: src/guiPauseMenu.cpp:132
msgid "Change Password"
msgstr "パスワードの変更"
#: src/guiPauseMenu.cpp:140
msgid "Sound Volume"
msgstr ""
#: src/guiPauseMenu.cpp:147
msgid "Exit to Menu"
msgstr "メニューへ戻る"
#: src/guiPauseMenu.cpp:154
msgid "Exit to OS"
msgstr "終了"
#: src/guiPauseMenu.cpp:161
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""
#: src/guiVolumeChange.cpp:108
msgid "Sound Volume: "
msgstr ""
#: src/guiVolumeChange.cpp:121
msgid "Exit"
msgstr ""
#: src/keycode.cpp:223
msgid "Left Button"
msgstr "左ボタン"
#: src/keycode.cpp:223
msgid "Middle Button"
msgstr "中ボタン"
#: src/keycode.cpp:223
msgid "Right Button"
msgstr "右ボタン"
#: src/keycode.cpp:223
msgid "X Button 1"
msgstr ""
#: src/keycode.cpp:224
msgid "Back"
msgstr "Back Space"
#: src/keycode.cpp:224
msgid "Clear"
msgstr "消す"
#: src/keycode.cpp:224
msgid "Return"
msgstr "Enter"
#: src/keycode.cpp:224
msgid "Tab"
msgstr "Tab"
#: src/keycode.cpp:224
msgid "X Button 2"
msgstr ""
#: src/keycode.cpp:225
msgid "Capital"
msgstr "Caps Lock"
#: src/keycode.cpp:225
msgid "Control"
msgstr "Ctrl"
#: src/keycode.cpp:225
msgid "Kana"
msgstr "カタカナ/ひらがな"
#: src/keycode.cpp:225
msgid "Menu"
msgstr "メニュー"
#: src/keycode.cpp:225
msgid "Pause"
msgstr "Pause"
#: src/keycode.cpp:225
msgid "Shift"
msgstr "Shift"
#: src/keycode.cpp:226
msgid "Convert"
msgstr "変換"
#: src/keycode.cpp:226
msgid "Escape"
msgstr "Esc"
#: src/keycode.cpp:226
msgid "Final"
msgstr ""
#: src/keycode.cpp:226
msgid "Junja"
msgstr ""
#: src/keycode.cpp:226
msgid "Kanji"
msgstr "半角/全角"
#: src/keycode.cpp:226
msgid "Nonconvert"
msgstr "無変換"
#: src/keycode.cpp:227
#, fuzzy
msgid "Accept"
msgstr "Accept"
#: src/keycode.cpp:227
msgid "End"
msgstr "End"
#: src/keycode.cpp:227
msgid "Home"
msgstr "Home"
#: src/keycode.cpp:227
msgid "Mode Change"
msgstr "モードを変更"
#: src/keycode.cpp:227
msgid "Next"
msgstr "Page Down"
#: src/keycode.cpp:227
msgid "Prior"
msgstr "Page Up"
#: src/keycode.cpp:227
#, fuzzy
msgid "Space"
msgstr "Space"
#: src/keycode.cpp:228
#, fuzzy
msgid "Down"
msgstr "Down"
#: src/keycode.cpp:228
#, fuzzy
msgid "Execute"
msgstr "Execute"
#: src/keycode.cpp:228
#, fuzzy
msgid "Print"
msgstr "Print"
#: src/keycode.cpp:228
#, fuzzy
msgid "Select"
msgstr "Select"
#: src/keycode.cpp:228
#, fuzzy
msgid "Up"
msgstr "Up"
#: src/keycode.cpp:229
#, fuzzy
msgid "Help"
msgstr "Help"
#: src/keycode.cpp:229
msgid "Insert"
msgstr "Insert"
#: src/keycode.cpp:229
#, fuzzy
msgid "Snapshot"
msgstr "Snapshot"
#: src/keycode.cpp:232
#, fuzzy
msgid "Left Windows"
msgstr "Left Windows"
#: src/keycode.cpp:233
#, fuzzy
msgid "Apps"
msgstr "Apps"
#: src/keycode.cpp:233
#, fuzzy
msgid "Numpad 0"
msgstr "Numpad 0"
#: src/keycode.cpp:233
#, fuzzy
msgid "Numpad 1"
msgstr "Numpad 1"
#: src/keycode.cpp:233
#, fuzzy
msgid "Right Windows"
msgstr "Right Windows"
#: src/keycode.cpp:233
#, fuzzy
msgid "Sleep"
msgstr "Sleep"
#: src/keycode.cpp:234
#, fuzzy
msgid "Numpad 2"
msgstr "Numpad 2"
#: src/keycode.cpp:234
#, fuzzy
msgid "Numpad 3"
msgstr "Numpad 3"
#: src/keycode.cpp:234
#, fuzzy
msgid "Numpad 4"
msgstr "Numpad 4"
#: src/keycode.cpp:234
#, fuzzy
msgid "Numpad 5"
msgstr "Numpad 5"
#: src/keycode.cpp:234
#, fuzzy
msgid "Numpad 6"
msgstr "Numpad 6"
#: src/keycode.cpp:234
#, fuzzy
msgid "Numpad 7"
msgstr "Numpad 7"
#: src/keycode.cpp:235
#, fuzzy
msgid "Numpad *"
msgstr "Numpad *"
#: src/keycode.cpp:235
#, fuzzy
msgid "Numpad +"
msgstr "Numpad +"
#: src/keycode.cpp:235
#, fuzzy
msgid "Numpad -"
msgstr "Numpad -"
#: src/keycode.cpp:235
#, fuzzy
msgid "Numpad /"
msgstr "Numpad /"
#: src/keycode.cpp:235
#, fuzzy
msgid "Numpad 8"
msgstr "Numpad 8"
#: src/keycode.cpp:235
#, fuzzy
msgid "Numpad 9"
msgstr "Numpad 9"
#: src/keycode.cpp:239
msgid "Num Lock"
msgstr "Num Lock"
#: src/keycode.cpp:239
msgid "Scroll Lock"
msgstr "Scroll Lock"
#: src/keycode.cpp:240
msgid "Left Shift"
msgstr "左Shift"
#: src/keycode.cpp:240
msgid "Right Shift"
msgstr "右Shift"
#: src/keycode.cpp:241
msgid "Left Control"
msgstr "左Ctrl"
#: src/keycode.cpp:241
msgid "Left Menu"
msgstr "左メニュー"
#: src/keycode.cpp:241
msgid "Right Control"
msgstr "右Ctrl"
#: src/keycode.cpp:241
msgid "Right Menu"
msgstr "右メニュー"
#: src/keycode.cpp:243
msgid "Comma"
msgstr "読点"
#: src/keycode.cpp:243
#, fuzzy
msgid "Minus"
msgstr "Minus"
#: src/keycode.cpp:243
#, fuzzy
msgid "Period"
msgstr "Period"
#: src/keycode.cpp:243
#, fuzzy
msgid "Plus"
msgstr "Plus"
#: src/keycode.cpp:247
#, fuzzy
msgid "Attn"
msgstr "Attn"
#: src/keycode.cpp:247
#, fuzzy
msgid "CrSel"
msgstr "CrSel"
#: src/keycode.cpp:248
#, fuzzy
msgid "Erase OEF"
msgstr "Erase OEF"
#: src/keycode.cpp:248
#, fuzzy
msgid "ExSel"
msgstr "ExSel"
#: src/keycode.cpp:248
#, fuzzy
msgid "OEM Clear"
msgstr "OEM Clear"
#: src/keycode.cpp:248
#, fuzzy
msgid "PA1"
msgstr "PA1"
#: src/keycode.cpp:248
msgid "Zoom"
msgstr "ズーム"
#: src/main.cpp:1506
msgid "Main Menu"
msgstr "メインメニュー"
#: src/main.cpp:1830
msgid "Failed to initialize world"
msgstr "ワールドの初期化に失敗"
#: src/main.cpp:1842
msgid "No world selected and no address provided. Nothing to do."
msgstr ""
#: src/main.cpp:1850
msgid "Could not find or load game \""
msgstr "ゲームをロードか見つかるのに失敗"
#: src/main.cpp:1864
msgid "Invalid gamespec."
msgstr ""
#: src/main.cpp:1904
msgid "Connection error (timed out?)"
msgstr "接続エラー (タイムアウトか?)"
#: src/main.cpp:1915
msgid ""
"\n"
"Check debug.txt for details."
msgstr ""

757
po/ko/minetest.po Normal file
View File

@@ -0,0 +1,757 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/guiConfigureWorld.cpp:125
msgid ""
"Warning: Some mods are not configured yet.\n"
"They will be enabled by default when you save the configuration. "
msgstr ""
#: src/guiConfigureWorld.cpp:144
msgid ""
"Warning: Some configured mods are missing.\n"
"Their setting will be removed when you save the configuration. "
msgstr ""
#: src/guiConfigureWorld.cpp:208
msgid "enabled"
msgstr ""
#: src/guiConfigureWorld.cpp:215
msgid "Enable All"
msgstr ""
#: src/guiConfigureWorld.cpp:222
msgid "Disable All"
msgstr ""
#: src/guiConfigureWorld.cpp:228
msgid "depends on:"
msgstr ""
#: src/guiConfigureWorld.cpp:240
msgid "is required by:"
msgstr ""
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
msgid "Cancel"
msgstr ""
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
msgid "Save"
msgstr ""
#: src/guiConfigureWorld.cpp:394
msgid "Configuration saved. "
msgstr ""
#: src/guiConfigureWorld.cpp:402
msgid "Warning: Configuration not consistent. "
msgstr ""
#: src/guiConfirmMenu.cpp:120
msgid "Yes"
msgstr ""
#: src/guiConfirmMenu.cpp:126
msgid "No"
msgstr ""
#: src/guiCreateWorld.cpp:116
msgid "World name"
msgstr ""
#: src/guiCreateWorld.cpp:135
msgid "Game"
msgstr ""
#: src/guiCreateWorld.cpp:159
msgid "Create"
msgstr ""
#: src/guiDeathScreen.cpp:96
msgid "You died."
msgstr ""
#: src/guiDeathScreen.cpp:104
msgid "Respawn"
msgstr ""
#: src/guiFormSpecMenu.cpp:582
msgid "Left click: Move all items, Right click: Move single item"
msgstr ""
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
#: src/guiTextInputMenu.cpp:131
msgid "Proceed"
msgstr ""
#: src/guiKeyChangeMenu.cpp:114
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
msgstr ""
#: src/guiKeyChangeMenu.cpp:151
msgid "\"Use\" = climb down"
msgstr ""
#: src/guiKeyChangeMenu.cpp:164
msgid "Double tap \"jump\" to toggle fly"
msgstr ""
#: src/guiKeyChangeMenu.cpp:269
msgid "Key already in use"
msgstr ""
#: src/guiKeyChangeMenu.cpp:347
msgid "press key"
msgstr ""
#: src/guiKeyChangeMenu.cpp:372
msgid "Forward"
msgstr ""
#: src/guiKeyChangeMenu.cpp:373
msgid "Backward"
msgstr ""
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
msgid "Left"
msgstr ""
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
msgid "Right"
msgstr ""
#: src/guiKeyChangeMenu.cpp:376
msgid "Use"
msgstr ""
#: src/guiKeyChangeMenu.cpp:377
msgid "Jump"
msgstr ""
#: src/guiKeyChangeMenu.cpp:378
msgid "Sneak"
msgstr ""
#: src/guiKeyChangeMenu.cpp:379
msgid "Drop"
msgstr ""
#: src/guiKeyChangeMenu.cpp:380
msgid "Inventory"
msgstr ""
#: src/guiKeyChangeMenu.cpp:381
msgid "Chat"
msgstr ""
#: src/guiKeyChangeMenu.cpp:382
msgid "Command"
msgstr ""
#: src/guiKeyChangeMenu.cpp:383
msgid "Console"
msgstr ""
#: src/guiKeyChangeMenu.cpp:384
msgid "Toggle fly"
msgstr ""
#: src/guiKeyChangeMenu.cpp:385
msgid "Toggle fast"
msgstr ""
#: src/guiKeyChangeMenu.cpp:386
msgid "Toggle noclip"
msgstr ""
#: src/guiKeyChangeMenu.cpp:387
msgid "Range select"
msgstr ""
#: src/guiKeyChangeMenu.cpp:388
msgid "Print stacks"
msgstr ""
#: src/guiMainMenu.cpp:92
msgid "Cannot create world: Name contains invalid characters"
msgstr ""
#: src/guiMainMenu.cpp:101
msgid "Cannot create world: A world by this name already exists"
msgstr ""
#: src/guiMainMenu.cpp:283
msgid "Singleplayer"
msgstr ""
#: src/guiMainMenu.cpp:284
msgid "Multiplayer"
msgstr ""
#: src/guiMainMenu.cpp:285
msgid "Advanced"
msgstr ""
#: src/guiMainMenu.cpp:286
msgid "Settings"
msgstr ""
#: src/guiMainMenu.cpp:287
msgid "Credits"
msgstr ""
#: src/guiMainMenu.cpp:317
msgid "Select World:"
msgstr ""
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
msgid "Delete"
msgstr ""
#: src/guiMainMenu.cpp:346
msgid "New"
msgstr ""
#: src/guiMainMenu.cpp:354
msgid "Configure"
msgstr ""
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
msgid "Play"
msgstr ""
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
msgid "Creative Mode"
msgstr ""
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
msgid "Enable Damage"
msgstr ""
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
msgid "Name/Password"
msgstr ""
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
msgid "Favorites:"
msgstr ""
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
msgid "Public Server List:"
msgstr ""
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
msgid "Address/Port"
msgstr ""
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
msgid "Show Public"
msgstr ""
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
msgid "Show Favorites"
msgstr ""
#: src/guiMainMenu.cpp:521
msgid "Connect"
msgstr ""
#: src/guiMainMenu.cpp:591
msgid "Leave address blank to start a local server."
msgstr ""
#: src/guiMainMenu.cpp:600
msgid "Start Game / Connect"
msgstr ""
#: src/guiMainMenu.cpp:632
msgid "Public"
msgstr ""
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
msgid "Delete world"
msgstr ""
#: src/guiMainMenu.cpp:647
msgid "Create world"
msgstr ""
#: src/guiMainMenu.cpp:681
msgid "Fancy trees"
msgstr ""
#: src/guiMainMenu.cpp:687
msgid "Smooth Lighting"
msgstr ""
#: src/guiMainMenu.cpp:693
msgid "3D Clouds"
msgstr ""
#: src/guiMainMenu.cpp:699
msgid "Opaque water"
msgstr ""
#: src/guiMainMenu.cpp:709
msgid "Mip-Mapping"
msgstr ""
#: src/guiMainMenu.cpp:716
msgid "Anisotropic Filtering"
msgstr ""
#: src/guiMainMenu.cpp:723
msgid "Bi-Linear Filtering"
msgstr ""
#: src/guiMainMenu.cpp:730
msgid "Tri-Linear Filtering"
msgstr ""
#: src/guiMainMenu.cpp:738
msgid "Shaders"
msgstr ""
#: src/guiMainMenu.cpp:745
msgid "Preload item visuals"
msgstr ""
#: src/guiMainMenu.cpp:752
msgid "Enable Particles"
msgstr ""
#: src/guiMainMenu.cpp:759
msgid "Finite liquid"
msgstr ""
#: src/guiMainMenu.cpp:769
msgid "Change keys"
msgstr ""
#: src/guiMainMenu.cpp:1084
msgid "Address required."
msgstr ""
#: src/guiMainMenu.cpp:1102
msgid "Cannot delete world: Nothing selected"
msgstr ""
#: src/guiMainMenu.cpp:1117
msgid "Files to be deleted"
msgstr ""
#: src/guiMainMenu.cpp:1133
msgid "Cannot create world: No games found"
msgstr ""
#: src/guiMainMenu.cpp:1149
msgid "Cannot configure world: Nothing selected"
msgstr ""
#: src/guiMainMenu.cpp:1256
msgid "Failed to delete all world files"
msgstr ""
#: src/guiPasswordChange.cpp:108
msgid "Old Password"
msgstr ""
#: src/guiPasswordChange.cpp:125
msgid "New Password"
msgstr ""
#: src/guiPasswordChange.cpp:141
msgid "Confirm Password"
msgstr ""
#: src/guiPasswordChange.cpp:158
msgid "Change"
msgstr ""
#: src/guiPasswordChange.cpp:167
msgid "Passwords do not match!"
msgstr ""
#: src/guiPauseMenu.cpp:123
msgid "Continue"
msgstr ""
#: src/guiPauseMenu.cpp:132
msgid "Change Password"
msgstr ""
#: src/guiPauseMenu.cpp:140
msgid "Sound Volume"
msgstr ""
#: src/guiPauseMenu.cpp:147
msgid "Exit to Menu"
msgstr ""
#: src/guiPauseMenu.cpp:154
msgid "Exit to OS"
msgstr ""
#: src/guiPauseMenu.cpp:161
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""
#: src/guiVolumeChange.cpp:108
msgid "Sound Volume: "
msgstr ""
#: src/guiVolumeChange.cpp:121
msgid "Exit"
msgstr ""
#: src/keycode.cpp:223
msgid "Left Button"
msgstr ""
#: src/keycode.cpp:223
msgid "Middle Button"
msgstr ""
#: src/keycode.cpp:223
msgid "Right Button"
msgstr ""
#: src/keycode.cpp:223
msgid "X Button 1"
msgstr ""
#: src/keycode.cpp:224
msgid "Back"
msgstr ""
#: src/keycode.cpp:224
msgid "Clear"
msgstr ""
#: src/keycode.cpp:224
msgid "Return"
msgstr ""
#: src/keycode.cpp:224
msgid "Tab"
msgstr ""
#: src/keycode.cpp:224
msgid "X Button 2"
msgstr ""
#: src/keycode.cpp:225
msgid "Capital"
msgstr ""
#: src/keycode.cpp:225
msgid "Control"
msgstr ""
#: src/keycode.cpp:225
msgid "Kana"
msgstr ""
#: src/keycode.cpp:225
msgid "Menu"
msgstr ""
#: src/keycode.cpp:225
msgid "Pause"
msgstr ""
#: src/keycode.cpp:225
msgid "Shift"
msgstr ""
#: src/keycode.cpp:226
msgid "Convert"
msgstr ""
#: src/keycode.cpp:226
msgid "Escape"
msgstr ""
#: src/keycode.cpp:226
msgid "Final"
msgstr ""
#: src/keycode.cpp:226
msgid "Junja"
msgstr ""
#: src/keycode.cpp:226
msgid "Kanji"
msgstr ""
#: src/keycode.cpp:226
msgid "Nonconvert"
msgstr ""
#: src/keycode.cpp:227
msgid "Accept"
msgstr ""
#: src/keycode.cpp:227
msgid "End"
msgstr ""
#: src/keycode.cpp:227
msgid "Home"
msgstr ""
#: src/keycode.cpp:227
msgid "Mode Change"
msgstr ""
#: src/keycode.cpp:227
msgid "Next"
msgstr ""
#: src/keycode.cpp:227
msgid "Prior"
msgstr ""
#: src/keycode.cpp:227
msgid "Space"
msgstr ""
#: src/keycode.cpp:228
msgid "Down"
msgstr ""
#: src/keycode.cpp:228
msgid "Execute"
msgstr ""
#: src/keycode.cpp:228
msgid "Print"
msgstr ""
#: src/keycode.cpp:228
msgid "Select"
msgstr ""
#: src/keycode.cpp:228
msgid "Up"
msgstr ""
#: src/keycode.cpp:229
msgid "Help"
msgstr ""
#: src/keycode.cpp:229
msgid "Insert"
msgstr ""
#: src/keycode.cpp:229
msgid "Snapshot"
msgstr ""
#: src/keycode.cpp:232
msgid "Left Windows"
msgstr ""
#: src/keycode.cpp:233
msgid "Apps"
msgstr ""
#: src/keycode.cpp:233
msgid "Numpad 0"
msgstr ""
#: src/keycode.cpp:233
msgid "Numpad 1"
msgstr ""
#: src/keycode.cpp:233
msgid "Right Windows"
msgstr ""
#: src/keycode.cpp:233
msgid "Sleep"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 2"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 3"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 4"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 5"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 6"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 7"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad *"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad +"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad -"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad /"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad 8"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad 9"
msgstr ""
#: src/keycode.cpp:239
msgid "Num Lock"
msgstr ""
#: src/keycode.cpp:239
msgid "Scroll Lock"
msgstr ""
#: src/keycode.cpp:240
msgid "Left Shift"
msgstr ""
#: src/keycode.cpp:240
msgid "Right Shift"
msgstr ""
#: src/keycode.cpp:241
msgid "Left Control"
msgstr ""
#: src/keycode.cpp:241
msgid "Left Menu"
msgstr ""
#: src/keycode.cpp:241
msgid "Right Control"
msgstr ""
#: src/keycode.cpp:241
msgid "Right Menu"
msgstr ""
#: src/keycode.cpp:243
msgid "Comma"
msgstr ""
#: src/keycode.cpp:243
msgid "Minus"
msgstr ""
#: src/keycode.cpp:243
msgid "Period"
msgstr ""
#: src/keycode.cpp:243
msgid "Plus"
msgstr ""
#: src/keycode.cpp:247
msgid "Attn"
msgstr ""
#: src/keycode.cpp:247
msgid "CrSel"
msgstr ""
#: src/keycode.cpp:248
msgid "Erase OEF"
msgstr ""
#: src/keycode.cpp:248
msgid "ExSel"
msgstr ""
#: src/keycode.cpp:248
msgid "OEM Clear"
msgstr ""
#: src/keycode.cpp:248
msgid "PA1"
msgstr ""
#: src/keycode.cpp:248
msgid "Zoom"
msgstr ""
#: src/main.cpp:1506
msgid "Main Menu"
msgstr ""
#: src/main.cpp:1830
msgid "Failed to initialize world"
msgstr ""
#: src/main.cpp:1842
msgid "No world selected and no address provided. Nothing to do."
msgstr ""
#: src/main.cpp:1850
msgid "Could not find or load game \""
msgstr ""
#: src/main.cpp:1864
msgid "Invalid gamespec."
msgstr ""
#: src/main.cpp:1904
msgid "Connection error (timed out?)"
msgstr ""
#: src/main.cpp:1915
msgid ""
"\n"
"Check debug.txt for details."
msgstr ""

758
po/ky/minetest.po Normal file
View File

@@ -0,0 +1,758 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
"PO-Revision-Date: 2013-03-31 15:40+0200\n"
"Last-Translator: Chynggyz Jumaliev <translatorky@lavabit.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: ky\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 1.4-dev\n"
#: src/guiConfigureWorld.cpp:125
msgid ""
"Warning: Some mods are not configured yet.\n"
"They will be enabled by default when you save the configuration. "
msgstr ""
#: src/guiConfigureWorld.cpp:144
msgid ""
"Warning: Some configured mods are missing.\n"
"Their setting will be removed when you save the configuration. "
msgstr ""
#: src/guiConfigureWorld.cpp:208
msgid "enabled"
msgstr ""
#: src/guiConfigureWorld.cpp:215
msgid "Enable All"
msgstr "Баарын күйгүзүү"
#: src/guiConfigureWorld.cpp:222
msgid "Disable All"
msgstr "Баарын өчүрүү"
#: src/guiConfigureWorld.cpp:228
msgid "depends on:"
msgstr ""
#: src/guiConfigureWorld.cpp:240
msgid "is required by:"
msgstr ""
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
msgid "Cancel"
msgstr "Жокко чыгаруу"
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
msgid "Save"
msgstr "Сактоо"
#: src/guiConfigureWorld.cpp:394
msgid "Configuration saved. "
msgstr "Ырастоолор сакталды. "
#: src/guiConfigureWorld.cpp:402
msgid "Warning: Configuration not consistent. "
msgstr "Эскертүү: Туура эмес конфигурация. "
#: src/guiConfirmMenu.cpp:120
msgid "Yes"
msgstr "Ооба"
#: src/guiConfirmMenu.cpp:126
msgid "No"
msgstr "Жок"
#: src/guiCreateWorld.cpp:116
msgid "World name"
msgstr "Дүйнөнүн аты"
#: src/guiCreateWorld.cpp:135
msgid "Game"
msgstr "Оюн"
#: src/guiCreateWorld.cpp:159
msgid "Create"
msgstr "Жаратуу"
#: src/guiDeathScreen.cpp:96
msgid "You died."
msgstr "Сиз өлдүңүз."
#: src/guiDeathScreen.cpp:104
msgid "Respawn"
msgstr "Кайтадан жаралуу"
#: src/guiFormSpecMenu.cpp:582
msgid "Left click: Move all items, Right click: Move single item"
msgstr ""
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
#: src/guiTextInputMenu.cpp:131
msgid "Proceed"
msgstr "Улантуу"
#: src/guiKeyChangeMenu.cpp:114
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
msgstr ""
#: src/guiKeyChangeMenu.cpp:151
msgid "\"Use\" = climb down"
msgstr ""
#: src/guiKeyChangeMenu.cpp:164
msgid "Double tap \"jump\" to toggle fly"
msgstr ""
#: src/guiKeyChangeMenu.cpp:269
msgid "Key already in use"
msgstr ""
#: src/guiKeyChangeMenu.cpp:347
msgid "press key"
msgstr ""
#: src/guiKeyChangeMenu.cpp:372
msgid "Forward"
msgstr "Алга"
#: src/guiKeyChangeMenu.cpp:373
msgid "Backward"
msgstr "Артка"
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
msgid "Left"
msgstr "Солго"
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
msgid "Right"
msgstr "Оңго"
#: src/guiKeyChangeMenu.cpp:376
msgid "Use"
msgstr "Колдонуу"
#: src/guiKeyChangeMenu.cpp:377
msgid "Jump"
msgstr "Секирүү"
#: src/guiKeyChangeMenu.cpp:378
msgid "Sneak"
msgstr ""
#: src/guiKeyChangeMenu.cpp:379
msgid "Drop"
msgstr "Ыргытуу"
#: src/guiKeyChangeMenu.cpp:380
msgid "Inventory"
msgstr ""
#: src/guiKeyChangeMenu.cpp:381
msgid "Chat"
msgstr "Маек"
#: src/guiKeyChangeMenu.cpp:382
msgid "Command"
msgstr "Команда"
#: src/guiKeyChangeMenu.cpp:383
msgid "Console"
msgstr "Консоль"
#: src/guiKeyChangeMenu.cpp:384
msgid "Toggle fly"
msgstr ""
#: src/guiKeyChangeMenu.cpp:385
msgid "Toggle fast"
msgstr ""
#: src/guiKeyChangeMenu.cpp:386
msgid "Toggle noclip"
msgstr ""
#: src/guiKeyChangeMenu.cpp:387
msgid "Range select"
msgstr ""
#: src/guiKeyChangeMenu.cpp:388
msgid "Print stacks"
msgstr ""
#: src/guiMainMenu.cpp:92
msgid "Cannot create world: Name contains invalid characters"
msgstr ""
#: src/guiMainMenu.cpp:101
msgid "Cannot create world: A world by this name already exists"
msgstr ""
#: src/guiMainMenu.cpp:283
msgid "Singleplayer"
msgstr ""
#: src/guiMainMenu.cpp:284
msgid "Multiplayer"
msgstr ""
#: src/guiMainMenu.cpp:285
msgid "Advanced"
msgstr ""
#: src/guiMainMenu.cpp:286
msgid "Settings"
msgstr "Ырастоолор"
#: src/guiMainMenu.cpp:287
msgid "Credits"
msgstr "Алкыштар"
#: src/guiMainMenu.cpp:317
msgid "Select World:"
msgstr "Дүйнөнү тандаңыз:"
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
msgid "Delete"
msgstr "Өчүрүү"
#: src/guiMainMenu.cpp:346
msgid "New"
msgstr "Жаңы"
#: src/guiMainMenu.cpp:354
msgid "Configure"
msgstr "Ырастоо"
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
msgid "Play"
msgstr "Ойноо"
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
msgid "Creative Mode"
msgstr ""
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
msgid "Enable Damage"
msgstr ""
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
msgid "Name/Password"
msgstr "Атыңыз/Сырсөзүңүз"
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
msgid "Favorites:"
msgstr ""
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
msgid "Public Server List:"
msgstr ""
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
msgid "Address/Port"
msgstr "Адреси/Порту"
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
msgid "Show Public"
msgstr ""
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
msgid "Show Favorites"
msgstr ""
#: src/guiMainMenu.cpp:521
msgid "Connect"
msgstr "Туташуу"
#: src/guiMainMenu.cpp:591
msgid "Leave address blank to start a local server."
msgstr ""
#: src/guiMainMenu.cpp:600
msgid "Start Game / Connect"
msgstr ""
#: src/guiMainMenu.cpp:632
msgid "Public"
msgstr ""
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
msgid "Delete world"
msgstr "Дүйнөнү өчүрүү"
#: src/guiMainMenu.cpp:647
msgid "Create world"
msgstr "Дүйнөнү жаратуу"
#: src/guiMainMenu.cpp:681
msgid "Fancy trees"
msgstr ""
#: src/guiMainMenu.cpp:687
msgid "Smooth Lighting"
msgstr ""
#: src/guiMainMenu.cpp:693
msgid "3D Clouds"
msgstr "3D булуттар"
#: src/guiMainMenu.cpp:699
msgid "Opaque water"
msgstr ""
#: src/guiMainMenu.cpp:709
msgid "Mip-Mapping"
msgstr ""
#: src/guiMainMenu.cpp:716
msgid "Anisotropic Filtering"
msgstr ""
#: src/guiMainMenu.cpp:723
msgid "Bi-Linear Filtering"
msgstr ""
#: src/guiMainMenu.cpp:730
msgid "Tri-Linear Filtering"
msgstr ""
#: src/guiMainMenu.cpp:738
msgid "Shaders"
msgstr ""
#: src/guiMainMenu.cpp:745
msgid "Preload item visuals"
msgstr ""
#: src/guiMainMenu.cpp:752
msgid "Enable Particles"
msgstr ""
#: src/guiMainMenu.cpp:759
msgid "Finite liquid"
msgstr ""
#: src/guiMainMenu.cpp:769
msgid "Change keys"
msgstr ""
#: src/guiMainMenu.cpp:1084
msgid "Address required."
msgstr ""
#: src/guiMainMenu.cpp:1102
msgid "Cannot delete world: Nothing selected"
msgstr ""
#: src/guiMainMenu.cpp:1117
msgid "Files to be deleted"
msgstr ""
#: src/guiMainMenu.cpp:1133
msgid "Cannot create world: No games found"
msgstr ""
#: src/guiMainMenu.cpp:1149
msgid "Cannot configure world: Nothing selected"
msgstr ""
#: src/guiMainMenu.cpp:1256
msgid "Failed to delete all world files"
msgstr ""
#: src/guiPasswordChange.cpp:108
msgid "Old Password"
msgstr ""
#: src/guiPasswordChange.cpp:125
msgid "New Password"
msgstr ""
#: src/guiPasswordChange.cpp:141
msgid "Confirm Password"
msgstr ""
#: src/guiPasswordChange.cpp:158
msgid "Change"
msgstr ""
#: src/guiPasswordChange.cpp:167
msgid "Passwords do not match!"
msgstr ""
#: src/guiPauseMenu.cpp:123
msgid "Continue"
msgstr ""
#: src/guiPauseMenu.cpp:132
msgid "Change Password"
msgstr ""
#: src/guiPauseMenu.cpp:140
msgid "Sound Volume"
msgstr ""
#: src/guiPauseMenu.cpp:147
msgid "Exit to Menu"
msgstr ""
#: src/guiPauseMenu.cpp:154
msgid "Exit to OS"
msgstr ""
#: src/guiPauseMenu.cpp:161
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""
#: src/guiVolumeChange.cpp:108
msgid "Sound Volume: "
msgstr ""
#: src/guiVolumeChange.cpp:121
msgid "Exit"
msgstr ""
#: src/keycode.cpp:223
msgid "Left Button"
msgstr ""
#: src/keycode.cpp:223
msgid "Middle Button"
msgstr ""
#: src/keycode.cpp:223
msgid "Right Button"
msgstr ""
#: src/keycode.cpp:223
msgid "X Button 1"
msgstr ""
#: src/keycode.cpp:224
msgid "Back"
msgstr ""
#: src/keycode.cpp:224
msgid "Clear"
msgstr ""
#: src/keycode.cpp:224
msgid "Return"
msgstr ""
#: src/keycode.cpp:224
msgid "Tab"
msgstr ""
#: src/keycode.cpp:224
msgid "X Button 2"
msgstr ""
#: src/keycode.cpp:225
msgid "Capital"
msgstr ""
#: src/keycode.cpp:225
msgid "Control"
msgstr ""
#: src/keycode.cpp:225
msgid "Kana"
msgstr ""
#: src/keycode.cpp:225
msgid "Menu"
msgstr ""
#: src/keycode.cpp:225
msgid "Pause"
msgstr ""
#: src/keycode.cpp:225
msgid "Shift"
msgstr ""
#: src/keycode.cpp:226
msgid "Convert"
msgstr ""
#: src/keycode.cpp:226
msgid "Escape"
msgstr ""
#: src/keycode.cpp:226
msgid "Final"
msgstr ""
#: src/keycode.cpp:226
msgid "Junja"
msgstr ""
#: src/keycode.cpp:226
msgid "Kanji"
msgstr ""
#: src/keycode.cpp:226
msgid "Nonconvert"
msgstr ""
#: src/keycode.cpp:227
msgid "Accept"
msgstr ""
#: src/keycode.cpp:227
msgid "End"
msgstr ""
#: src/keycode.cpp:227
msgid "Home"
msgstr ""
#: src/keycode.cpp:227
msgid "Mode Change"
msgstr ""
#: src/keycode.cpp:227
msgid "Next"
msgstr ""
#: src/keycode.cpp:227
msgid "Prior"
msgstr ""
#: src/keycode.cpp:227
msgid "Space"
msgstr ""
#: src/keycode.cpp:228
msgid "Down"
msgstr ""
#: src/keycode.cpp:228
msgid "Execute"
msgstr ""
#: src/keycode.cpp:228
msgid "Print"
msgstr ""
#: src/keycode.cpp:228
msgid "Select"
msgstr ""
#: src/keycode.cpp:228
msgid "Up"
msgstr ""
#: src/keycode.cpp:229
msgid "Help"
msgstr ""
#: src/keycode.cpp:229
msgid "Insert"
msgstr ""
#: src/keycode.cpp:229
msgid "Snapshot"
msgstr ""
#: src/keycode.cpp:232
msgid "Left Windows"
msgstr ""
#: src/keycode.cpp:233
msgid "Apps"
msgstr ""
#: src/keycode.cpp:233
msgid "Numpad 0"
msgstr ""
#: src/keycode.cpp:233
msgid "Numpad 1"
msgstr ""
#: src/keycode.cpp:233
msgid "Right Windows"
msgstr ""
#: src/keycode.cpp:233
msgid "Sleep"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 2"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 3"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 4"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 5"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 6"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 7"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad *"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad +"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad -"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad /"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad 8"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad 9"
msgstr ""
#: src/keycode.cpp:239
msgid "Num Lock"
msgstr ""
#: src/keycode.cpp:239
msgid "Scroll Lock"
msgstr ""
#: src/keycode.cpp:240
msgid "Left Shift"
msgstr ""
#: src/keycode.cpp:240
msgid "Right Shift"
msgstr ""
#: src/keycode.cpp:241
msgid "Left Control"
msgstr ""
#: src/keycode.cpp:241
msgid "Left Menu"
msgstr ""
#: src/keycode.cpp:241
msgid "Right Control"
msgstr ""
#: src/keycode.cpp:241
msgid "Right Menu"
msgstr ""
#: src/keycode.cpp:243
msgid "Comma"
msgstr ""
#: src/keycode.cpp:243
msgid "Minus"
msgstr ""
#: src/keycode.cpp:243
msgid "Period"
msgstr ""
#: src/keycode.cpp:243
msgid "Plus"
msgstr ""
#: src/keycode.cpp:247
msgid "Attn"
msgstr ""
#: src/keycode.cpp:247
msgid "CrSel"
msgstr ""
#: src/keycode.cpp:248
msgid "Erase OEF"
msgstr ""
#: src/keycode.cpp:248
msgid "ExSel"
msgstr ""
#: src/keycode.cpp:248
msgid "OEM Clear"
msgstr ""
#: src/keycode.cpp:248
msgid "PA1"
msgstr ""
#: src/keycode.cpp:248
msgid "Zoom"
msgstr ""
#: src/main.cpp:1506
msgid "Main Menu"
msgstr ""
#: src/main.cpp:1830
msgid "Failed to initialize world"
msgstr ""
#: src/main.cpp:1842
msgid "No world selected and no address provided. Nothing to do."
msgstr ""
#: src/main.cpp:1850
msgid "Could not find or load game \""
msgstr ""
#: src/main.cpp:1864
msgid "Invalid gamespec."
msgstr ""
#: src/main.cpp:1904
msgid "Connection error (timed out?)"
msgstr ""
#: src/main.cpp:1915
msgid ""
"\n"
"Check debug.txt for details."
msgstr ""

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-04 23:25+0300\n"
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,6 +17,55 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/guiConfigureWorld.cpp:125
msgid ""
"Warning: Some mods are not configured yet.\n"
"They will be enabled by default when you save the configuration. "
msgstr ""
#: src/guiConfigureWorld.cpp:144
msgid ""
"Warning: Some configured mods are missing.\n"
"Their setting will be removed when you save the configuration. "
msgstr ""
#: src/guiConfigureWorld.cpp:208
msgid "enabled"
msgstr ""
#: src/guiConfigureWorld.cpp:215
msgid "Enable All"
msgstr ""
#: src/guiConfigureWorld.cpp:222
msgid "Disable All"
msgstr ""
#: src/guiConfigureWorld.cpp:228
msgid "depends on:"
msgstr ""
#: src/guiConfigureWorld.cpp:240
msgid "is required by:"
msgstr ""
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
msgid "Cancel"
msgstr ""
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
msgid "Save"
msgstr ""
#: src/guiConfigureWorld.cpp:394
msgid "Configuration saved. "
msgstr ""
#: src/guiConfigureWorld.cpp:402
msgid "Warning: Configuration not consistent. "
msgstr ""
#: src/guiConfirmMenu.cpp:120
msgid "Yes"
msgstr ""
@@ -37,10 +86,6 @@ msgstr ""
msgid "Create"
msgstr ""
#: src/guiCreateWorld.cpp:165 src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:221
msgid "Cancel"
msgstr ""
#: src/guiDeathScreen.cpp:96
msgid "You died."
msgstr ""
@@ -49,209 +94,283 @@ msgstr ""
msgid "Respawn"
msgstr ""
#: src/guiKeyChangeMenu.cpp:111
#: src/guiFormSpecMenu.cpp:582
msgid "Left click: Move all items, Right click: Move single item"
msgstr ""
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
#: src/guiTextInputMenu.cpp:131
msgid "Proceed"
msgstr ""
#: src/guiKeyChangeMenu.cpp:114
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
msgstr ""
#: src/guiKeyChangeMenu.cpp:121
#: src/guiKeyChangeMenu.cpp:151
msgid "\"Use\" = climb down"
msgstr ""
#: src/guiKeyChangeMenu.cpp:164
msgid "Double tap \"jump\" to toggle fly"
msgstr ""
#: src/guiKeyChangeMenu.cpp:269
msgid "Key already in use"
msgstr ""
#: src/guiKeyChangeMenu.cpp:347
msgid "press key"
msgstr ""
#: src/guiKeyChangeMenu.cpp:372
msgid "Forward"
msgstr ""
#: src/guiKeyChangeMenu.cpp:138
#: src/guiKeyChangeMenu.cpp:373
msgid "Backward"
msgstr ""
#: src/guiKeyChangeMenu.cpp:154 src/keycode.cpp:226
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
msgid "Left"
msgstr ""
#: src/guiKeyChangeMenu.cpp:169 src/keycode.cpp:226
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
msgid "Right"
msgstr ""
#: src/guiKeyChangeMenu.cpp:185
#: src/guiKeyChangeMenu.cpp:376
msgid "Use"
msgstr ""
#: src/guiKeyChangeMenu.cpp:200
msgid "Sneak"
msgstr ""
#: src/guiKeyChangeMenu.cpp:216
#: src/guiKeyChangeMenu.cpp:377
msgid "Jump"
msgstr ""
#: src/guiKeyChangeMenu.cpp:231
#: src/guiKeyChangeMenu.cpp:378
msgid "Sneak"
msgstr ""
#: src/guiKeyChangeMenu.cpp:379
msgid "Drop"
msgstr ""
#: src/guiKeyChangeMenu.cpp:246
#: src/guiKeyChangeMenu.cpp:380
msgid "Inventory"
msgstr ""
#: src/guiKeyChangeMenu.cpp:262
#: src/guiKeyChangeMenu.cpp:381
msgid "Chat"
msgstr ""
#: src/guiKeyChangeMenu.cpp:276
#: src/guiKeyChangeMenu.cpp:382
msgid "Command"
msgstr ""
#: src/guiKeyChangeMenu.cpp:290
#: src/guiKeyChangeMenu.cpp:383
msgid "Console"
msgstr ""
#: src/guiKeyChangeMenu.cpp:306
#: src/guiKeyChangeMenu.cpp:384
msgid "Toggle fly"
msgstr ""
#: src/guiKeyChangeMenu.cpp:321
#: src/guiKeyChangeMenu.cpp:385
msgid "Toggle fast"
msgstr ""
#: src/guiKeyChangeMenu.cpp:336
#: src/guiKeyChangeMenu.cpp:386
msgid "Toggle noclip"
msgstr ""
#: src/guiKeyChangeMenu.cpp:387
msgid "Range select"
msgstr ""
#: src/guiKeyChangeMenu.cpp:353
#: src/guiKeyChangeMenu.cpp:388
msgid "Print stacks"
msgstr ""
#: src/guiKeyChangeMenu.cpp:368
msgid "Save"
#: src/guiMainMenu.cpp:92
msgid "Cannot create world: Name contains invalid characters"
msgstr ""
#: src/guiKeyChangeMenu.cpp:626 src/guiKeyChangeMenu.cpp:631
#: src/guiKeyChangeMenu.cpp:636 src/guiKeyChangeMenu.cpp:641
#: src/guiKeyChangeMenu.cpp:646 src/guiKeyChangeMenu.cpp:651
#: src/guiKeyChangeMenu.cpp:656 src/guiKeyChangeMenu.cpp:661
#: src/guiKeyChangeMenu.cpp:666 src/guiKeyChangeMenu.cpp:671
#: src/guiKeyChangeMenu.cpp:676 src/guiKeyChangeMenu.cpp:681
#: src/guiKeyChangeMenu.cpp:686 src/guiKeyChangeMenu.cpp:691
#: src/guiKeyChangeMenu.cpp:696 src/guiKeyChangeMenu.cpp:701
msgid "press Key"
#: src/guiMainMenu.cpp:101
msgid "Cannot create world: A world by this name already exists"
msgstr ""
#: src/guiMainMenu.cpp:217
#: src/guiMainMenu.cpp:283
msgid "Singleplayer"
msgstr ""
#: src/guiMainMenu.cpp:218
#: src/guiMainMenu.cpp:284
msgid "Multiplayer"
msgstr ""
#: src/guiMainMenu.cpp:219
#: src/guiMainMenu.cpp:285
msgid "Advanced"
msgstr ""
#: src/guiMainMenu.cpp:220
#: src/guiMainMenu.cpp:286
msgid "Settings"
msgstr ""
#: src/guiMainMenu.cpp:221
#: src/guiMainMenu.cpp:287
msgid "Credits"
msgstr ""
#: src/guiMainMenu.cpp:252
#: src/guiMainMenu.cpp:317
msgid "Select World:"
msgstr ""
#: src/guiMainMenu.cpp:274 src/keycode.cpp:227
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
msgid "Delete"
msgstr ""
#: src/guiMainMenu.cpp:281
#: src/guiMainMenu.cpp:346
msgid "New"
msgstr ""
#: src/guiMainMenu.cpp:289
#: src/guiMainMenu.cpp:354
msgid "Configure"
msgstr ""
#: src/guiMainMenu.cpp:304 src/keycode.cpp:246
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
msgid "Play"
msgstr ""
#: src/guiMainMenu.cpp:315 src/guiMainMenu.cpp:492
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
msgid "Creative Mode"
msgstr ""
#: src/guiMainMenu.cpp:321 src/guiMainMenu.cpp:498
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
msgid "Enable Damage"
msgstr ""
#: src/guiMainMenu.cpp:341 src/guiMainMenu.cpp:414
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
msgid "Name/Password"
msgstr ""
#: src/guiMainMenu.cpp:368 src/guiMainMenu.cpp:441
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
msgid "Favorites:"
msgstr ""
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
msgid "Public Server List:"
msgstr ""
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
msgid "Address/Port"
msgstr ""
#: src/guiMainMenu.cpp:394 src/guiMainMenu.cpp:473
msgid "Start Game / Connect"
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
msgid "Show Public"
msgstr ""
#: src/guiMainMenu.cpp:464
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
msgid "Show Favorites"
msgstr ""
#: src/guiMainMenu.cpp:521
msgid "Connect"
msgstr ""
#: src/guiMainMenu.cpp:591
msgid "Leave address blank to start a local server."
msgstr ""
#: src/guiMainMenu.cpp:505 src/guiMainMenu.cpp:833
#: src/guiMainMenu.cpp:600
msgid "Start Game / Connect"
msgstr ""
#: src/guiMainMenu.cpp:632
msgid "Public"
msgstr ""
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
msgid "Delete world"
msgstr ""
#: src/guiMainMenu.cpp:512
#: src/guiMainMenu.cpp:647
msgid "Create world"
msgstr ""
#: src/guiMainMenu.cpp:546
#: src/guiMainMenu.cpp:681
msgid "Fancy trees"
msgstr ""
#: src/guiMainMenu.cpp:552
#: src/guiMainMenu.cpp:687
msgid "Smooth Lighting"
msgstr ""
#: src/guiMainMenu.cpp:558
#: src/guiMainMenu.cpp:693
msgid "3D Clouds"
msgstr ""
#: src/guiMainMenu.cpp:564
#: src/guiMainMenu.cpp:699
msgid "Opaque water"
msgstr ""
#: src/guiMainMenu.cpp:573
#: src/guiMainMenu.cpp:709
msgid "Mip-Mapping"
msgstr ""
#: src/guiMainMenu.cpp:716
msgid "Anisotropic Filtering"
msgstr ""
#: src/guiMainMenu.cpp:723
msgid "Bi-Linear Filtering"
msgstr ""
#: src/guiMainMenu.cpp:730
msgid "Tri-Linear Filtering"
msgstr ""
#: src/guiMainMenu.cpp:738
msgid "Shaders"
msgstr ""
#: src/guiMainMenu.cpp:745
msgid "Preload item visuals"
msgstr ""
#: src/guiMainMenu.cpp:752
msgid "Enable Particles"
msgstr ""
#: src/guiMainMenu.cpp:759
msgid "Finite liquid"
msgstr ""
#: src/guiMainMenu.cpp:769
msgid "Change keys"
msgstr ""
#: src/guiMainMenu.cpp:804
#: src/guiMainMenu.cpp:1084
msgid "Address required."
msgstr ""
#: src/guiMainMenu.cpp:822
#: src/guiMainMenu.cpp:1102
msgid "Cannot delete world: Nothing selected"
msgstr ""
#: src/guiMainMenu.cpp:837
#: src/guiMainMenu.cpp:1117
msgid "Files to be deleted"
msgstr ""
#: src/guiMainMenu.cpp:853
#: src/guiMainMenu.cpp:1133
msgid "Cannot create world: No games found"
msgstr ""
#: src/guiMainMenu.cpp:866
msgid "Nothing here"
#: src/guiMainMenu.cpp:1149
msgid "Cannot configure world: Nothing selected"
msgstr ""
#: src/guiMainMenu.cpp:915
#: src/guiMainMenu.cpp:1256
msgid "Failed to delete all world files"
msgstr ""
#: src/guiMessageMenu.cpp:109 src/guiTextInputMenu.cpp:123
msgid "Proceed"
msgstr ""
#: src/guiPasswordChange.cpp:108
msgid "Old Password"
msgstr ""
@@ -272,23 +391,27 @@ msgstr ""
msgid "Passwords do not match!"
msgstr ""
#: src/guiPauseMenu.cpp:118
#: src/guiPauseMenu.cpp:123
msgid "Continue"
msgstr ""
#: src/guiPauseMenu.cpp:127
#: src/guiPauseMenu.cpp:132
msgid "Change Password"
msgstr ""
#: src/guiPauseMenu.cpp:135
#: src/guiPauseMenu.cpp:140
msgid "Sound Volume"
msgstr ""
#: src/guiPauseMenu.cpp:147
msgid "Exit to Menu"
msgstr ""
#: src/guiPauseMenu.cpp:142
#: src/guiPauseMenu.cpp:154
msgid "Exit to OS"
msgstr ""
#: src/guiPauseMenu.cpp:149
#: src/guiPauseMenu.cpp:161
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
@@ -303,323 +426,331 @@ msgid ""
"- T: Chat\n"
msgstr ""
#: src/keycode.cpp:221
#: src/guiVolumeChange.cpp:108
msgid "Sound Volume: "
msgstr ""
#: src/guiVolumeChange.cpp:121
msgid "Exit"
msgstr ""
#: src/keycode.cpp:223
msgid "Left Button"
msgstr ""
#: src/keycode.cpp:221
#: src/keycode.cpp:223
msgid "Middle Button"
msgstr ""
#: src/keycode.cpp:221
#: src/keycode.cpp:223
msgid "Right Button"
msgstr ""
#: src/keycode.cpp:221
#: src/keycode.cpp:223
msgid "X Button 1"
msgstr ""
#: src/keycode.cpp:222
#: src/keycode.cpp:224
msgid "Back"
msgstr ""
#: src/keycode.cpp:222
#: src/keycode.cpp:224
msgid "Clear"
msgstr ""
#: src/keycode.cpp:222
#: src/keycode.cpp:224
msgid "Return"
msgstr ""
#: src/keycode.cpp:222
#: src/keycode.cpp:224
msgid "Tab"
msgstr ""
#: src/keycode.cpp:222
#: src/keycode.cpp:224
msgid "X Button 2"
msgstr ""
#: src/keycode.cpp:223
#: src/keycode.cpp:225
msgid "Capital"
msgstr ""
#: src/keycode.cpp:223
#: src/keycode.cpp:225
msgid "Control"
msgstr ""
#: src/keycode.cpp:223
#: src/keycode.cpp:225
msgid "Kana"
msgstr ""
#: src/keycode.cpp:223
#: src/keycode.cpp:225
msgid "Menu"
msgstr ""
#: src/keycode.cpp:223
#: src/keycode.cpp:225
msgid "Pause"
msgstr ""
#: src/keycode.cpp:223
#: src/keycode.cpp:225
msgid "Shift"
msgstr ""
#: src/keycode.cpp:224
#: src/keycode.cpp:226
msgid "Convert"
msgstr ""
#: src/keycode.cpp:224
#: src/keycode.cpp:226
msgid "Escape"
msgstr ""
#: src/keycode.cpp:224
#: src/keycode.cpp:226
msgid "Final"
msgstr ""
#: src/keycode.cpp:224
#: src/keycode.cpp:226
msgid "Junja"
msgstr ""
#: src/keycode.cpp:224
#: src/keycode.cpp:226
msgid "Kanji"
msgstr ""
#: src/keycode.cpp:224
#: src/keycode.cpp:226
msgid "Nonconvert"
msgstr ""
#: src/keycode.cpp:225
#: src/keycode.cpp:227
msgid "Accept"
msgstr ""
#: src/keycode.cpp:225
#: src/keycode.cpp:227
msgid "End"
msgstr ""
#: src/keycode.cpp:225
#: src/keycode.cpp:227
msgid "Home"
msgstr ""
#: src/keycode.cpp:225
#: src/keycode.cpp:227
msgid "Mode Change"
msgstr ""
#: src/keycode.cpp:225
#: src/keycode.cpp:227
msgid "Next"
msgstr ""
#: src/keycode.cpp:225
#: src/keycode.cpp:227
msgid "Prior"
msgstr ""
#: src/keycode.cpp:225
#: src/keycode.cpp:227
msgid "Space"
msgstr ""
#: src/keycode.cpp:226
#: src/keycode.cpp:228
msgid "Down"
msgstr ""
#: src/keycode.cpp:226
#: src/keycode.cpp:228
msgid "Execute"
msgstr ""
#: src/keycode.cpp:226
#: src/keycode.cpp:228
msgid "Print"
msgstr ""
#: src/keycode.cpp:226
#: src/keycode.cpp:228
msgid "Select"
msgstr ""
#: src/keycode.cpp:226
#: src/keycode.cpp:228
msgid "Up"
msgstr ""
#: src/keycode.cpp:227
#: src/keycode.cpp:229
msgid "Help"
msgstr ""
#: src/keycode.cpp:227
#: src/keycode.cpp:229
msgid "Insert"
msgstr ""
#: src/keycode.cpp:227
#: src/keycode.cpp:229
msgid "Snapshot"
msgstr ""
#: src/keycode.cpp:230
#: src/keycode.cpp:232
msgid "Left Windows"
msgstr ""
#: src/keycode.cpp:231
#: src/keycode.cpp:233
msgid "Apps"
msgstr ""
#: src/keycode.cpp:231
#: src/keycode.cpp:233
msgid "Numpad 0"
msgstr ""
#: src/keycode.cpp:231
#: src/keycode.cpp:233
msgid "Numpad 1"
msgstr ""
#: src/keycode.cpp:231
#: src/keycode.cpp:233
msgid "Right Windows"
msgstr ""
#: src/keycode.cpp:231
#: src/keycode.cpp:233
msgid "Sleep"
msgstr ""
#: src/keycode.cpp:232
#: src/keycode.cpp:234
msgid "Numpad 2"
msgstr ""
#: src/keycode.cpp:232
#: src/keycode.cpp:234
msgid "Numpad 3"
msgstr ""
#: src/keycode.cpp:232
#: src/keycode.cpp:234
msgid "Numpad 4"
msgstr ""
#: src/keycode.cpp:232
#: src/keycode.cpp:234
msgid "Numpad 5"
msgstr ""
#: src/keycode.cpp:232
#: src/keycode.cpp:234
msgid "Numpad 6"
msgstr ""
#: src/keycode.cpp:232
#: src/keycode.cpp:234
msgid "Numpad 7"
msgstr ""
#: src/keycode.cpp:233
#: src/keycode.cpp:235
msgid "Numpad *"
msgstr ""
#: src/keycode.cpp:233
#: src/keycode.cpp:235
msgid "Numpad +"
msgstr ""
#: src/keycode.cpp:233
#: src/keycode.cpp:235
msgid "Numpad -"
msgstr ""
#: src/keycode.cpp:233
#: src/keycode.cpp:235
msgid "Numpad /"
msgstr ""
#: src/keycode.cpp:233
#: src/keycode.cpp:235
msgid "Numpad 8"
msgstr ""
#: src/keycode.cpp:233
#: src/keycode.cpp:235
msgid "Numpad 9"
msgstr ""
#: src/keycode.cpp:237
#: src/keycode.cpp:239
msgid "Num Lock"
msgstr ""
#: src/keycode.cpp:237
#: src/keycode.cpp:239
msgid "Scroll Lock"
msgstr ""
#: src/keycode.cpp:238
#: src/keycode.cpp:240
msgid "Left Shift"
msgstr ""
#: src/keycode.cpp:238
#: src/keycode.cpp:240
msgid "Right Shift"
msgstr ""
#: src/keycode.cpp:239
#: src/keycode.cpp:241
msgid "Left Control"
msgstr ""
#: src/keycode.cpp:239
#: src/keycode.cpp:241
msgid "Left Menu"
msgstr ""
#: src/keycode.cpp:239
#: src/keycode.cpp:241
msgid "Right Control"
msgstr ""
#: src/keycode.cpp:239
#: src/keycode.cpp:241
msgid "Right Menu"
msgstr ""
#: src/keycode.cpp:241
#: src/keycode.cpp:243
msgid "Comma"
msgstr ""
#: src/keycode.cpp:241
#: src/keycode.cpp:243
msgid "Minus"
msgstr ""
#: src/keycode.cpp:241
#: src/keycode.cpp:243
msgid "Period"
msgstr ""
#: src/keycode.cpp:241
#: src/keycode.cpp:243
msgid "Plus"
msgstr ""
#: src/keycode.cpp:245
#: src/keycode.cpp:247
msgid "Attn"
msgstr ""
#: src/keycode.cpp:245
#: src/keycode.cpp:247
msgid "CrSel"
msgstr ""
#: src/keycode.cpp:246
#: src/keycode.cpp:248
msgid "Erase OEF"
msgstr ""
#: src/keycode.cpp:246
#: src/keycode.cpp:248
msgid "ExSel"
msgstr ""
#: src/keycode.cpp:246
#: src/keycode.cpp:248
msgid "OEM Clear"
msgstr ""
#: src/keycode.cpp:246
#: src/keycode.cpp:248
msgid "PA1"
msgstr ""
#: src/keycode.cpp:246
#: src/keycode.cpp:248
msgid "Zoom"
msgstr ""
#: src/main.cpp:1379
#: src/main.cpp:1506
msgid "Main Menu"
msgstr ""
#: src/main.cpp:1601
#: src/main.cpp:1830
msgid "Failed to initialize world"
msgstr ""
#: src/main.cpp:1613
#: src/main.cpp:1842
msgid "No world selected and no address provided. Nothing to do."
msgstr ""
#: src/main.cpp:1621
#: src/main.cpp:1850
msgid "Could not find or load game \""
msgstr ""
#: src/main.cpp:1635
#: src/main.cpp:1864
msgid "Invalid gamespec."
msgstr ""
#: src/main.cpp:1675
#: src/main.cpp:1904
msgid "Connection error (timed out?)"
msgstr ""
#: src/main.cpp:1686
#: src/main.cpp:1915
msgid ""
"\n"
"Check debug.txt for details."

780
po/pl/minetest.po Normal file
View File

@@ -0,0 +1,780 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
"PO-Revision-Date: 2013-04-03 16:42+0200\n"
"Last-Translator: Dêivan Ortiz Munhoz <deivan@novoseusadosinformatica.com.br>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: pl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
"X-Generator: Weblate 1.4-dev\n"
#: src/guiConfigureWorld.cpp:125
msgid ""
"Warning: Some mods are not configured yet.\n"
"They will be enabled by default when you save the configuration. "
msgstr ""
"Ostrzeżenie: Niektóre z modyfikacji nie zostały jeszcze skonfigurowane.\n"
"Zostaną domyślnie włączone gdy zapiszesz konfigurację. "
#: src/guiConfigureWorld.cpp:144
msgid ""
"Warning: Some configured mods are missing.\n"
"Their setting will be removed when you save the configuration. "
msgstr ""
"Ostrzeżenie: Niektóre z modyfikacji nie zostały znalezione.\n"
"Ich ustawienia zostaną usunięte gdy zapiszesz konfigurację. "
#: src/guiConfigureWorld.cpp:208
msgid "enabled"
msgstr "włączone"
#: src/guiConfigureWorld.cpp:215
msgid "Enable All"
msgstr "Włącz wszystkie"
#: src/guiConfigureWorld.cpp:222
msgid "Disable All"
msgstr "Wyłącz wszystkie"
#: src/guiConfigureWorld.cpp:228
msgid "depends on:"
msgstr "zależne od:"
#: src/guiConfigureWorld.cpp:240
msgid "is required by:"
msgstr "wymagane przez:"
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
msgid "Cancel"
msgstr "Anuluj"
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
msgid "Save"
msgstr "Zapisz"
#: src/guiConfigureWorld.cpp:394
msgid "Configuration saved. "
msgstr "Konfiguracja zapisana. "
#: src/guiConfigureWorld.cpp:402
msgid "Warning: Configuration not consistent. "
msgstr "Ostrzeżenie: Plik konfiguracyjny niespójny. "
#: src/guiConfirmMenu.cpp:120
msgid "Yes"
msgstr "Tak"
#: src/guiConfirmMenu.cpp:126
msgid "No"
msgstr "Nie"
#: src/guiCreateWorld.cpp:116
msgid "World name"
msgstr "Nazwa świata"
#: src/guiCreateWorld.cpp:135
msgid "Game"
msgstr "Gra"
#: src/guiCreateWorld.cpp:159
msgid "Create"
msgstr "Utwórz"
#: src/guiDeathScreen.cpp:96
msgid "You died."
msgstr "Zginąłeś."
#: src/guiDeathScreen.cpp:104
msgid "Respawn"
msgstr "Wróć do gry"
#: src/guiFormSpecMenu.cpp:582
msgid "Left click: Move all items, Right click: Move single item"
msgstr ""
"Lewy klik: Przenieś wszystkie przedmioty, Prawy klik: przenieś pojedynczy "
"przedmiot"
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
#: src/guiTextInputMenu.cpp:131
msgid "Proceed"
msgstr "Kontynuuj"
#: src/guiKeyChangeMenu.cpp:114
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
msgstr ""
"Zdefiniowane klawisze. (Jeżeli to menu nie działa, usuń skonfigurowane "
"klawisze z pliku minetest.conf)"
#: src/guiKeyChangeMenu.cpp:151
msgid "\"Use\" = climb down"
msgstr "\"Użyj\" = wspinaj się"
#: src/guiKeyChangeMenu.cpp:164
msgid "Double tap \"jump\" to toggle fly"
msgstr "Wciśnij dwukrotnie \"Skok\" by włączyć tryb latania"
#: src/guiKeyChangeMenu.cpp:269
msgid "Key already in use"
msgstr "Klawisz już zdefiniowany"
#: src/guiKeyChangeMenu.cpp:347
msgid "press key"
msgstr "naciśnij klawisz"
#: src/guiKeyChangeMenu.cpp:372
msgid "Forward"
msgstr "Do przodu"
#: src/guiKeyChangeMenu.cpp:373
msgid "Backward"
msgstr "Do tyłu"
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
msgid "Left"
msgstr "Lewo"
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
msgid "Right"
msgstr "Prawo"
#: src/guiKeyChangeMenu.cpp:376
msgid "Use"
msgstr "Użyj"
#: src/guiKeyChangeMenu.cpp:377
msgid "Jump"
msgstr "Skok"
#: src/guiKeyChangeMenu.cpp:378
msgid "Sneak"
msgstr "Skradanie"
#: src/guiKeyChangeMenu.cpp:379
msgid "Drop"
msgstr "Upuść"
#: src/guiKeyChangeMenu.cpp:380
msgid "Inventory"
msgstr "Inwentarz"
#: src/guiKeyChangeMenu.cpp:381
msgid "Chat"
msgstr "Czat"
#: src/guiKeyChangeMenu.cpp:382
msgid "Command"
msgstr "Komenda"
#: src/guiKeyChangeMenu.cpp:383
msgid "Console"
msgstr "Konsola"
#: src/guiKeyChangeMenu.cpp:384
msgid "Toggle fly"
msgstr "Przełącz tryb latania"
#: src/guiKeyChangeMenu.cpp:385
msgid "Toggle fast"
msgstr "Przełącz tryb szybki"
#: src/guiKeyChangeMenu.cpp:386
msgid "Toggle noclip"
msgstr "Przełącz tryb noclip"
#: src/guiKeyChangeMenu.cpp:387
msgid "Range select"
msgstr "Zasięg widzenia"
#: src/guiKeyChangeMenu.cpp:388
msgid "Print stacks"
msgstr "stosy Drukuj"
#: src/guiMainMenu.cpp:92
msgid "Cannot create world: Name contains invalid characters"
msgstr "Nie można stworzyć świata: nazwa zawiera niedozwolone znaki"
#: src/guiMainMenu.cpp:101
msgid "Cannot create world: A world by this name already exists"
msgstr "Nie można stworzyć świata: Istnieje już świat o takiej nazwie"
#: src/guiMainMenu.cpp:283
msgid "Singleplayer"
msgstr "Pojedynczy gracz"
#: src/guiMainMenu.cpp:284
msgid "Multiplayer"
msgstr "Gra wieloosobowa"
#: src/guiMainMenu.cpp:285
msgid "Advanced"
msgstr "Zaawansowane"
#: src/guiMainMenu.cpp:286
msgid "Settings"
msgstr "Ustawienia"
#: src/guiMainMenu.cpp:287
msgid "Credits"
msgstr "Autorzy"
#: src/guiMainMenu.cpp:317
msgid "Select World:"
msgstr "Wybierz świat:"
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
msgid "Delete"
msgstr "Skasuj"
#: src/guiMainMenu.cpp:346
msgid "New"
msgstr "Nowy"
#: src/guiMainMenu.cpp:354
msgid "Configure"
msgstr "Ustaw"
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
msgid "Play"
msgstr "Graj"
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
msgid "Creative Mode"
msgstr "Tryb kreatywny"
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
msgid "Enable Damage"
msgstr "Włącz obrażenia"
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
msgid "Name/Password"
msgstr "Nazwa gracza/Hasło"
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
msgid "Favorites:"
msgstr "Ulubione:"
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
msgid "Public Server List:"
msgstr "Lista publicznych serwerów:"
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
msgid "Address/Port"
msgstr "Adres/Port"
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
msgid "Show Public"
msgstr "Pokaż publiczne"
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
msgid "Show Favorites"
msgstr "Pokaż ulubione"
#: src/guiMainMenu.cpp:521
msgid "Connect"
msgstr "Połącz"
#: src/guiMainMenu.cpp:591
msgid "Leave address blank to start a local server."
msgstr "Nie wpisuj adresu by uruchomić lokalny serwer."
#: src/guiMainMenu.cpp:600
msgid "Start Game / Connect"
msgstr "Rozpocznij grę/Połącz"
#: src/guiMainMenu.cpp:632
msgid "Public"
msgstr "Publiczne"
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
msgid "Delete world"
msgstr "Skasuj świat"
#: src/guiMainMenu.cpp:647
msgid "Create world"
msgstr "Stwórz świat"
#: src/guiMainMenu.cpp:681
msgid "Fancy trees"
msgstr "Ozdobne drzewa"
#: src/guiMainMenu.cpp:687
msgid "Smooth Lighting"
msgstr "Płynne oświetlenie"
#: src/guiMainMenu.cpp:693
msgid "3D Clouds"
msgstr "Chmury 3D"
#: src/guiMainMenu.cpp:699
msgid "Opaque water"
msgstr "Nieprzeźroczysta woda"
#: src/guiMainMenu.cpp:709
msgid "Mip-Mapping"
msgstr "Mip-Mappowanie"
#: src/guiMainMenu.cpp:716
msgid "Anisotropic Filtering"
msgstr "Filtrowanie anizotropowe"
#: src/guiMainMenu.cpp:723
msgid "Bi-Linear Filtering"
msgstr "Dwuliniowe filtrowanie"
#: src/guiMainMenu.cpp:730
msgid "Tri-Linear Filtering"
msgstr "Trójliniowe filtrowanie"
#: src/guiMainMenu.cpp:738
msgid "Shaders"
msgstr "Shadery"
#: src/guiMainMenu.cpp:745
msgid "Preload item visuals"
msgstr "Ładuj obrazy przedmiotów"
#: src/guiMainMenu.cpp:752
msgid "Enable Particles"
msgstr "Włącz cząstki"
#: src/guiMainMenu.cpp:759
msgid "Finite liquid"
msgstr "Realistyczne ciecze"
#: src/guiMainMenu.cpp:769
msgid "Change keys"
msgstr "Zmień klawisze"
#: src/guiMainMenu.cpp:1084
msgid "Address required."
msgstr "Wymagany adres."
#: src/guiMainMenu.cpp:1102
msgid "Cannot delete world: Nothing selected"
msgstr "Nie można skasować świata: nic nie zaznaczono"
#: src/guiMainMenu.cpp:1117
msgid "Files to be deleted"
msgstr "Pliki do skasowania"
#: src/guiMainMenu.cpp:1133
msgid "Cannot create world: No games found"
msgstr "Nie można utworzyć świata: Nie znaleziono żadnego trybu gry"
#: src/guiMainMenu.cpp:1149
msgid "Cannot configure world: Nothing selected"
msgstr "Nie można skonfigurować świata: Nic nie zaznaczono"
#: src/guiMainMenu.cpp:1256
msgid "Failed to delete all world files"
msgstr "Nie można skasować wszystkich plików świata"
#: src/guiPasswordChange.cpp:108
msgid "Old Password"
msgstr "Stare hasło"
#: src/guiPasswordChange.cpp:125
msgid "New Password"
msgstr "Nowe hasło"
#: src/guiPasswordChange.cpp:141
msgid "Confirm Password"
msgstr "Potwierdź hasło"
#: src/guiPasswordChange.cpp:158
msgid "Change"
msgstr "Zmień"
#: src/guiPasswordChange.cpp:167
msgid "Passwords do not match!"
msgstr "Hasła nie są jednakowe!"
#: src/guiPauseMenu.cpp:123
msgid "Continue"
msgstr "Dalej"
#: src/guiPauseMenu.cpp:132
msgid "Change Password"
msgstr "Zmień hasło"
#: src/guiPauseMenu.cpp:140
msgid "Sound Volume"
msgstr "Głośność"
#: src/guiPauseMenu.cpp:147
msgid "Exit to Menu"
msgstr "Wyjdź do menu"
#: src/guiPauseMenu.cpp:154
msgid "Exit to OS"
msgstr "Wyjście z gry"
#: src/guiPauseMenu.cpp:161
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""
"Domyślne ustawienia:\n"
"- WASD: poruszanie\n"
"- Lewy przycisk myszki: kop/uderz\n"
"- Prawy przycisk myszki: połóż/użyj\n"
"- Kółko myszki: wybieranie przedmiotu\n"
"- 0...9: wybieranie przedmiotu\n"
"- Shift: skradanie\n"
"- R: przełączanie trybu widoczności\n"
"- I: menu posiadanych przedmiotów\n"
"- ESC: to menu\n"
"- T: Czat\n"
#: src/guiVolumeChange.cpp:108
msgid "Sound Volume: "
msgstr "Głośność: "
#: src/guiVolumeChange.cpp:121
msgid "Exit"
msgstr "Wyjście"
#: src/keycode.cpp:223
msgid "Left Button"
msgstr "Lewy przycisk myszki"
#: src/keycode.cpp:223
msgid "Middle Button"
msgstr "Środkowy przycisk myszki"
#: src/keycode.cpp:223
msgid "Right Button"
msgstr "Prawy przycisk myszki"
#: src/keycode.cpp:223
msgid "X Button 1"
msgstr "X Button 1"
#: src/keycode.cpp:224
msgid "Back"
msgstr "Backspace"
#: src/keycode.cpp:224
msgid "Clear"
msgstr "Delete"
#: src/keycode.cpp:224
msgid "Return"
msgstr "Enter"
#: src/keycode.cpp:224
msgid "Tab"
msgstr "Tab"
#: src/keycode.cpp:224
msgid "X Button 2"
msgstr "X Button 2"
#: src/keycode.cpp:225
msgid "Capital"
msgstr "Caps Lock"
#: src/keycode.cpp:225
msgid "Control"
msgstr "Control"
#: src/keycode.cpp:225
msgid "Kana"
msgstr "Kana"
#: src/keycode.cpp:225
msgid "Menu"
msgstr "Menu"
#: src/keycode.cpp:225
msgid "Pause"
msgstr "Pause"
#: src/keycode.cpp:225
msgid "Shift"
msgstr "Shift"
#: src/keycode.cpp:226
msgid "Convert"
msgstr "Convert"
#: src/keycode.cpp:226
msgid "Escape"
msgstr "Escape"
#: src/keycode.cpp:226
msgid "Final"
msgstr "Final"
#: src/keycode.cpp:226
msgid "Junja"
msgstr "Junja"
#: src/keycode.cpp:226
msgid "Kanji"
msgstr "Kanji"
#: src/keycode.cpp:226
msgid "Nonconvert"
msgstr "Nonconvert"
#: src/keycode.cpp:227
msgid "Accept"
msgstr "Accept"
#: src/keycode.cpp:227
msgid "End"
msgstr "End"
#: src/keycode.cpp:227
msgid "Home"
msgstr "Home"
#: src/keycode.cpp:227
msgid "Mode Change"
msgstr "Mode Change"
#: src/keycode.cpp:227
msgid "Next"
msgstr "Next"
#: src/keycode.cpp:227
msgid "Prior"
msgstr "Prior"
#: src/keycode.cpp:227
msgid "Space"
msgstr "Spacja"
#: src/keycode.cpp:228
msgid "Down"
msgstr "Dół"
#: src/keycode.cpp:228
msgid "Execute"
msgstr "Execute"
#: src/keycode.cpp:228
msgid "Print"
msgstr "Print"
#: src/keycode.cpp:228
msgid "Select"
msgstr "Select"
#: src/keycode.cpp:228
msgid "Up"
msgstr "Góra"
#: src/keycode.cpp:229
msgid "Help"
msgstr "Help"
#: src/keycode.cpp:229
msgid "Insert"
msgstr "Insert"
#: src/keycode.cpp:229
msgid "Snapshot"
msgstr "Snapshot"
#: src/keycode.cpp:232
msgid "Left Windows"
msgstr "Lewy Windows"
#: src/keycode.cpp:233
msgid "Apps"
msgstr "Apps"
#: src/keycode.cpp:233
msgid "Numpad 0"
msgstr "Numpad 0"
#: src/keycode.cpp:233
msgid "Numpad 1"
msgstr "Numpad 1"
#: src/keycode.cpp:233
msgid "Right Windows"
msgstr "Prawy Windows"
#: src/keycode.cpp:233
msgid "Sleep"
msgstr "Sleep"
#: src/keycode.cpp:234
msgid "Numpad 2"
msgstr "Numpad 2"
#: src/keycode.cpp:234
msgid "Numpad 3"
msgstr "Numpad 3"
#: src/keycode.cpp:234
msgid "Numpad 4"
msgstr "Numpad 4"
#: src/keycode.cpp:234
msgid "Numpad 5"
msgstr "Numpad 5"
#: src/keycode.cpp:234
msgid "Numpad 6"
msgstr "Numpad 6"
#: src/keycode.cpp:234
msgid "Numpad 7"
msgstr "Numpad 7"
#: src/keycode.cpp:235
msgid "Numpad *"
msgstr "Numpad *"
#: src/keycode.cpp:235
msgid "Numpad +"
msgstr "Numpad +"
#: src/keycode.cpp:235
msgid "Numpad -"
msgstr "Numpad -"
#: src/keycode.cpp:235
msgid "Numpad /"
msgstr "Numpad /"
#: src/keycode.cpp:235
msgid "Numpad 8"
msgstr "Numpad 8"
#: src/keycode.cpp:235
msgid "Numpad 9"
msgstr "Numpad 9"
#: src/keycode.cpp:239
msgid "Num Lock"
msgstr "Num Lock"
#: src/keycode.cpp:239
msgid "Scroll Lock"
msgstr "Scroll Lock"
#: src/keycode.cpp:240
msgid "Left Shift"
msgstr "Lewy Shift"
#: src/keycode.cpp:240
msgid "Right Shift"
msgstr "Prawy Shift"
#: src/keycode.cpp:241
msgid "Left Control"
msgstr "Lewy Control"
#: src/keycode.cpp:241
msgid "Left Menu"
msgstr "Lewy Menu"
#: src/keycode.cpp:241
msgid "Right Control"
msgstr "Prawy Control"
#: src/keycode.cpp:241
msgid "Right Menu"
msgstr "Prawy Menu"
#: src/keycode.cpp:243
msgid "Comma"
msgstr "Przecinek"
#: src/keycode.cpp:243
msgid "Minus"
msgstr "Minus"
#: src/keycode.cpp:243
msgid "Period"
msgstr "Kropka"
#: src/keycode.cpp:243
msgid "Plus"
msgstr "Plus"
#: src/keycode.cpp:247
msgid "Attn"
msgstr "Attn"
#: src/keycode.cpp:247
msgid "CrSel"
msgstr "CrSel"
#: src/keycode.cpp:248
msgid "Erase OEF"
msgstr "Erase OEF"
#: src/keycode.cpp:248
msgid "ExSel"
msgstr "ExSel"
#: src/keycode.cpp:248
msgid "OEM Clear"
msgstr "OEM Clear"
#: src/keycode.cpp:248
msgid "PA1"
msgstr "PA1"
#: src/keycode.cpp:248
msgid "Zoom"
msgstr "Zoom"
#: src/main.cpp:1506
msgid "Main Menu"
msgstr "Menu główne"
#: src/main.cpp:1830
msgid "Failed to initialize world"
msgstr "Inicjalizacja świata nie powiodła się"
#: src/main.cpp:1842
msgid "No world selected and no address provided. Nothing to do."
msgstr "Nie wybrano świata ani adresu."
#: src/main.cpp:1850
msgid "Could not find or load game \""
msgstr "Nie można znaleźć lub wczytać trybu gry \""
#: src/main.cpp:1864
msgid "Invalid gamespec."
msgstr "Nieprawidłowa specyfikacja trybu gry."
#: src/main.cpp:1904
msgid "Connection error (timed out?)"
msgstr "Błąd połączenia (brak odpowiedzi?)"
#: src/main.cpp:1915
msgid ""
"\n"
"Check debug.txt for details."
msgstr ""
"\n"
"Sprawdź plik debug.txt by uzyskać więcej informacji."

776
po/pt/minetest.po Normal file
View File

@@ -0,0 +1,776 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
"PO-Revision-Date: 2013-04-03 16:35+0200\n"
"Last-Translator: Dêivan Ortiz Munhoz <deivan@novoseusadosinformatica.com.br>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Weblate 1.4-dev\n"
#: src/guiConfigureWorld.cpp:125
msgid ""
"Warning: Some mods are not configured yet.\n"
"They will be enabled by default when you save the configuration. "
msgstr ""
"Alerta: Alguns mods ainda não estão configurados.\n"
"Eles vão ser ativos por predefinição quando guardar a configuração. "
#: src/guiConfigureWorld.cpp:144
msgid ""
"Warning: Some configured mods are missing.\n"
"Their setting will be removed when you save the configuration. "
msgstr ""
"Alerta: Alguns mods configurados estão em falta.\n"
"As definições vão ser removidas quando gravar a configuração. "
#: src/guiConfigureWorld.cpp:208
msgid "enabled"
msgstr "ativo"
#: src/guiConfigureWorld.cpp:215
msgid "Enable All"
msgstr "Ativar Tudo"
#: src/guiConfigureWorld.cpp:222
msgid "Disable All"
msgstr "Desativar Tudo"
#: src/guiConfigureWorld.cpp:228
msgid "depends on:"
msgstr "depende de:"
#: src/guiConfigureWorld.cpp:240
msgid "is required by:"
msgstr "é necessário pelo:"
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
msgid "Cancel"
msgstr "Cancelar"
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
msgid "Save"
msgstr "Guardar"
#: src/guiConfigureWorld.cpp:394
msgid "Configuration saved. "
msgstr "Configuração gravada. "
#: src/guiConfigureWorld.cpp:402
msgid "Warning: Configuration not consistent. "
msgstr "Alerta: Configuração não compativel. "
#: src/guiConfirmMenu.cpp:120
msgid "Yes"
msgstr "Sim"
#: src/guiConfirmMenu.cpp:126
msgid "No"
msgstr "Não"
#: src/guiCreateWorld.cpp:116
msgid "World name"
msgstr "Nome do Mundo"
#: src/guiCreateWorld.cpp:135
msgid "Game"
msgstr "Jogo"
#: src/guiCreateWorld.cpp:159
msgid "Create"
msgstr "Criar"
#: src/guiDeathScreen.cpp:96
msgid "You died."
msgstr "Estás morto."
#: src/guiDeathScreen.cpp:104
msgid "Respawn"
msgstr "Renascer"
#: src/guiFormSpecMenu.cpp:582
msgid "Left click: Move all items, Right click: Move single item"
msgstr "Botão esq.: Mover todos os items, Botão dir.: Mover um item"
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
#: src/guiTextInputMenu.cpp:131
msgid "Proceed"
msgstr "Continuar"
#: src/guiKeyChangeMenu.cpp:114
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
msgstr "Teclas. (Se este menu estragar-se, remova as linhas do minetest.conf)"
#: src/guiKeyChangeMenu.cpp:151
msgid "\"Use\" = climb down"
msgstr "\"Use\" = ir para baixo"
#: src/guiKeyChangeMenu.cpp:164
msgid "Double tap \"jump\" to toggle fly"
msgstr "Duas vezes \"saltar\" para ativar vôo"
#: src/guiKeyChangeMenu.cpp:269
msgid "Key already in use"
msgstr "Tecla já em uso"
#: src/guiKeyChangeMenu.cpp:347
msgid "press key"
msgstr "pressione tecla"
#: src/guiKeyChangeMenu.cpp:372
msgid "Forward"
msgstr "Avançar"
#: src/guiKeyChangeMenu.cpp:373
msgid "Backward"
msgstr "Para trás"
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
msgid "Left"
msgstr "Esquerda"
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
msgid "Right"
msgstr "Direita"
#: src/guiKeyChangeMenu.cpp:376
msgid "Use"
msgstr "Usar"
#: src/guiKeyChangeMenu.cpp:377
msgid "Jump"
msgstr "Saltar"
#: src/guiKeyChangeMenu.cpp:378
msgid "Sneak"
msgstr "Agachar"
#: src/guiKeyChangeMenu.cpp:379
msgid "Drop"
msgstr "Dropar"
#: src/guiKeyChangeMenu.cpp:380
msgid "Inventory"
msgstr "Inventário"
#: src/guiKeyChangeMenu.cpp:381
msgid "Chat"
msgstr "CHAT"
#: src/guiKeyChangeMenu.cpp:382
msgid "Command"
msgstr "Comando"
#: src/guiKeyChangeMenu.cpp:383
msgid "Console"
msgstr "Consola"
#: src/guiKeyChangeMenu.cpp:384
msgid "Toggle fly"
msgstr "Ativar vôo"
#: src/guiKeyChangeMenu.cpp:385
msgid "Toggle fast"
msgstr "Ativar correr"
#: src/guiKeyChangeMenu.cpp:386
msgid "Toggle noclip"
msgstr "Ativar noclip"
#: src/guiKeyChangeMenu.cpp:387
msgid "Range select"
msgstr "Seleccionar Distância"
#: src/guiKeyChangeMenu.cpp:388
msgid "Print stacks"
msgstr "Imprimir stacks"
#: src/guiMainMenu.cpp:92
msgid "Cannot create world: Name contains invalid characters"
msgstr "Não foi possível criar mundo: Nome com carácteres inválidos"
#: src/guiMainMenu.cpp:101
msgid "Cannot create world: A world by this name already exists"
msgstr "Não foi possivel criar mundo: Mundo com este nome já existente"
#: src/guiMainMenu.cpp:283
msgid "Singleplayer"
msgstr "Um Jogador"
#: src/guiMainMenu.cpp:284
msgid "Multiplayer"
msgstr "Multijogador"
#: src/guiMainMenu.cpp:285
msgid "Advanced"
msgstr "Avançado"
#: src/guiMainMenu.cpp:286
msgid "Settings"
msgstr "Definições"
#: src/guiMainMenu.cpp:287
msgid "Credits"
msgstr "Créditos"
#: src/guiMainMenu.cpp:317
msgid "Select World:"
msgstr "Seleccionar Mundo:"
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
msgid "Delete"
msgstr "Eliminar"
#: src/guiMainMenu.cpp:346
msgid "New"
msgstr "Novo"
#: src/guiMainMenu.cpp:354
msgid "Configure"
msgstr "Configurar"
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
msgid "Play"
msgstr "Jogar"
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
msgid "Creative Mode"
msgstr "Modo Criativo"
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
msgid "Enable Damage"
msgstr "Ativar Dano"
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
msgid "Name/Password"
msgstr "Nome/Senha"
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
msgid "Favorites:"
msgstr "Favoritos:"
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
msgid "Public Server List:"
msgstr "Lista de servidor públicos:"
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
msgid "Address/Port"
msgstr "Endereço/Porta"
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
msgid "Show Public"
msgstr "Mostrar Públicos"
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
msgid "Show Favorites"
msgstr "Mostrar Favoritos"
#: src/guiMainMenu.cpp:521
msgid "Connect"
msgstr "Conectar"
#: src/guiMainMenu.cpp:591
msgid "Leave address blank to start a local server."
msgstr "Deixe endereço em branco para iniciar servidor local."
#: src/guiMainMenu.cpp:600
msgid "Start Game / Connect"
msgstr "Iniciar Jogo / Conectar"
#: src/guiMainMenu.cpp:632
msgid "Public"
msgstr "Público"
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
msgid "Delete world"
msgstr "Eliminar mundo"
#: src/guiMainMenu.cpp:647
msgid "Create world"
msgstr "Criar mundo"
#: src/guiMainMenu.cpp:681
msgid "Fancy trees"
msgstr "Árvores Melhoradas"
#: src/guiMainMenu.cpp:687
msgid "Smooth Lighting"
msgstr "Iluminação Suave"
#: src/guiMainMenu.cpp:693
msgid "3D Clouds"
msgstr "Nuvens 3D"
#: src/guiMainMenu.cpp:699
msgid "Opaque water"
msgstr "Água Opaca"
#: src/guiMainMenu.cpp:709
msgid "Mip-Mapping"
msgstr "Mip-Mapping"
#: src/guiMainMenu.cpp:716
msgid "Anisotropic Filtering"
msgstr "Filtro Anisotropico"
#: src/guiMainMenu.cpp:723
msgid "Bi-Linear Filtering"
msgstr "Filtro Bi-Linear"
#: src/guiMainMenu.cpp:730
msgid "Tri-Linear Filtering"
msgstr "Filtro Tri-Linear"
#: src/guiMainMenu.cpp:738
msgid "Shaders"
msgstr "Sombras"
#: src/guiMainMenu.cpp:745
msgid "Preload item visuals"
msgstr "Precarregamento dos items"
#: src/guiMainMenu.cpp:752
msgid "Enable Particles"
msgstr "Ativar Particulas"
#: src/guiMainMenu.cpp:759
msgid "Finite liquid"
msgstr "Líquido finito"
#: src/guiMainMenu.cpp:769
msgid "Change keys"
msgstr "Mudar teclas"
#: src/guiMainMenu.cpp:1084
msgid "Address required."
msgstr "Endereço necessário."
#: src/guiMainMenu.cpp:1102
msgid "Cannot delete world: Nothing selected"
msgstr "Não foi possível eliminar mundo: Nada seleccionado"
#: src/guiMainMenu.cpp:1117
msgid "Files to be deleted"
msgstr "Ficheiros para eliminar"
#: src/guiMainMenu.cpp:1133
msgid "Cannot create world: No games found"
msgstr "Não foi possivel criar mundo: Jogos não detectados"
#: src/guiMainMenu.cpp:1149
msgid "Cannot configure world: Nothing selected"
msgstr "Não foi possivel configurar mundo: Nada seleccionado"
#: src/guiMainMenu.cpp:1256
msgid "Failed to delete all world files"
msgstr "Remoção dos ficheiros dos mundos falhada"
#: src/guiPasswordChange.cpp:108
msgid "Old Password"
msgstr "Senha antiga"
#: src/guiPasswordChange.cpp:125
msgid "New Password"
msgstr "Senha Nova"
#: src/guiPasswordChange.cpp:141
msgid "Confirm Password"
msgstr "Confirmar Senha"
#: src/guiPasswordChange.cpp:158
msgid "Change"
msgstr "Mudar"
#: src/guiPasswordChange.cpp:167
msgid "Passwords do not match!"
msgstr "Senhas não correspondem!"
#: src/guiPauseMenu.cpp:123
msgid "Continue"
msgstr "Continuar"
#: src/guiPauseMenu.cpp:132
msgid "Change Password"
msgstr "Mudar Senha"
#: src/guiPauseMenu.cpp:140
msgid "Sound Volume"
msgstr "Volume do som"
#: src/guiPauseMenu.cpp:147
msgid "Exit to Menu"
msgstr "Sair para Menu"
#: src/guiPauseMenu.cpp:154
msgid "Exit to OS"
msgstr "Sair para SO"
#: src/guiPauseMenu.cpp:161
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""
"Controlos Normais:\n"
"- WASD: Andar\n"
"- Botão esq.: partir/atacar\n"
"- Botão dir.: colocar/usar\n"
"- Roda do Rato: seleccionar item\n"
"- 0...9: seleccionar item\n"
"- Shift: agachar\n"
"- R: Mudar visualização de todos os chunks\n"
"- I: Inventário\n"
"- ESC: Este menu\n"
"- T: Chat\n"
#: src/guiVolumeChange.cpp:108
msgid "Sound Volume: "
msgstr "Volume do som: "
#: src/guiVolumeChange.cpp:121
msgid "Exit"
msgstr "Saida"
#: src/keycode.cpp:223
msgid "Left Button"
msgstr "Botão Esquerdo"
#: src/keycode.cpp:223
msgid "Middle Button"
msgstr "Roda do Rato"
#: src/keycode.cpp:223
msgid "Right Button"
msgstr "Botão Direito"
#: src/keycode.cpp:223
msgid "X Button 1"
msgstr "Botão X 1"
#: src/keycode.cpp:224
msgid "Back"
msgstr "Voltar"
#: src/keycode.cpp:224
msgid "Clear"
msgstr "Limpar"
#: src/keycode.cpp:224
msgid "Return"
msgstr "Enter"
#: src/keycode.cpp:224
msgid "Tab"
msgstr "Tabulação"
#: src/keycode.cpp:224
msgid "X Button 2"
msgstr "Botão X 2"
#: src/keycode.cpp:225
msgid "Capital"
msgstr "Capital"
#: src/keycode.cpp:225
msgid "Control"
msgstr "Control"
#: src/keycode.cpp:225
msgid "Kana"
msgstr "Kana"
#: src/keycode.cpp:225
msgid "Menu"
msgstr "Menu"
#: src/keycode.cpp:225
msgid "Pause"
msgstr "Pausa"
#: src/keycode.cpp:225
msgid "Shift"
msgstr "SHIFT"
#: src/keycode.cpp:226
msgid "Convert"
msgstr "Converter"
#: src/keycode.cpp:226
msgid "Escape"
msgstr "ESC"
#: src/keycode.cpp:226
msgid "Final"
msgstr "Final"
#: src/keycode.cpp:226
msgid "Junja"
msgstr "Junja"
#: src/keycode.cpp:226
msgid "Kanji"
msgstr "Kanji"
#: src/keycode.cpp:226
msgid "Nonconvert"
msgstr "Nãoconverter"
#: src/keycode.cpp:227
msgid "Accept"
msgstr "Aceitar"
#: src/keycode.cpp:227
msgid "End"
msgstr "END"
#: src/keycode.cpp:227
msgid "Home"
msgstr "HOME"
#: src/keycode.cpp:227
msgid "Mode Change"
msgstr "MODE Change"
#: src/keycode.cpp:227
msgid "Next"
msgstr "Próximo"
#: src/keycode.cpp:227
msgid "Prior"
msgstr "Prévio"
#: src/keycode.cpp:227
msgid "Space"
msgstr "Espaço"
#: src/keycode.cpp:228
msgid "Down"
msgstr "Baixo"
#: src/keycode.cpp:228
msgid "Execute"
msgstr "Executar"
#: src/keycode.cpp:228
msgid "Print"
msgstr "PRINT"
#: src/keycode.cpp:228
msgid "Select"
msgstr "Seleccionar"
#: src/keycode.cpp:228
msgid "Up"
msgstr "Cima"
#: src/keycode.cpp:229
msgid "Help"
msgstr "Ajuda"
#: src/keycode.cpp:229
msgid "Insert"
msgstr "INSERT"
#: src/keycode.cpp:229
msgid "Snapshot"
msgstr "Screenshot"
#: src/keycode.cpp:232
msgid "Left Windows"
msgstr "WINDOWS Esq."
#: src/keycode.cpp:233
msgid "Apps"
msgstr "App"
#: src/keycode.cpp:233
msgid "Numpad 0"
msgstr "Numpad 0"
#: src/keycode.cpp:233
msgid "Numpad 1"
msgstr "Numpad 1"
#: src/keycode.cpp:233
msgid "Right Windows"
msgstr "WINDOWS Dir."
#: src/keycode.cpp:233
msgid "Sleep"
msgstr "Suspender"
#: src/keycode.cpp:234
msgid "Numpad 2"
msgstr "Numpad 2"
#: src/keycode.cpp:234
msgid "Numpad 3"
msgstr "Numpad 3"
#: src/keycode.cpp:234
msgid "Numpad 4"
msgstr "Numpad 4"
#: src/keycode.cpp:234
msgid "Numpad 5"
msgstr "Numpad 5"
#: src/keycode.cpp:234
msgid "Numpad 6"
msgstr "Numpad 6"
#: src/keycode.cpp:234
msgid "Numpad 7"
msgstr "Numpad 7"
#: src/keycode.cpp:235
msgid "Numpad *"
msgstr "Numpad *"
#: src/keycode.cpp:235
msgid "Numpad +"
msgstr "Numpad +"
#: src/keycode.cpp:235
msgid "Numpad -"
msgstr "Numpad -"
#: src/keycode.cpp:235
msgid "Numpad /"
msgstr "Numpad /"
#: src/keycode.cpp:235
msgid "Numpad 8"
msgstr "Numpad 8"
#: src/keycode.cpp:235
msgid "Numpad 9"
msgstr "Numpad 9"
#: src/keycode.cpp:239
msgid "Num Lock"
msgstr "Num Lock"
#: src/keycode.cpp:239
msgid "Scroll Lock"
msgstr "Scroll Lock"
#: src/keycode.cpp:240
msgid "Left Shift"
msgstr "Shift Esquerdo"
#: src/keycode.cpp:240
msgid "Right Shift"
msgstr "Shift Direito"
#: src/keycode.cpp:241
msgid "Left Control"
msgstr "Control Esq"
#: src/keycode.cpp:241
msgid "Left Menu"
msgstr "Menu Esquerdo"
#: src/keycode.cpp:241
msgid "Right Control"
msgstr "Control Direito"
#: src/keycode.cpp:241
msgid "Right Menu"
msgstr "Menu Direito"
#: src/keycode.cpp:243
msgid "Comma"
msgstr "Virgula"
#: src/keycode.cpp:243
msgid "Minus"
msgstr "Menos"
#: src/keycode.cpp:243
msgid "Period"
msgstr "Período"
#: src/keycode.cpp:243
msgid "Plus"
msgstr "Mais"
#: src/keycode.cpp:247
msgid "Attn"
msgstr "Attm"
#: src/keycode.cpp:247
msgid "CrSel"
msgstr "CrSel"
#: src/keycode.cpp:248
msgid "Erase OEF"
msgstr "Apagar OEF"
#: src/keycode.cpp:248
msgid "ExSel"
msgstr "ExSel"
#: src/keycode.cpp:248
msgid "OEM Clear"
msgstr "Limpar OEM"
#: src/keycode.cpp:248
msgid "PA1"
msgstr "PAL"
#: src/keycode.cpp:248
msgid "Zoom"
msgstr "Zoom"
#: src/main.cpp:1506
msgid "Main Menu"
msgstr "Menu Principal"
#: src/main.cpp:1830
msgid "Failed to initialize world"
msgstr "Falha ao iniciar mundo"
#: src/main.cpp:1842
msgid "No world selected and no address provided. Nothing to do."
msgstr ""
"Nenhum mundo seleccionado e nenhum endereço providenciado. Nada para fazer."
#: src/main.cpp:1850
msgid "Could not find or load game \""
msgstr "Não foi possível encontrar ou carregar jogo \""
#: src/main.cpp:1864
msgid "Invalid gamespec."
msgstr "gamespec inválido."
#: src/main.cpp:1904
msgid "Connection error (timed out?)"
msgstr "Erro de conexão (excedeu tempo?)"
#: src/main.cpp:1915
msgid ""
"\n"
"Check debug.txt for details."
msgstr ""
"\n"
"Verifique debug.txt para mais detalhes."

757
po/ro/minetest.po Normal file
View File

@@ -0,0 +1,757 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/guiConfigureWorld.cpp:125
msgid ""
"Warning: Some mods are not configured yet.\n"
"They will be enabled by default when you save the configuration. "
msgstr ""
#: src/guiConfigureWorld.cpp:144
msgid ""
"Warning: Some configured mods are missing.\n"
"Their setting will be removed when you save the configuration. "
msgstr ""
#: src/guiConfigureWorld.cpp:208
msgid "enabled"
msgstr ""
#: src/guiConfigureWorld.cpp:215
msgid "Enable All"
msgstr ""
#: src/guiConfigureWorld.cpp:222
msgid "Disable All"
msgstr ""
#: src/guiConfigureWorld.cpp:228
msgid "depends on:"
msgstr ""
#: src/guiConfigureWorld.cpp:240
msgid "is required by:"
msgstr ""
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
msgid "Cancel"
msgstr ""
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
msgid "Save"
msgstr ""
#: src/guiConfigureWorld.cpp:394
msgid "Configuration saved. "
msgstr ""
#: src/guiConfigureWorld.cpp:402
msgid "Warning: Configuration not consistent. "
msgstr ""
#: src/guiConfirmMenu.cpp:120
msgid "Yes"
msgstr ""
#: src/guiConfirmMenu.cpp:126
msgid "No"
msgstr ""
#: src/guiCreateWorld.cpp:116
msgid "World name"
msgstr ""
#: src/guiCreateWorld.cpp:135
msgid "Game"
msgstr ""
#: src/guiCreateWorld.cpp:159
msgid "Create"
msgstr ""
#: src/guiDeathScreen.cpp:96
msgid "You died."
msgstr ""
#: src/guiDeathScreen.cpp:104
msgid "Respawn"
msgstr ""
#: src/guiFormSpecMenu.cpp:582
msgid "Left click: Move all items, Right click: Move single item"
msgstr ""
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
#: src/guiTextInputMenu.cpp:131
msgid "Proceed"
msgstr ""
#: src/guiKeyChangeMenu.cpp:114
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
msgstr ""
#: src/guiKeyChangeMenu.cpp:151
msgid "\"Use\" = climb down"
msgstr ""
#: src/guiKeyChangeMenu.cpp:164
msgid "Double tap \"jump\" to toggle fly"
msgstr ""
#: src/guiKeyChangeMenu.cpp:269
msgid "Key already in use"
msgstr ""
#: src/guiKeyChangeMenu.cpp:347
msgid "press key"
msgstr ""
#: src/guiKeyChangeMenu.cpp:372
msgid "Forward"
msgstr ""
#: src/guiKeyChangeMenu.cpp:373
msgid "Backward"
msgstr ""
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
msgid "Left"
msgstr ""
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
msgid "Right"
msgstr ""
#: src/guiKeyChangeMenu.cpp:376
msgid "Use"
msgstr ""
#: src/guiKeyChangeMenu.cpp:377
msgid "Jump"
msgstr ""
#: src/guiKeyChangeMenu.cpp:378
msgid "Sneak"
msgstr ""
#: src/guiKeyChangeMenu.cpp:379
msgid "Drop"
msgstr ""
#: src/guiKeyChangeMenu.cpp:380
msgid "Inventory"
msgstr ""
#: src/guiKeyChangeMenu.cpp:381
msgid "Chat"
msgstr ""
#: src/guiKeyChangeMenu.cpp:382
msgid "Command"
msgstr ""
#: src/guiKeyChangeMenu.cpp:383
msgid "Console"
msgstr ""
#: src/guiKeyChangeMenu.cpp:384
msgid "Toggle fly"
msgstr ""
#: src/guiKeyChangeMenu.cpp:385
msgid "Toggle fast"
msgstr ""
#: src/guiKeyChangeMenu.cpp:386
msgid "Toggle noclip"
msgstr ""
#: src/guiKeyChangeMenu.cpp:387
msgid "Range select"
msgstr ""
#: src/guiKeyChangeMenu.cpp:388
msgid "Print stacks"
msgstr ""
#: src/guiMainMenu.cpp:92
msgid "Cannot create world: Name contains invalid characters"
msgstr ""
#: src/guiMainMenu.cpp:101
msgid "Cannot create world: A world by this name already exists"
msgstr ""
#: src/guiMainMenu.cpp:283
msgid "Singleplayer"
msgstr ""
#: src/guiMainMenu.cpp:284
msgid "Multiplayer"
msgstr ""
#: src/guiMainMenu.cpp:285
msgid "Advanced"
msgstr ""
#: src/guiMainMenu.cpp:286
msgid "Settings"
msgstr ""
#: src/guiMainMenu.cpp:287
msgid "Credits"
msgstr ""
#: src/guiMainMenu.cpp:317
msgid "Select World:"
msgstr ""
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
msgid "Delete"
msgstr ""
#: src/guiMainMenu.cpp:346
msgid "New"
msgstr ""
#: src/guiMainMenu.cpp:354
msgid "Configure"
msgstr ""
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
msgid "Play"
msgstr ""
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
msgid "Creative Mode"
msgstr ""
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
msgid "Enable Damage"
msgstr ""
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
msgid "Name/Password"
msgstr ""
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
msgid "Favorites:"
msgstr ""
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
msgid "Public Server List:"
msgstr ""
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
msgid "Address/Port"
msgstr ""
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
msgid "Show Public"
msgstr ""
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
msgid "Show Favorites"
msgstr ""
#: src/guiMainMenu.cpp:521
msgid "Connect"
msgstr ""
#: src/guiMainMenu.cpp:591
msgid "Leave address blank to start a local server."
msgstr ""
#: src/guiMainMenu.cpp:600
msgid "Start Game / Connect"
msgstr ""
#: src/guiMainMenu.cpp:632
msgid "Public"
msgstr ""
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
msgid "Delete world"
msgstr ""
#: src/guiMainMenu.cpp:647
msgid "Create world"
msgstr ""
#: src/guiMainMenu.cpp:681
msgid "Fancy trees"
msgstr ""
#: src/guiMainMenu.cpp:687
msgid "Smooth Lighting"
msgstr ""
#: src/guiMainMenu.cpp:693
msgid "3D Clouds"
msgstr ""
#: src/guiMainMenu.cpp:699
msgid "Opaque water"
msgstr ""
#: src/guiMainMenu.cpp:709
msgid "Mip-Mapping"
msgstr ""
#: src/guiMainMenu.cpp:716
msgid "Anisotropic Filtering"
msgstr ""
#: src/guiMainMenu.cpp:723
msgid "Bi-Linear Filtering"
msgstr ""
#: src/guiMainMenu.cpp:730
msgid "Tri-Linear Filtering"
msgstr ""
#: src/guiMainMenu.cpp:738
msgid "Shaders"
msgstr ""
#: src/guiMainMenu.cpp:745
msgid "Preload item visuals"
msgstr ""
#: src/guiMainMenu.cpp:752
msgid "Enable Particles"
msgstr ""
#: src/guiMainMenu.cpp:759
msgid "Finite liquid"
msgstr ""
#: src/guiMainMenu.cpp:769
msgid "Change keys"
msgstr ""
#: src/guiMainMenu.cpp:1084
msgid "Address required."
msgstr ""
#: src/guiMainMenu.cpp:1102
msgid "Cannot delete world: Nothing selected"
msgstr ""
#: src/guiMainMenu.cpp:1117
msgid "Files to be deleted"
msgstr ""
#: src/guiMainMenu.cpp:1133
msgid "Cannot create world: No games found"
msgstr ""
#: src/guiMainMenu.cpp:1149
msgid "Cannot configure world: Nothing selected"
msgstr ""
#: src/guiMainMenu.cpp:1256
msgid "Failed to delete all world files"
msgstr ""
#: src/guiPasswordChange.cpp:108
msgid "Old Password"
msgstr ""
#: src/guiPasswordChange.cpp:125
msgid "New Password"
msgstr ""
#: src/guiPasswordChange.cpp:141
msgid "Confirm Password"
msgstr ""
#: src/guiPasswordChange.cpp:158
msgid "Change"
msgstr ""
#: src/guiPasswordChange.cpp:167
msgid "Passwords do not match!"
msgstr ""
#: src/guiPauseMenu.cpp:123
msgid "Continue"
msgstr ""
#: src/guiPauseMenu.cpp:132
msgid "Change Password"
msgstr ""
#: src/guiPauseMenu.cpp:140
msgid "Sound Volume"
msgstr ""
#: src/guiPauseMenu.cpp:147
msgid "Exit to Menu"
msgstr ""
#: src/guiPauseMenu.cpp:154
msgid "Exit to OS"
msgstr ""
#: src/guiPauseMenu.cpp:161
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""
#: src/guiVolumeChange.cpp:108
msgid "Sound Volume: "
msgstr ""
#: src/guiVolumeChange.cpp:121
msgid "Exit"
msgstr ""
#: src/keycode.cpp:223
msgid "Left Button"
msgstr ""
#: src/keycode.cpp:223
msgid "Middle Button"
msgstr ""
#: src/keycode.cpp:223
msgid "Right Button"
msgstr ""
#: src/keycode.cpp:223
msgid "X Button 1"
msgstr ""
#: src/keycode.cpp:224
msgid "Back"
msgstr ""
#: src/keycode.cpp:224
msgid "Clear"
msgstr ""
#: src/keycode.cpp:224
msgid "Return"
msgstr ""
#: src/keycode.cpp:224
msgid "Tab"
msgstr ""
#: src/keycode.cpp:224
msgid "X Button 2"
msgstr ""
#: src/keycode.cpp:225
msgid "Capital"
msgstr ""
#: src/keycode.cpp:225
msgid "Control"
msgstr ""
#: src/keycode.cpp:225
msgid "Kana"
msgstr ""
#: src/keycode.cpp:225
msgid "Menu"
msgstr ""
#: src/keycode.cpp:225
msgid "Pause"
msgstr ""
#: src/keycode.cpp:225
msgid "Shift"
msgstr ""
#: src/keycode.cpp:226
msgid "Convert"
msgstr ""
#: src/keycode.cpp:226
msgid "Escape"
msgstr ""
#: src/keycode.cpp:226
msgid "Final"
msgstr ""
#: src/keycode.cpp:226
msgid "Junja"
msgstr ""
#: src/keycode.cpp:226
msgid "Kanji"
msgstr ""
#: src/keycode.cpp:226
msgid "Nonconvert"
msgstr ""
#: src/keycode.cpp:227
msgid "Accept"
msgstr ""
#: src/keycode.cpp:227
msgid "End"
msgstr ""
#: src/keycode.cpp:227
msgid "Home"
msgstr ""
#: src/keycode.cpp:227
msgid "Mode Change"
msgstr ""
#: src/keycode.cpp:227
msgid "Next"
msgstr ""
#: src/keycode.cpp:227
msgid "Prior"
msgstr ""
#: src/keycode.cpp:227
msgid "Space"
msgstr ""
#: src/keycode.cpp:228
msgid "Down"
msgstr ""
#: src/keycode.cpp:228
msgid "Execute"
msgstr ""
#: src/keycode.cpp:228
msgid "Print"
msgstr ""
#: src/keycode.cpp:228
msgid "Select"
msgstr ""
#: src/keycode.cpp:228
msgid "Up"
msgstr ""
#: src/keycode.cpp:229
msgid "Help"
msgstr ""
#: src/keycode.cpp:229
msgid "Insert"
msgstr ""
#: src/keycode.cpp:229
msgid "Snapshot"
msgstr ""
#: src/keycode.cpp:232
msgid "Left Windows"
msgstr ""
#: src/keycode.cpp:233
msgid "Apps"
msgstr ""
#: src/keycode.cpp:233
msgid "Numpad 0"
msgstr ""
#: src/keycode.cpp:233
msgid "Numpad 1"
msgstr ""
#: src/keycode.cpp:233
msgid "Right Windows"
msgstr ""
#: src/keycode.cpp:233
msgid "Sleep"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 2"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 3"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 4"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 5"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 6"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 7"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad *"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad +"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad -"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad /"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad 8"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad 9"
msgstr ""
#: src/keycode.cpp:239
msgid "Num Lock"
msgstr ""
#: src/keycode.cpp:239
msgid "Scroll Lock"
msgstr ""
#: src/keycode.cpp:240
msgid "Left Shift"
msgstr ""
#: src/keycode.cpp:240
msgid "Right Shift"
msgstr ""
#: src/keycode.cpp:241
msgid "Left Control"
msgstr ""
#: src/keycode.cpp:241
msgid "Left Menu"
msgstr ""
#: src/keycode.cpp:241
msgid "Right Control"
msgstr ""
#: src/keycode.cpp:241
msgid "Right Menu"
msgstr ""
#: src/keycode.cpp:243
msgid "Comma"
msgstr ""
#: src/keycode.cpp:243
msgid "Minus"
msgstr ""
#: src/keycode.cpp:243
msgid "Period"
msgstr ""
#: src/keycode.cpp:243
msgid "Plus"
msgstr ""
#: src/keycode.cpp:247
msgid "Attn"
msgstr ""
#: src/keycode.cpp:247
msgid "CrSel"
msgstr ""
#: src/keycode.cpp:248
msgid "Erase OEF"
msgstr ""
#: src/keycode.cpp:248
msgid "ExSel"
msgstr ""
#: src/keycode.cpp:248
msgid "OEM Clear"
msgstr ""
#: src/keycode.cpp:248
msgid "PA1"
msgstr ""
#: src/keycode.cpp:248
msgid "Zoom"
msgstr ""
#: src/main.cpp:1506
msgid "Main Menu"
msgstr ""
#: src/main.cpp:1830
msgid "Failed to initialize world"
msgstr ""
#: src/main.cpp:1842
msgid "No world selected and no address provided. Nothing to do."
msgstr ""
#: src/main.cpp:1850
msgid "Could not find or load game \""
msgstr ""
#: src/main.cpp:1864
msgid "Invalid gamespec."
msgstr ""
#: src/main.cpp:1904
msgid "Connection error (timed out?)"
msgstr ""
#: src/main.cpp:1915
msgid ""
"\n"
"Check debug.txt for details."
msgstr ""

796
po/ru/minetest.po Normal file
View File

@@ -0,0 +1,796 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
"PO-Revision-Date: 2013-03-28 15:29+0200\n"
"Last-Translator: Anton Tsyganenko <anton-tsyganenko@yandex.ru>\n"
"Language-Team: Russian\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Weblate 1.4-dev\n"
#: src/guiConfigureWorld.cpp:125
msgid ""
"Warning: Some mods are not configured yet.\n"
"They will be enabled by default when you save the configuration. "
msgstr ""
"Предупреждение: Некоторые моды еще не настроены.\n"
"Они будут включены, когда вы сохраните конфигурацию. "
#: src/guiConfigureWorld.cpp:144
msgid ""
"Warning: Some configured mods are missing.\n"
"Their setting will be removed when you save the configuration. "
msgstr ""
"Предупреждение: Некоторые моды не найдены.\n"
"Их настройки будут удалены, когда вы сохраните конфигурацию. "
#: src/guiConfigureWorld.cpp:208
msgid "enabled"
msgstr "включено"
#: src/guiConfigureWorld.cpp:215
msgid "Enable All"
msgstr "Включить всё"
#: src/guiConfigureWorld.cpp:222
msgid "Disable All"
msgstr "Отключить всё"
#: src/guiConfigureWorld.cpp:228
msgid "depends on:"
msgstr "зависит от:"
#: src/guiConfigureWorld.cpp:240
msgid "is required by:"
msgstr "требуется для:"
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
msgid "Cancel"
msgstr "Отменить"
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
msgid "Save"
msgstr "Сохранить"
#: src/guiConfigureWorld.cpp:394
msgid "Configuration saved. "
msgstr "Настройки сохранены. "
#: src/guiConfigureWorld.cpp:402
msgid "Warning: Configuration not consistent. "
msgstr "Предупреждение: Неверная конфигурация. "
#: src/guiConfirmMenu.cpp:120
msgid "Yes"
msgstr "Да"
#: src/guiConfirmMenu.cpp:126
msgid "No"
msgstr "Нет"
#: src/guiCreateWorld.cpp:116
msgid "World name"
msgstr "Название мира"
#: src/guiCreateWorld.cpp:135
msgid "Game"
msgstr "Игра"
#: src/guiCreateWorld.cpp:159
msgid "Create"
msgstr "Создать"
#: src/guiDeathScreen.cpp:96
msgid "You died."
msgstr "Вы умерли."
#: src/guiDeathScreen.cpp:104
msgid "Respawn"
msgstr "Воскреснуть"
#: src/guiFormSpecMenu.cpp:582
msgid "Left click: Move all items, Right click: Move single item"
msgstr "ЛКМ: Переместить все предметы, ПКМ: Переместить один предмет"
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
#: src/guiTextInputMenu.cpp:131
msgid "Proceed"
msgstr "Продолжить"
#: src/guiKeyChangeMenu.cpp:114
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
msgstr ""
"Сочетания клавиш. (Если это меню сломалось, удалите настройки из minetest."
"conf)"
#: src/guiKeyChangeMenu.cpp:151
msgid "\"Use\" = climb down"
msgstr "\"Использовать\" = спускаться"
#: src/guiKeyChangeMenu.cpp:164
msgid "Double tap \"jump\" to toggle fly"
msgstr "Дважды нажмите «прыгнуть», чтобы включить полет"
#: src/guiKeyChangeMenu.cpp:269
msgid "Key already in use"
msgstr "Клавиша уже используется"
#: src/guiKeyChangeMenu.cpp:347
msgid "press key"
msgstr "нажмите клавишу"
#: src/guiKeyChangeMenu.cpp:372
msgid "Forward"
msgstr "Вперед"
#: src/guiKeyChangeMenu.cpp:373
msgid "Backward"
msgstr "Назад"
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
msgid "Left"
msgstr "Влево"
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
msgid "Right"
msgstr "Вправо"
#: src/guiKeyChangeMenu.cpp:376
msgid "Use"
msgstr "Использовать"
#: src/guiKeyChangeMenu.cpp:377
msgid "Jump"
msgstr "Прыжок"
#: src/guiKeyChangeMenu.cpp:378
msgid "Sneak"
msgstr "Красться"
#: src/guiKeyChangeMenu.cpp:379
msgid "Drop"
msgstr "Выбросить"
#: src/guiKeyChangeMenu.cpp:380
msgid "Inventory"
msgstr "Инвентарь"
#: src/guiKeyChangeMenu.cpp:381
msgid "Chat"
msgstr "Чат"
#: src/guiKeyChangeMenu.cpp:382
msgid "Command"
msgstr "Команда"
#: src/guiKeyChangeMenu.cpp:383
msgid "Console"
msgstr "Консоль"
#: src/guiKeyChangeMenu.cpp:384
msgid "Toggle fly"
msgstr "Полёт"
#: src/guiKeyChangeMenu.cpp:385
msgid "Toggle fast"
msgstr "Ускорение"
#: src/guiKeyChangeMenu.cpp:386
msgid "Toggle noclip"
msgstr "Проходить сквозь стены"
#: src/guiKeyChangeMenu.cpp:387
msgid "Range select"
msgstr "Выбор зоны видимости"
#: src/guiKeyChangeMenu.cpp:388
#, fuzzy
msgid "Print stacks"
msgstr "напечатать стеки"
#: src/guiMainMenu.cpp:92
msgid "Cannot create world: Name contains invalid characters"
msgstr "Невозможно создать мир: Имя содержит недопустимые символы"
#: src/guiMainMenu.cpp:101
msgid "Cannot create world: A world by this name already exists"
msgstr "Невозможно создать мир: Мир под таким названием уже существует"
#: src/guiMainMenu.cpp:283
msgid "Singleplayer"
msgstr "Одиночная игра"
#: src/guiMainMenu.cpp:284
msgid "Multiplayer"
msgstr "Многопользовательская игра"
#: src/guiMainMenu.cpp:285
msgid "Advanced"
msgstr "Дополнительно"
#: src/guiMainMenu.cpp:286
msgid "Settings"
msgstr "Настройки"
#: src/guiMainMenu.cpp:287
msgid "Credits"
msgstr "Благодарности"
#: src/guiMainMenu.cpp:317
msgid "Select World:"
msgstr "Выберите мир:"
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
msgid "Delete"
msgstr "Удалить"
#: src/guiMainMenu.cpp:346
msgid "New"
msgstr "Новый"
#: src/guiMainMenu.cpp:354
msgid "Configure"
msgstr "Настроить"
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
msgid "Play"
msgstr "Играть"
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
msgid "Creative Mode"
msgstr "Режим создания"
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
msgid "Enable Damage"
msgstr "Включить повреждения"
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
msgid "Name/Password"
msgstr "Имя/Пароль"
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
#, fuzzy
msgid "Favorites:"
msgstr "Сохраненные"
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
msgid "Public Server List:"
msgstr ""
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
msgid "Address/Port"
msgstr "Адрес/Порт"
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
msgid "Show Public"
msgstr "Публичные"
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
msgid "Show Favorites"
msgstr "Сохраненные"
#: src/guiMainMenu.cpp:521
msgid "Connect"
msgstr "Подключиться"
#: src/guiMainMenu.cpp:591
msgid "Leave address blank to start a local server."
msgstr "Оставьте адрес пустым для запуска локального сервера."
#: src/guiMainMenu.cpp:600
msgid "Start Game / Connect"
msgstr "Начать игру"
#: src/guiMainMenu.cpp:632
#, fuzzy
msgid "Public"
msgstr "Публичные"
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
msgid "Delete world"
msgstr "Удалить мир"
#: src/guiMainMenu.cpp:647
msgid "Create world"
msgstr "Создать мир"
#: src/guiMainMenu.cpp:681
msgid "Fancy trees"
msgstr "Красивые деревья"
#: src/guiMainMenu.cpp:687
msgid "Smooth Lighting"
msgstr "Мягкое освещение"
#: src/guiMainMenu.cpp:693
msgid "3D Clouds"
msgstr "3D облака"
#: src/guiMainMenu.cpp:699
msgid "Opaque water"
msgstr "Непрозрачная вода"
#: src/guiMainMenu.cpp:709
msgid "Mip-Mapping"
msgstr "Mip-текстурирование"
#: src/guiMainMenu.cpp:716
msgid "Anisotropic Filtering"
msgstr "Анизотропный фильтр"
#: src/guiMainMenu.cpp:723
msgid "Bi-Linear Filtering"
msgstr "Билинейный фильтр"
#: src/guiMainMenu.cpp:730
msgid "Tri-Linear Filtering"
msgstr "Трилинейный фильтр"
#: src/guiMainMenu.cpp:738
msgid "Shaders"
msgstr "Шейдеры"
#: src/guiMainMenu.cpp:745
#, fuzzy
msgid "Preload item visuals"
msgstr "Кэшировать предметы"
#: src/guiMainMenu.cpp:752
msgid "Enable Particles"
msgstr "Включить частицы"
#: src/guiMainMenu.cpp:759
msgid "Finite liquid"
msgstr ""
#: src/guiMainMenu.cpp:769
msgid "Change keys"
msgstr "Сменить управление"
#: src/guiMainMenu.cpp:1084
msgid "Address required."
msgstr "Нужно ввести адрес."
#: src/guiMainMenu.cpp:1102
msgid "Cannot delete world: Nothing selected"
msgstr "Не могу удалить мир: Ничего не выбрано"
#: src/guiMainMenu.cpp:1117
msgid "Files to be deleted"
msgstr "Следующие файлы будут удалены"
#: src/guiMainMenu.cpp:1133
msgid "Cannot create world: No games found"
msgstr "Не могу создать мир: Ни одной игры не найдено"
#: src/guiMainMenu.cpp:1149
msgid "Cannot configure world: Nothing selected"
msgstr "Не могу настроить мир: ничего не выбрано"
#: src/guiMainMenu.cpp:1256
msgid "Failed to delete all world files"
msgstr "Ошибка при удалении файлов мира"
#: src/guiPasswordChange.cpp:108
msgid "Old Password"
msgstr "Старый пароль"
#: src/guiPasswordChange.cpp:125
msgid "New Password"
msgstr "Новый пароль"
#: src/guiPasswordChange.cpp:141
msgid "Confirm Password"
msgstr "Подтверждение пароля"
#: src/guiPasswordChange.cpp:158
msgid "Change"
msgstr "Изменить"
#: src/guiPasswordChange.cpp:167
msgid "Passwords do not match!"
msgstr "Пароли не совпадают!"
#: src/guiPauseMenu.cpp:123
msgid "Continue"
msgstr "Продолжить"
#: src/guiPauseMenu.cpp:132
msgid "Change Password"
msgstr "Изменить пароль"
#: src/guiPauseMenu.cpp:140
msgid "Sound Volume"
msgstr ""
#: src/guiPauseMenu.cpp:147
msgid "Exit to Menu"
msgstr "Выход в меню"
#: src/guiPauseMenu.cpp:154
msgid "Exit to OS"
msgstr "Выход в ОС"
#: src/guiPauseMenu.cpp:161
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""
"Управление по умолчанию:\n"
"- WASD: перемещение\n"
"- ЛКМ: копать/ударить\n"
"- ПКМ: поставить/использовать\n"
"- Колесо мыши: выбор предмета\n"
"- 0...9: выбор предмета\n"
"- Shift: красться\n"
"- R: переключить видимость всех загруженных чанков\n"
"- I: инвентарь\n"
"- ESC: это меню\n"
"- T: чат\n"
#: src/guiVolumeChange.cpp:108
msgid "Sound Volume: "
msgstr ""
#: src/guiVolumeChange.cpp:121
msgid "Exit"
msgstr ""
#: src/keycode.cpp:223
msgid "Left Button"
msgstr "Левая клавиша"
#: src/keycode.cpp:223
msgid "Middle Button"
msgstr "Средняя клавиша"
#: src/keycode.cpp:223
msgid "Right Button"
msgstr "Правая клавиша"
#: src/keycode.cpp:223
msgid "X Button 1"
msgstr "Доп. кнопка 1"
#: src/keycode.cpp:224
msgid "Back"
msgstr "назад"
#: src/keycode.cpp:224
msgid "Clear"
msgstr "Очистить"
#: src/keycode.cpp:224
msgid "Return"
msgstr "Вернуться"
#: src/keycode.cpp:224
#, fuzzy
msgid "Tab"
msgstr "Tab"
#: src/keycode.cpp:224
msgid "X Button 2"
msgstr "Доп. кнопка 2"
#: src/keycode.cpp:225
msgid "Capital"
msgstr "Caps Lock"
#: src/keycode.cpp:225
msgid "Control"
msgstr "Ctrl"
#: src/keycode.cpp:225
msgid "Kana"
msgstr "Кана"
#: src/keycode.cpp:225
msgid "Menu"
msgstr "меню"
#: src/keycode.cpp:225
msgid "Pause"
msgstr "Пауза"
#: src/keycode.cpp:225
msgid "Shift"
msgstr "Shift"
#: src/keycode.cpp:226
#, fuzzy
msgid "Convert"
msgstr "Преобразовать"
#: src/keycode.cpp:226
msgid "Escape"
msgstr "Escape"
#: src/keycode.cpp:226
#, fuzzy
msgid "Final"
msgstr "Final"
#: src/keycode.cpp:226
#, fuzzy
msgid "Junja"
msgstr "Junja"
#: src/keycode.cpp:226
msgid "Kanji"
msgstr "Кандзи"
#: src/keycode.cpp:226
msgid "Nonconvert"
msgstr ""
#: src/keycode.cpp:227
msgid "Accept"
msgstr "Принять"
#: src/keycode.cpp:227
msgid "End"
msgstr "End"
#: src/keycode.cpp:227
msgid "Home"
msgstr "Home"
#: src/keycode.cpp:227
#, fuzzy
msgid "Mode Change"
msgstr "Смена режима"
#: src/keycode.cpp:227
#, fuzzy
msgid "Next"
msgstr "След."
#: src/keycode.cpp:227
#, fuzzy
msgid "Prior"
msgstr "Пред."
#: src/keycode.cpp:227
msgid "Space"
msgstr "Пробел"
#: src/keycode.cpp:228
msgid "Down"
msgstr "Вниз"
#: src/keycode.cpp:228
msgid "Execute"
msgstr "Выполнить"
#: src/keycode.cpp:228
#, fuzzy
msgid "Print"
msgstr "Печать"
#: src/keycode.cpp:228
#, fuzzy
msgid "Select"
msgstr "Выбор"
#: src/keycode.cpp:228
msgid "Up"
msgstr "Вверх"
#: src/keycode.cpp:229
msgid "Help"
msgstr "Справка"
#: src/keycode.cpp:229
msgid "Insert"
msgstr "Insert"
#: src/keycode.cpp:229
msgid "Snapshot"
msgstr "снимок"
#: src/keycode.cpp:232
msgid "Left Windows"
msgstr "Левая кл. Win"
#: src/keycode.cpp:233
#, fuzzy
msgid "Apps"
msgstr "Приложения"
#: src/keycode.cpp:233
msgid "Numpad 0"
msgstr "Доп. клав. 0"
#: src/keycode.cpp:233
msgid "Numpad 1"
msgstr "Доп. клав. 1"
#: src/keycode.cpp:233
msgid "Right Windows"
msgstr "Прав. кл. Win"
#: src/keycode.cpp:233
#, fuzzy
msgid "Sleep"
msgstr "Сон"
#: src/keycode.cpp:234
msgid "Numpad 2"
msgstr "Доп. клав. 2"
#: src/keycode.cpp:234
msgid "Numpad 3"
msgstr "Доп. клав. 3"
#: src/keycode.cpp:234
msgid "Numpad 4"
msgstr "Доп. клав. 4"
#: src/keycode.cpp:234
msgid "Numpad 5"
msgstr "Доп. клав. 5"
#: src/keycode.cpp:234
msgid "Numpad 6"
msgstr "Доп. клав. 6"
#: src/keycode.cpp:234
msgid "Numpad 7"
msgstr "Доп. клав. 7"
#: src/keycode.cpp:235
msgid "Numpad *"
msgstr "Доп. клав. *"
#: src/keycode.cpp:235
msgid "Numpad +"
msgstr "Доп. клав. +"
#: src/keycode.cpp:235
msgid "Numpad -"
msgstr "Доп. клав. -"
#: src/keycode.cpp:235
msgid "Numpad /"
msgstr "Доп. клав. /"
#: src/keycode.cpp:235
msgid "Numpad 8"
msgstr "Доп. клав. 8"
#: src/keycode.cpp:235
msgid "Numpad 9"
msgstr "Доп. клав. 9"
#: src/keycode.cpp:239
msgid "Num Lock"
msgstr "Num Lock"
#: src/keycode.cpp:239
msgid "Scroll Lock"
msgstr "Scroll Lock"
#: src/keycode.cpp:240
msgid "Left Shift"
msgstr "Левый Shift"
#: src/keycode.cpp:240
msgid "Right Shift"
msgstr "Правый Shift"
#: src/keycode.cpp:241
msgid "Left Control"
msgstr "Левый Ctrl"
#: src/keycode.cpp:241
msgid "Left Menu"
msgstr "Левая клавиша меню"
#: src/keycode.cpp:241
msgid "Right Control"
msgstr "Правый Ctrl"
#: src/keycode.cpp:241
msgid "Right Menu"
msgstr "Правая клавиша меню"
#: src/keycode.cpp:243
msgid "Comma"
msgstr "Запятая"
#: src/keycode.cpp:243
msgid "Minus"
msgstr "Минус"
#: src/keycode.cpp:243
#, fuzzy
msgid "Period"
msgstr "период"
#: src/keycode.cpp:243
msgid "Plus"
msgstr "Плюс"
#: src/keycode.cpp:247
#, fuzzy
msgid "Attn"
msgstr "внимание"
#: src/keycode.cpp:247
msgid "CrSel"
msgstr ""
#: src/keycode.cpp:248
msgid "Erase OEF"
msgstr ""
#: src/keycode.cpp:248
msgid "ExSel"
msgstr ""
#: src/keycode.cpp:248
msgid "OEM Clear"
msgstr ""
#: src/keycode.cpp:248
msgid "PA1"
msgstr ""
#: src/keycode.cpp:248
#, fuzzy
msgid "Zoom"
msgstr "Масштаб"
#: src/main.cpp:1506
msgid "Main Menu"
msgstr "Главное меню"
#: src/main.cpp:1830
msgid "Failed to initialize world"
msgstr "Ошибка при инициализации мира"
#: src/main.cpp:1842
msgid "No world selected and no address provided. Nothing to do."
msgstr "Не выбран мир и не введен адрес."
#: src/main.cpp:1850
msgid "Could not find or load game \""
msgstr "Невозможно найти или загрузить игру \""
#: src/main.cpp:1864
msgid "Invalid gamespec."
msgstr ""
#: src/main.cpp:1904
msgid "Connection error (timed out?)"
msgstr "Ошибка соединения (таймаут пинга?)"
#: src/main.cpp:1915
msgid ""
"\n"
"Check debug.txt for details."
msgstr ""
"\n"
"Подробная информация в debug.txt."

778
po/zh_CN/minetest.po Normal file
View File

@@ -0,0 +1,778 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
"PO-Revision-Date: 2013-03-09 09:41+0200\n"
"Last-Translator: Shen Zheyu <arsdragonfly@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 1.4-dev\n"
#: src/guiConfigureWorld.cpp:125
msgid ""
"Warning: Some mods are not configured yet.\n"
"They will be enabled by default when you save the configuration. "
msgstr ""
"警告一些MOD仍未设定。\n"
"它们会在你保存配置的时候自动启用。 "
#: src/guiConfigureWorld.cpp:144
msgid ""
"Warning: Some configured mods are missing.\n"
"Their setting will be removed when you save the configuration. "
msgstr ""
"警告缺少一些设定了的MOD。\n"
"它们的设置会在你保存配置的时候被移除。 "
#: src/guiConfigureWorld.cpp:208
msgid "enabled"
msgstr "启用"
#: src/guiConfigureWorld.cpp:215
msgid "Enable All"
msgstr "全部启用"
#: src/guiConfigureWorld.cpp:222
msgid "Disable All"
msgstr "全部禁用"
#: src/guiConfigureWorld.cpp:228
msgid "depends on:"
msgstr "依赖于:"
#: src/guiConfigureWorld.cpp:240
msgid "is required by:"
msgstr "需要:"
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
msgid "Cancel"
msgstr "取消"
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
msgid "Save"
msgstr "保存"
#: src/guiConfigureWorld.cpp:394
msgid "Configuration saved. "
msgstr "配置已保存。 "
#: src/guiConfigureWorld.cpp:402
msgid "Warning: Configuration not consistent. "
msgstr "警告:配置不一致。 "
#: src/guiConfirmMenu.cpp:120
msgid "Yes"
msgstr "是"
#: src/guiConfirmMenu.cpp:126
msgid "No"
msgstr "否"
#: src/guiCreateWorld.cpp:116
msgid "World name"
msgstr "世界名称"
#: src/guiCreateWorld.cpp:135
msgid "Game"
msgstr "游戏"
#: src/guiCreateWorld.cpp:159
msgid "Create"
msgstr "创建"
#: src/guiDeathScreen.cpp:96
msgid "You died."
msgstr "你死了。"
#: src/guiDeathScreen.cpp:104
msgid "Respawn"
msgstr "重生"
#: src/guiFormSpecMenu.cpp:582
msgid "Left click: Move all items, Right click: Move single item"
msgstr "左键:移动所有物品,右键:移动单个物品"
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
#: src/guiTextInputMenu.cpp:131
msgid "Proceed"
msgstr "继续游戏"
#: src/guiKeyChangeMenu.cpp:114
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
msgstr "键位配置。如果这个菜单被弄乱从minetest.conf中删掉点东西"
#: src/guiKeyChangeMenu.cpp:151
msgid "\"Use\" = climb down"
msgstr "“使用” = 向下爬"
#: src/guiKeyChangeMenu.cpp:164
msgid "Double tap \"jump\" to toggle fly"
msgstr "连按两次“跳”切换飞行状态"
#: src/guiKeyChangeMenu.cpp:269
msgid "Key already in use"
msgstr "按键已被占用"
#: src/guiKeyChangeMenu.cpp:347
msgid "press key"
msgstr "按键"
#: src/guiKeyChangeMenu.cpp:372
msgid "Forward"
msgstr "向前"
#: src/guiKeyChangeMenu.cpp:373
msgid "Backward"
msgstr "向后"
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
msgid "Left"
msgstr "向左"
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
msgid "Right"
msgstr "向右"
#: src/guiKeyChangeMenu.cpp:376
msgid "Use"
msgstr "使用"
#: src/guiKeyChangeMenu.cpp:377
msgid "Jump"
msgstr "跳"
#: src/guiKeyChangeMenu.cpp:378
msgid "Sneak"
msgstr "潜行"
#: src/guiKeyChangeMenu.cpp:379
msgid "Drop"
msgstr "丢出"
#: src/guiKeyChangeMenu.cpp:380
msgid "Inventory"
msgstr "物品栏"
#: src/guiKeyChangeMenu.cpp:381
msgid "Chat"
msgstr "聊天"
#: src/guiKeyChangeMenu.cpp:382
msgid "Command"
msgstr "命令"
#: src/guiKeyChangeMenu.cpp:383
msgid "Console"
msgstr "控制台"
#: src/guiKeyChangeMenu.cpp:384
msgid "Toggle fly"
msgstr "切换飞行状态"
#: src/guiKeyChangeMenu.cpp:385
msgid "Toggle fast"
msgstr "切换快速移动状态"
#: src/guiKeyChangeMenu.cpp:386
msgid "Toggle noclip"
msgstr "切换穿墙模式"
#: src/guiKeyChangeMenu.cpp:387
msgid "Range select"
msgstr "选择范围"
#: src/guiKeyChangeMenu.cpp:388
msgid "Print stacks"
msgstr "打印栈"
#: src/guiMainMenu.cpp:92
msgid "Cannot create world: Name contains invalid characters"
msgstr "无法创建世界:名字包含非法字符"
#: src/guiMainMenu.cpp:101
msgid "Cannot create world: A world by this name already exists"
msgstr "无法创建世界:同名世界已经存在"
#: src/guiMainMenu.cpp:283
msgid "Singleplayer"
msgstr "单人游戏"
#: src/guiMainMenu.cpp:284
msgid "Multiplayer"
msgstr "多人游戏"
#: src/guiMainMenu.cpp:285
msgid "Advanced"
msgstr "高级联机设置"
#: src/guiMainMenu.cpp:286
msgid "Settings"
msgstr "设置"
#: src/guiMainMenu.cpp:287
msgid "Credits"
msgstr "关于"
#: src/guiMainMenu.cpp:317
msgid "Select World:"
msgstr "选择世界:"
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
msgid "Delete"
msgstr "删除"
#: src/guiMainMenu.cpp:346
msgid "New"
msgstr "新建"
#: src/guiMainMenu.cpp:354
msgid "Configure"
msgstr "配置"
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
msgid "Play"
msgstr "开始游戏"
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
msgid "Creative Mode"
msgstr "创造模式"
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
msgid "Enable Damage"
msgstr "开启伤害"
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
msgid "Name/Password"
msgstr "名字/密码"
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
#, fuzzy
msgid "Favorites:"
msgstr "显示最爱"
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
msgid "Public Server List:"
msgstr ""
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
msgid "Address/Port"
msgstr "地址/端口"
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
msgid "Show Public"
msgstr "显示公共"
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
msgid "Show Favorites"
msgstr "显示最爱"
#: src/guiMainMenu.cpp:521
msgid "Connect"
msgstr "连接"
#: src/guiMainMenu.cpp:591
msgid "Leave address blank to start a local server."
msgstr "地址栏留空可启动本地服务器。"
#: src/guiMainMenu.cpp:600
msgid "Start Game / Connect"
msgstr "启动游戏/连接"
#: src/guiMainMenu.cpp:632
#, fuzzy
msgid "Public"
msgstr "显示公共"
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
msgid "Delete world"
msgstr "删除世界"
#: src/guiMainMenu.cpp:647
msgid "Create world"
msgstr "创造世界"
#: src/guiMainMenu.cpp:681
msgid "Fancy trees"
msgstr "更漂亮的树"
#: src/guiMainMenu.cpp:687
msgid "Smooth Lighting"
msgstr "平滑光照"
#: src/guiMainMenu.cpp:693
msgid "3D Clouds"
msgstr "3D云彩"
#: src/guiMainMenu.cpp:699
msgid "Opaque water"
msgstr "不反光的水"
#: src/guiMainMenu.cpp:709
msgid "Mip-Mapping"
msgstr "贴图处理"
#: src/guiMainMenu.cpp:716
msgid "Anisotropic Filtering"
msgstr "各向异性过滤"
#: src/guiMainMenu.cpp:723
msgid "Bi-Linear Filtering"
msgstr "双线性过滤"
#: src/guiMainMenu.cpp:730
msgid "Tri-Linear Filtering"
msgstr "三线性过滤"
#: src/guiMainMenu.cpp:738
msgid "Shaders"
msgstr "着色器"
#: src/guiMainMenu.cpp:745
msgid "Preload item visuals"
msgstr "预先加载物品图像"
#: src/guiMainMenu.cpp:752
msgid "Enable Particles"
msgstr "启用粒子效果"
#: src/guiMainMenu.cpp:759
msgid "Finite liquid"
msgstr ""
#: src/guiMainMenu.cpp:769
msgid "Change keys"
msgstr "改变键位设置"
#: src/guiMainMenu.cpp:1084
msgid "Address required."
msgstr "需要地址。"
#: src/guiMainMenu.cpp:1102
msgid "Cannot delete world: Nothing selected"
msgstr "无法删除世界:没有选择世界"
#: src/guiMainMenu.cpp:1117
msgid "Files to be deleted"
msgstr "将被删除的文件"
#: src/guiMainMenu.cpp:1133
msgid "Cannot create world: No games found"
msgstr "无法创造世界:未找到游戏模式"
#: src/guiMainMenu.cpp:1149
msgid "Cannot configure world: Nothing selected"
msgstr "无法配置世界:没有选择世界"
#: src/guiMainMenu.cpp:1256
msgid "Failed to delete all world files"
msgstr "无法删除所有该世界的文件"
#: src/guiPasswordChange.cpp:108
msgid "Old Password"
msgstr "旧密码"
#: src/guiPasswordChange.cpp:125
msgid "New Password"
msgstr "新密码"
#: src/guiPasswordChange.cpp:141
msgid "Confirm Password"
msgstr "确认密码"
#: src/guiPasswordChange.cpp:158
msgid "Change"
msgstr "更改"
#: src/guiPasswordChange.cpp:167
msgid "Passwords do not match!"
msgstr "密码不匹配!"
#: src/guiPauseMenu.cpp:123
msgid "Continue"
msgstr "继续"
#: src/guiPauseMenu.cpp:132
msgid "Change Password"
msgstr "更改密码"
#: src/guiPauseMenu.cpp:140
msgid "Sound Volume"
msgstr ""
#: src/guiPauseMenu.cpp:147
msgid "Exit to Menu"
msgstr "退出至菜单"
#: src/guiPauseMenu.cpp:154
msgid "Exit to OS"
msgstr "退出至操作系统"
#: src/guiPauseMenu.cpp:161
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""
"默认控制:\n"
"W/A/S/D: 走\n"
"空格: 跳\n"
"鼠标左键: 挖方块/攻击\n"
"鼠标右键: 放置/使用\n"
"鼠标滚轮: 选择物品\n"
"0-9: 选择物品\n"
"Shift: 潜行\n"
"R切换查看所有已载入区块\n"
"I物品栏\n"
"ESC菜单\n"
"T聊天\n"
#: src/guiVolumeChange.cpp:108
msgid "Sound Volume: "
msgstr ""
#: src/guiVolumeChange.cpp:121
msgid "Exit"
msgstr ""
#: src/keycode.cpp:223
msgid "Left Button"
msgstr "左键"
#: src/keycode.cpp:223
msgid "Middle Button"
msgstr "中键"
#: src/keycode.cpp:223
msgid "Right Button"
msgstr "右键"
#: src/keycode.cpp:223
msgid "X Button 1"
msgstr "X键1"
#: src/keycode.cpp:224
msgid "Back"
msgstr "退格"
#: src/keycode.cpp:224
msgid "Clear"
msgstr "Clear键"
#: src/keycode.cpp:224
msgid "Return"
msgstr "回车"
#: src/keycode.cpp:224
msgid "Tab"
msgstr "Tab键"
#: src/keycode.cpp:224
msgid "X Button 2"
msgstr "X键2"
#: src/keycode.cpp:225
msgid "Capital"
msgstr "大写"
#: src/keycode.cpp:225
msgid "Control"
msgstr "Ctrl"
#: src/keycode.cpp:225
msgid "Kana"
msgstr "假名"
#: src/keycode.cpp:225
msgid "Menu"
msgstr "菜单"
#: src/keycode.cpp:225
msgid "Pause"
msgstr "暂停"
#: src/keycode.cpp:225
msgid "Shift"
msgstr "Shift键"
#: src/keycode.cpp:226
msgid "Convert"
msgstr "转换"
#: src/keycode.cpp:226
msgid "Escape"
msgstr "Escape键"
#: src/keycode.cpp:226
msgid "Final"
msgstr "Final键"
#: src/keycode.cpp:226
msgid "Junja"
msgstr "Junja键"
#: src/keycode.cpp:226
msgid "Kanji"
msgstr "Kanji键"
#: src/keycode.cpp:226
msgid "Nonconvert"
msgstr "无变换"
#: src/keycode.cpp:227
msgid "Accept"
msgstr "接受"
#: src/keycode.cpp:227
msgid "End"
msgstr "End键"
#: src/keycode.cpp:227
msgid "Home"
msgstr "Home键"
#: src/keycode.cpp:227
msgid "Mode Change"
msgstr "改变模式"
#: src/keycode.cpp:227
msgid "Next"
msgstr "下一个"
#: src/keycode.cpp:227
msgid "Prior"
msgstr "Prior键"
#: src/keycode.cpp:227
msgid "Space"
msgstr "空格"
#: src/keycode.cpp:228
msgid "Down"
msgstr "向下"
#: src/keycode.cpp:228
msgid "Execute"
msgstr "执行"
#: src/keycode.cpp:228
msgid "Print"
msgstr "打印"
#: src/keycode.cpp:228
msgid "Select"
msgstr "选择"
#: src/keycode.cpp:228
msgid "Up"
msgstr "向上"
#: src/keycode.cpp:229
msgid "Help"
msgstr "帮助"
#: src/keycode.cpp:229
msgid "Insert"
msgstr "插入"
#: src/keycode.cpp:229
msgid "Snapshot"
msgstr "快照"
#: src/keycode.cpp:232
msgid "Left Windows"
msgstr "左窗口"
#: src/keycode.cpp:233
msgid "Apps"
msgstr "应用"
#: src/keycode.cpp:233
msgid "Numpad 0"
msgstr "小键盘0"
#: src/keycode.cpp:233
msgid "Numpad 1"
msgstr "小键盘1"
#: src/keycode.cpp:233
msgid "Right Windows"
msgstr "右窗口"
#: src/keycode.cpp:233
msgid "Sleep"
msgstr "睡眠"
#: src/keycode.cpp:234
msgid "Numpad 2"
msgstr "小键盘2"
#: src/keycode.cpp:234
msgid "Numpad 3"
msgstr "小键盘3"
#: src/keycode.cpp:234
msgid "Numpad 4"
msgstr "小键盘4"
#: src/keycode.cpp:234
msgid "Numpad 5"
msgstr "小键盘5"
#: src/keycode.cpp:234
msgid "Numpad 6"
msgstr "小键盘6"
#: src/keycode.cpp:234
msgid "Numpad 7"
msgstr "小键盘7"
#: src/keycode.cpp:235
msgid "Numpad *"
msgstr "小键盘*"
#: src/keycode.cpp:235
msgid "Numpad +"
msgstr "小键盘+"
#: src/keycode.cpp:235
msgid "Numpad -"
msgstr "小键盘-"
#: src/keycode.cpp:235
msgid "Numpad /"
msgstr "小键盘/"
#: src/keycode.cpp:235
msgid "Numpad 8"
msgstr "小键盘8"
#: src/keycode.cpp:235
msgid "Numpad 9"
msgstr "小键盘9"
#: src/keycode.cpp:239
msgid "Num Lock"
msgstr "小键盘锁"
#: src/keycode.cpp:239
msgid "Scroll Lock"
msgstr "Scroll Lock键"
#: src/keycode.cpp:240
msgid "Left Shift"
msgstr "左Shift键"
#: src/keycode.cpp:240
msgid "Right Shift"
msgstr "右Shift键"
#: src/keycode.cpp:241
msgid "Left Control"
msgstr "左Control键"
#: src/keycode.cpp:241
msgid "Left Menu"
msgstr "左菜单"
#: src/keycode.cpp:241
msgid "Right Control"
msgstr "右Control键"
#: src/keycode.cpp:241
msgid "Right Menu"
msgstr "右菜单"
#: src/keycode.cpp:243
msgid "Comma"
msgstr "逗号"
#: src/keycode.cpp:243
msgid "Minus"
msgstr "减号"
#: src/keycode.cpp:243
msgid "Period"
msgstr "句号"
#: src/keycode.cpp:243
msgid "Plus"
msgstr "加号"
#: src/keycode.cpp:247
msgid "Attn"
msgstr "Attn键"
#: src/keycode.cpp:247
msgid "CrSel"
msgstr "CrSel键"
#: src/keycode.cpp:248
msgid "Erase OEF"
msgstr "Erase OEF键"
#: src/keycode.cpp:248
msgid "ExSel"
msgstr "ExSel键"
#: src/keycode.cpp:248
msgid "OEM Clear"
msgstr "OEM Clear键"
#: src/keycode.cpp:248
msgid "PA1"
msgstr "PA1键"
#: src/keycode.cpp:248
msgid "Zoom"
msgstr "缩放"
#: src/main.cpp:1506
msgid "Main Menu"
msgstr "主菜单"
#: src/main.cpp:1830
msgid "Failed to initialize world"
msgstr "无法初始化世界"
#: src/main.cpp:1842
msgid "No world selected and no address provided. Nothing to do."
msgstr "没有选择世界或提供地址。未执行操作。"
#: src/main.cpp:1850
msgid "Could not find or load game \""
msgstr "无法找到或载入游戏模式“"
#: src/main.cpp:1864
msgid "Invalid gamespec."
msgstr "非法游戏模式规格。"
#: src/main.cpp:1904
msgid "Connection error (timed out?)"
msgstr "连接出错(超时?)"
#: src/main.cpp:1915
msgid ""
"\n"
"Check debug.txt for details."
msgstr ""
"\n"
"查看 debug.txt 以获得详细信息。"

View File

@@ -5,6 +5,22 @@ cmake_minimum_required( VERSION 2.6 )
mark_as_advanced(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH)
mark_as_advanced(JTHREAD_INCLUDE_DIR JTHREAD_LIBRARY)
mark_as_advanced(SQLITE3_INCLUDE_DIR SQLITE3_LIBRARY)
mark_as_advanced(JSON_INCLUDE_DIR JSON_LIBRARY)
option(ENABLE_CURL "Enable cURL support for fetching media" 1)
if (NOT ENABLE_CURL)
mark_as_advanced(CLEAR CURL_LIBRARY CURL_INCLUDE_DIR)
endif(NOT ENABLE_CURL)
if( ENABLE_CURL )
find_package(CURL)
endif( ENABLE_CURL )
set(USE_CURL 0)
if (CURL_FOUND AND ENABLE_CURL)
message(STATUS "cURL support enabled")
set(USE_CURL 1)
endif(CURL_FOUND AND ENABLE_CURL)
# user-visible option to enable/disable gettext usage
OPTION(ENABLE_GETTEXT "Use GetText for internationalization" 0)
@@ -78,6 +94,12 @@ if(USE_SOUND)
)
endif()
option(ENABLE_FREETYPE "Enable freetype2 (truetype fonts and basic unicode support)" OFF)
set(USE_FREETYPE 0)
if(ENABLE_FREETYPE)
set(USE_FREETYPE 1)
endif(ENABLE_FREETYPE)
if(NOT MSVC)
set(USE_GPROF 0 CACHE BOOL "Use -pg flag for g++")
endif()
@@ -102,6 +124,14 @@ if(WIN32)
CACHE FILEPATH "Path to zlibwapi.dll (for installation)")
set(IRRLICHT_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../../irrlicht-1.7.2"
CACHE PATH "irrlicht dir")
if(USE_FREETYPE)
set(FREETYPE_INCLUDE_DIR_ft2build "${PROJECT_SOURCE_DIR}/../../freetype2/include/"
CACHE PATH "freetype include dir")
set(FREETYPE_INCLUDE_DIR_freetype2 "${PROJECT_SOURCE_DIR}/../../freetype2/include/freetype"
CACHE PATH "freetype include dir")
set(FREETYPE_LIBRARY "${PROJECT_SOURCE_DIR}/../../freetype2/objs/win32/vc2005/freetype247.lib"
CACHE FILEPATH "Path to freetype247.lib")
endif(USE_FREETYPE)
set(MINGWM10_DLL ""
CACHE FILEPATH "Path to mingwm10.dll (for installation)")
if(ENABLE_SOUND)
@@ -131,7 +161,7 @@ else()
endif(APPLE)
endif(BUILD_CLIENT)
find_package(ZLIB REQUIRED)
set(PLATFORM_LIBS -lpthread ${CMAKE_DL_LIBS})
set(PLATFORM_LIBS -lpthread -lrt ${CMAKE_DL_LIBS})
#set(CLIENT_PLATFORM_LIBS -lXxf86vm)
# This way Xxf86vm is found on OpenBSD too
find_library(XXF86VM_LIBRARY Xxf86vm)
@@ -141,6 +171,14 @@ endif()
find_package(Jthread REQUIRED)
find_package(Sqlite3 REQUIRED)
find_package(Json REQUIRED)
find_package(OpenGLES2)
if(USE_FREETYPE)
find_package(Freetype REQUIRED)
set(CGUITTFONT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cguittfont")
set(CGUITTFONT_LIBRARY cguittfont)
endif(USE_FREETYPE)
# Do not use system-wide installation of Lua, because it'll likely be a
# different version and/or has different build options.
@@ -168,11 +206,31 @@ set(common_SRCS
itemdef.cpp
nodedef.cpp
object_properties.cpp
scriptapi_types.cpp
scriptapi_common.cpp
scriptapi_content.cpp
scriptapi_craft.cpp
scriptapi_node.cpp
scriptapi_item.cpp
scriptapi_env.cpp
scriptapi_nodetimer.cpp
scriptapi_noise.cpp
scriptapi_entity.cpp
scriptapi_object.cpp
scriptapi_nodemeta.cpp
scriptapi_inventory.cpp
scriptapi_particles.cpp
scriptapi.cpp
script.cpp
log.cpp
content_sao.cpp
emerge.cpp
mapgen.cpp
mapgen_v6.cpp
mapgen_indev.cpp
mapgen_singlenode.cpp
treegen.cpp
dungeongen.cpp
content_nodemeta.cpp
content_mapnode.cpp
collision.cpp
@@ -202,6 +260,10 @@ set(common_SRCS
sha1.cpp
base64.cpp
ban.cpp
biome.cpp
clientserver.cpp
staticobject.cpp
serverlist.cpp
util/serialize.cpp
util/directiontables.cpp
util/numeric.cpp
@@ -244,6 +306,7 @@ set(minetest_SRCS
keycode.cpp
camera.cpp
clouds.cpp
particles.cpp
clientobject.cpp
chat.cpp
guiMainMenu.cpp
@@ -253,17 +316,27 @@ set(minetest_SRCS
guiFormSpecMenu.cpp
guiPauseMenu.cpp
guiPasswordChange.cpp
guiVolumeChange.cpp
guiDeathScreen.cpp
guiChatConsole.cpp
guiCreateWorld.cpp
guiConfigureWorld.cpp
guiConfirmMenu.cpp
client.cpp
filecache.cpp
tile.cpp
shader.cpp
game.cpp
main.cpp
)
if(USE_FREETYPE)
set(minetest_SRCS
${minetest_SRCS}
intlGUIEditBox.cpp
)
endif(USE_FREETYPE)
# Server sources
set(minetestserver_SRCS
${common_SRCS}
@@ -281,8 +354,22 @@ include_directories(
${JTHREAD_INCLUDE_DIR}
${SQLITE3_INCLUDE_DIR}
${LUA_INCLUDE_DIR}
${JSON_INCLUDE_DIR}
)
if(USE_FREETYPE)
include_directories(
${FREETYPE_INCLUDE_DIRS}
${CGUITTFONT_INCLUDE_DIR}
)
endif(USE_FREETYPE)
if(USE_CURL)
include_directories(
${CURL_INCLUDE_DIR}
)
endif(USE_CURL)
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")
if(BUILD_CLIENT)
@@ -301,9 +388,24 @@ if(BUILD_CLIENT)
${JTHREAD_LIBRARY}
${SQLITE3_LIBRARY}
${LUA_LIBRARY}
${JSON_LIBRARY}
${OPENGLES2_LIBRARIES}
${PLATFORM_LIBS}
${CLIENT_PLATFORM_LIBS}
)
if(USE_CURL)
target_link_libraries(
${PROJECT_NAME}
${CURL_LIBRARY}
)
endif(USE_CURL)
if(USE_FREETYPE)
target_link_libraries(
${PROJECT_NAME}
${FREETYPE_LIBRARY}
${CGUITTFONT_LIBRARY}
)
endif(USE_FREETYPE)
endif(BUILD_CLIENT)
if(BUILD_SERVER)
@@ -313,11 +415,20 @@ if(BUILD_SERVER)
${ZLIB_LIBRARIES}
${JTHREAD_LIBRARY}
${SQLITE3_LIBRARY}
${JSON_LIBRARY}
${GETTEXT_LIBRARY}
${LUA_LIBRARY}
${PLATFORM_LIBS}
)
if(USE_CURL)
target_link_libraries(
${PROJECT_NAME}server
${CURL_LIBRARY}
)
endif(USE_CURL)
endif(BUILD_SERVER)
#
# Set some optimizations and tweaks
#
@@ -410,6 +521,9 @@ if(WIN32)
if(VORBISFILE_DLL)
install(FILES ${VORBISFILE_DLL} DESTINATION ${BINDIR})
endif()
if(CURL_DLL)
install(FILES ${CURL_DLL} DESTINATION ${BINDIR})
endif()
endif()
endif()
@@ -481,9 +595,18 @@ else (SQLITE3_FOUND)
add_subdirectory(sqlite)
endif (SQLITE3_FOUND)
if (BUILD_CLIENT AND USE_FREETYPE)
add_subdirectory(cguittfont)
endif (BUILD_CLIENT AND USE_FREETYPE)
if (LUA_FOUND)
else (LUA_FOUND)
add_subdirectory(lua)
endif (LUA_FOUND)
if (JSON_FOUND)
else (JSON_FOUND)
add_subdirectory(json)
endif (JSON_FOUND)
#end

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -61,7 +61,7 @@ class ActiveObject
}
virtual u8 getType() const = 0;
virtual bool getCollisionBox(aabb3f *toset) = 0;
protected:
u16 m_id; // 0 is invalid, "no id"
};

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View File

@@ -1,5 +1,10 @@
#ifndef BASE64_HEADER
#define BASE64_HEADER
#include <string>
bool base64_is_valid(std::string const& s);
std::string base64_encode(unsigned char const* , unsigned int len);
std::string base64_decode(std::string const& s);
#endif // BASE64_HEADER

233
src/biome.cpp Normal file
View File

@@ -0,0 +1,233 @@
/*
Minetest
Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr2@cs.scranton.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "biome.h"
#include "nodedef.h"
#include "map.h" //for ManualMapVoxelManipulator
#include "log.h"
#include "main.h"
#define BT_NONE 0
#define BT_OCEAN 1
#define BT_LAKE 2
#define BT_SBEACH 3
#define BT_GBEACH 4
#define BT_PLAINS 5
#define BT_HILLS 6
#define BT_EXTREMEHILLS 7
#define BT_MOUNTAINS 8
#define BT_DESERT 9
#define BT_DESERTHILLS 10
#define BT_HELL 11
#define BT_AETHER 12
#define BT_BTMASK 0x3F
#define BTF_SNOW 0x40
#define BTF_FOREST 0x80
#define BGFREQ_1 ( 0.40)
#define BGFREQ_2 (BGFREQ_1 + 0.05)
#define BGFREQ_3 (BGFREQ_2 + 0.08)
#define BGFREQ_4 (BGFREQ_3 + 0.35)
#define BGFREQ_5 (BGFREQ_4 + 0.18)
//BGFREQ_5 is not checked as an upper bound; it ought to sum up to 1.00, but it's okay if it doesn't.
/*float bg1_temps[] = {0.0};
int bg1_biomes[] = {BT_OCEAN};
float bg2_temps[] = {10.0};
int bg2_biomes[] = {BT_GBEACH, BT_SBEACH};
float bg3_temps[] = {30.0, 40.0};
int bg3_biomes[] = {BT_HILLS, BT_EXTREMEHILLS, BT_MOUNTAINS};
float bg4_temps[] = {25.0, 30.0, 35.0, 40.0};
int bg4_biomes[] = {BT_HILLS, BT_EXTREMEHILLS, BT_MOUNTAINS, BT_DESERT, BT_DESERTHILLS};
float bg5_temps[] = {5.0, 40.0};
int bg5_biomes[] = {BT_LAKE, BT_PLAINS, BT_DESERT};*/
NoiseParams np_default = {20.0, 15.0, v3f(250., 250., 250.), 82341, 5, 0.6};
BiomeDefManager::BiomeDefManager(IGameDef *gamedef) {
this->m_gamedef = gamedef;
this->ndef = gamedef->ndef();
//the initial biome group
bgroups.push_back(new std::vector<Biome *>);
}
BiomeDefManager::~BiomeDefManager() {
for (unsigned int i = 0; i != bgroups.size(); i++)
delete bgroups[i];
}
Biome *BiomeDefManager::createBiome(BiomeTerrainType btt) {
switch (btt) {
case BIOME_TERRAIN_NORMAL:
return new Biome;
case BIOME_TERRAIN_LIQUID:
return new BiomeLiquid;
case BIOME_TERRAIN_NETHER:
return new BiomeHell;
case BIOME_TERRAIN_AETHER:
return new BiomeAether;
case BIOME_TERRAIN_FLAT:
return new BiomeSuperflat;
}
return NULL;
}
void BiomeDefManager::addBiomeGroup(float freq) {
int size = bgroup_freqs.size();
float newfreq = freq;
if (size)
newfreq += bgroup_freqs[size - 1];
bgroup_freqs.push_back(newfreq);
bgroups.push_back(new std::vector<Biome *>);
verbosestream << "BiomeDefManager: added biome group with frequency " <<
newfreq << std::endl;
}
void BiomeDefManager::addBiome(Biome *b) {
std::vector<Biome *> *bgroup;
if ((unsigned int)b->groupid >= bgroups.size()) {
errorstream << "BiomeDefManager: attempted to add biome '" << b->name
<< "' to nonexistent biome group " << b->groupid << std::endl;
return;
}
bgroup = bgroups[b->groupid];
bgroup->push_back(b);
verbosestream << "BiomeDefManager: added biome '" << b->name <<
"' to biome group " << (int)b->groupid << std::endl;
}
void BiomeDefManager::addDefaultBiomes() {
Biome *b;
b = new Biome;
b->name = "Default";
b->n_top = MapNode(ndef->getId("mapgen_stone"));
b->n_filler = b->n_top;
b->ntopnodes = 0;
b->height_min = -MAP_GENERATION_LIMIT;
b->height_max = MAP_GENERATION_LIMIT;
b->heat_min = FLT_MIN;
b->heat_max = FLT_MAX;
b->humidity_min = FLT_MIN;
b->humidity_max = FLT_MAX;
b->np = &np_default;
biome_default = b;
}
Biome *BiomeDefManager::getBiome(float bgfreq, float heat, float humidity) {
std::vector<Biome *> *bgroup;
Biome *b;
int i;
int ngroups = bgroup_freqs.size();
if (!ngroups)
return biome_default;
for (i = 0; (i != ngroups) && (bgfreq > bgroup_freqs[i]); i++);
bgroup = bgroups[i];
int nbiomes = bgroup->size();
for (i = 0; i != nbiomes; i++) {
b = bgroup->operator[](i);
if (heat >= b->heat_min && heat <= b->heat_max &&
humidity >= b->humidity_min && humidity <= b->humidity_max)
return b;
}
return biome_default;
}
//////////////////////////// [ Generic biome ] ////////////////////////////////
int Biome::getSurfaceHeight(float noise_terrain) {
return np->offset + np->scale * noise_terrain;
}
void Biome::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
}
///////////////////////////// [ Ocean biome ] /////////////////////////////////
void BiomeLiquid::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
}
///////////////////////////// [ Nether biome ] /////////////////////////////////
int BiomeHell::getSurfaceHeight(float noise_terrain) {
return np->offset + np->scale * noise_terrain;
}
void BiomeHell::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
}
///////////////////////////// [ Aether biome ] ////////////////////////////////
int BiomeAether::getSurfaceHeight(float noise_terrain) {
return np->offset + np->scale * noise_terrain;
}
void BiomeAether::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
}
/////////////////////////// [ Superflat biome ] ///////////////////////////////
int BiomeSuperflat::getSurfaceHeight(float noise_terrain) {
return ntopnodes;
}
void BiomeSuperflat::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
}

98
src/biome.h Normal file
View File

@@ -0,0 +1,98 @@
/*
Minetest
Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr2@cs.scranton.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef BIOME_HEADER
#define BIOME_HEADER
#include <string>
#include "nodedef.h"
#include "gamedef.h"
#include "mapnode.h"
#include "noise.h"
#include "mapgen.h"
enum BiomeTerrainType
{
BIOME_TERRAIN_NORMAL,
BIOME_TERRAIN_LIQUID,
BIOME_TERRAIN_NETHER,
BIOME_TERRAIN_AETHER,
BIOME_TERRAIN_FLAT
};
class Biome {
public:
MapNode n_top;
MapNode n_filler;
s16 ntopnodes;
s8 groupid;
s8 flags;
s16 height_min;
s16 height_max;
float heat_min;
float heat_max;
float humidity_min;
float humidity_max;
std::string name;
NoiseParams *np;
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
virtual int getSurfaceHeight(float noise_terrain);
};
class BiomeLiquid : public Biome {
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
};
class BiomeHell : public Biome {
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
virtual int getSurfaceHeight(float noise_terrain);
};
class BiomeAether : public Biome {
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
virtual int getSurfaceHeight(float noise_terrain);
};
class BiomeSuperflat : public Biome {
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
virtual int getSurfaceHeight(float noise_terrain);
};
class BiomeDefManager {
public:
std::vector<float> bgroup_freqs;
std::vector<std::vector<Biome *> *> bgroups;
Biome *biome_default;
IGameDef *m_gamedef;
INodeDefManager *ndef;
BiomeDefManager(IGameDef *gamedef);
~BiomeDefManager();
Biome *createBiome(BiomeTerrainType btt);
Biome *getBiome(float bgfreq, float heat, float humidity);
void addBiomeGroup(float freq);
void addBiome(Biome *b);
void addDefaultBiomes();
};
#endif

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -233,9 +233,12 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
m_playernode->setRotation(v3f(0, -1 * player->getYaw(), 0));
m_playernode->updateAbsolutePosition();
//Get camera tilt timer (hurt animation)
float cameratilt = fabs(fabs(player->hurt_tilt_timer-0.75)-0.75);
// Set head node transformation
m_headnode->setPosition(player->getEyeOffset());
m_headnode->setRotation(v3f(player->getPitch(), 0, 0));
m_headnode->setPosition(player->getEyeOffset()+v3f(0,cameratilt*-player->hurt_tilt_strength,0));
m_headnode->setRotation(v3f(player->getPitch(), 0, cameratilt*player->hurt_tilt_strength));
m_headnode->updateAbsolutePosition();
// Compute relative camera position and target
@@ -336,13 +339,13 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
if (m_digging_button != -1)
{
f32 digfrac = m_digging_anim;
wield_position.X -= 30 * sin(pow(digfrac, 0.8f) * M_PI);
wield_position.Y += 15 * sin(digfrac * 2 * M_PI);
wield_position.Z += 5 * digfrac;
wield_position.X -= 50 * sin(pow(digfrac, 0.8f) * M_PI);
wield_position.Y += 24 * sin(digfrac * 1.8 * M_PI);
wield_position.Z += 25 * 0.5;
// Euler angles are PURE EVIL, so why not use quaternions?
core::quaternion quat_begin(wield_rotation * core::DEGTORAD);
core::quaternion quat_end(v3f(90, -10, -130) * core::DEGTORAD);
core::quaternion quat_end(v3f(80, 30, 100) * core::DEGTORAD);
core::quaternion quat_slerp;
quat_slerp.slerp(quat_begin, quat_end, sin(digfrac * M_PI));
quat_slerp.toEuler(wield_rotation);
@@ -529,7 +532,7 @@ void Camera::setDigging(s32 button)
void Camera::wield(const ItemStack &item)
{
IItemDefManager *idef = m_gamedef->idef();
scene::IMesh *wield_mesh = item.getDefinition(idef).wield_mesh;
scene::IMesh *wield_mesh = idef->getWieldMesh(item.getDefinition(idef).name, m_gamedef);
if(wield_mesh)
{
m_wieldnode->setMesh(wield_mesh);
@@ -544,7 +547,7 @@ void Camera::wield(const ItemStack &item)
void Camera::drawWieldedTool()
{
// Set vertex colors of wield mesh according to light level
u8 li = decode_light(m_wieldlight);
u8 li = m_wieldlight;
video::SColor color(255,li,li,li);
setMeshColor(m_wieldnode->getMesh(), color);

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

File diff suppressed because it is too large Load Diff

377
src/cguittfont/CGUITTFont.h Normal file
View File

@@ -0,0 +1,377 @@
/*
CGUITTFont FreeType class for Irrlicht
Copyright (c) 2009-2010 John Norman
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you use
this software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
The original version of this class can be located at:
http://irrlicht.suckerfreegames.com/
John Norman
john@suckerfreegames.com
*/
#ifndef __C_GUI_TTFONT_H_INCLUDED__
#define __C_GUI_TTFONT_H_INCLUDED__
#include <irrlicht.h>
#include <ft2build.h>
#include FT_FREETYPE_H
namespace irr
{
namespace gui
{
struct SGUITTFace;
class CGUITTFont;
//! Class to assist in deleting glyphs.
class CGUITTAssistDelete
{
public:
template <class T, typename TAlloc>
static void Delete(core::array<T, TAlloc>& a)
{
TAlloc allocator;
allocator.deallocate(a.pointer());
}
};
//! Structure representing a single TrueType glyph.
struct SGUITTGlyph
{
//! Constructor.
SGUITTGlyph() : isLoaded(false), glyph_page(0), surface(0), parent(0) {}
//! Destructor.
~SGUITTGlyph() { unload(); }
//! Preload the glyph.
//! The preload process occurs when the program tries to cache the glyph from FT_Library.
//! However, it simply defines the SGUITTGlyph's properties and will only create the page
//! textures if necessary. The actual creation of the textures should only occur right
//! before the batch draw call.
void preload(u32 char_index, FT_Face face, video::IVideoDriver* driver, u32 font_size, const FT_Int32 loadFlags);
//! Unloads the glyph.
void unload();
//! Creates the IImage object from the FT_Bitmap.
video::IImage* createGlyphImage(const FT_Bitmap& bits, video::IVideoDriver* driver) const;
//! If true, the glyph has been loaded.
bool isLoaded;
//! The page the glyph is on.
u32 glyph_page;
//! The source rectangle for the glyph.
core::recti source_rect;
//! The offset of glyph when drawn.
core::vector2di offset;
//! Glyph advance information.
FT_Vector advance;
//! This is just the temporary image holder. After this glyph is paged,
//! it will be dropped.
mutable video::IImage* surface;
//! The pointer pointing to the parent (CGUITTFont)
CGUITTFont* parent;
};
//! Holds a sheet of glyphs.
class CGUITTGlyphPage
{
public:
CGUITTGlyphPage(video::IVideoDriver* Driver, const io::path& texture_name) :texture(0), available_slots(0), used_slots(0), dirty(false), driver(Driver), name(texture_name) {}
~CGUITTGlyphPage()
{
if (texture)
{
if (driver)
driver->removeTexture(texture);
else texture->drop();
}
}
//! Create the actual page texture,
bool createPageTexture(const u8& pixel_mode, const core::dimension2du& texture_size)
{
if( texture )
return false;
bool flgmip = driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS);
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
// Set the texture color format.
switch (pixel_mode)
{
case FT_PIXEL_MODE_MONO:
texture = driver->addTexture(texture_size, name, video::ECF_A1R5G5B5);
break;
case FT_PIXEL_MODE_GRAY:
default:
texture = driver->addTexture(texture_size, name, video::ECF_A8R8G8B8);
break;
}
// Restore our texture creation flags.
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, flgmip);
return texture ? true : false;
}
//! Add the glyph to a list of glyphs to be paged.
//! This collection will be cleared after updateTexture is called.
void pushGlyphToBePaged(const SGUITTGlyph* glyph)
{
glyph_to_be_paged.push_back(glyph);
}
//! Updates the texture atlas with new glyphs.
void updateTexture()
{
if (!dirty) return;
void* ptr = texture->lock();
video::ECOLOR_FORMAT format = texture->getColorFormat();
core::dimension2du size = texture->getOriginalSize();
video::IImage* pageholder = driver->createImageFromData(format, size, ptr, true, false);
for (u32 i = 0; i < glyph_to_be_paged.size(); ++i)
{
const SGUITTGlyph* glyph = glyph_to_be_paged[i];
if (glyph && glyph->isLoaded)
{
if (glyph->surface)
{
glyph->surface->copyTo(pageholder, glyph->source_rect.UpperLeftCorner);
glyph->surface->drop();
glyph->surface = 0;
}
else
{
; // TODO: add error message?
//currently, if we failed to create the image, just ignore this operation.
}
}
}
pageholder->drop();
texture->unlock();
glyph_to_be_paged.clear();
dirty = false;
}
video::ITexture* texture;
u32 available_slots;
u32 used_slots;
bool dirty;
core::array<core::vector2di> render_positions;
core::array<core::recti> render_source_rects;
private:
core::array<const SGUITTGlyph*> glyph_to_be_paged;
video::IVideoDriver* driver;
io::path name;
};
//! Class representing a TrueType font.
class CGUITTFont : public IGUIFont
{
public:
//! Creates a new TrueType font and returns a pointer to it. The pointer must be drop()'ed when finished.
//! \param env The IGUIEnvironment the font loads out of.
//! \param filename The filename of the font.
//! \param size The size of the font glyphs in pixels. Since this is the size of the individual glyphs, the true height of the font may change depending on the characters used.
//! \param antialias set the use_monochrome (opposite to antialias) flag
//! \param transparency set the use_transparency flag
//! \return Returns a pointer to a CGUITTFont. Will return 0 if the font failed to load.
static CGUITTFont* createTTFont(IGUIEnvironment *env, const io::path& filename, const u32 size, const bool antialias = true, const bool transparency = true);
static CGUITTFont* createTTFont(IrrlichtDevice *device, const io::path& filename, const u32 size, const bool antialias = true, const bool transparency = true);
static CGUITTFont* create(IGUIEnvironment *env, const io::path& filename, const u32 size, const bool antialias = true, const bool transparency = true);
static CGUITTFont* create(IrrlichtDevice *device, const io::path& filename, const u32 size, const bool antialias = true, const bool transparency = true);
//! Destructor
virtual ~CGUITTFont();
//! Sets the amount of glyphs to batch load.
virtual void setBatchLoadSize(u32 batch_size) { batch_load_size = batch_size; }
//! Sets the maximum texture size for a page of glyphs.
virtual void setMaxPageTextureSize(const core::dimension2du& texture_size) { max_page_texture_size = texture_size; }
//! Get the font size.
virtual u32 getFontSize() const { return size; }
//! Check the font's transparency.
virtual bool isTransparent() const { return use_transparency; }
//! Check if the font auto-hinting is enabled.
//! Auto-hinting is FreeType's built-in font hinting engine.
virtual bool useAutoHinting() const { return use_auto_hinting; }
//! Check if the font hinting is enabled.
virtual bool useHinting() const { return use_hinting; }
//! Check if the font is being loaded as a monochrome font.
//! The font can either be a 256 color grayscale font, or a 2 color monochrome font.
virtual bool useMonochrome() const { return use_monochrome; }
//! Tells the font to allow transparency when rendering.
//! Default: true.
//! \param flag If true, the font draws using transparency.
virtual void setTransparency(const bool flag);
//! Tells the font to use monochrome rendering.
//! Default: false.
//! \param flag If true, the font draws using a monochrome image. If false, the font uses a grayscale image.
virtual void setMonochrome(const bool flag);
//! Enables or disables font hinting.
//! Default: Hinting and auto-hinting true.
//! \param enable If false, font hinting is turned off. If true, font hinting is turned on.
//! \param enable_auto_hinting If true, FreeType uses its own auto-hinting algorithm. If false, it tries to use the algorithm specified by the font.
virtual void setFontHinting(const bool enable, const bool enable_auto_hinting = true);
//! Draws some text and clips it to the specified rectangle if wanted.
virtual void draw(const core::stringw& text, const core::rect<s32>& position,
video::SColor color, bool hcenter=false, bool vcenter=false,
const core::rect<s32>* clip=0);
//! Returns the dimension of a character produced by this font.
virtual core::dimension2d<u32> getCharDimension(const wchar_t ch) const;
//! Returns the dimension of a text string.
virtual core::dimension2d<u32> getDimension(const wchar_t* text) const;
virtual core::dimension2d<u32> getDimension(const core::ustring& text) const;
//! Calculates the index of the character in the text which is on a specific position.
virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const;
virtual s32 getCharacterFromPos(const core::ustring& text, s32 pixel_x) const;
//! Sets global kerning width for the font.
virtual void setKerningWidth(s32 kerning);
//! Sets global kerning height for the font.
virtual void setKerningHeight(s32 kerning);
//! Gets kerning values (distance between letters) for the font. If no parameters are provided,
virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const;
virtual s32 getKerningWidth(const uchar32_t thisLetter=0, const uchar32_t previousLetter=0) const;
//! Returns the distance between letters
virtual s32 getKerningHeight() const;
//! Define which characters should not be drawn by the font.
virtual void setInvisibleCharacters(const wchar_t *s);
virtual void setInvisibleCharacters(const core::ustring& s);
//! Get the last glyph page if there's still available slots.
//! If not, it will return zero.
CGUITTGlyphPage* getLastGlyphPage() const;
//! Create a new glyph page texture.
//! \param pixel_mode the pixel mode defined by FT_Pixel_Mode
//should be better typed. fix later.
CGUITTGlyphPage* createGlyphPage(const u8& pixel_mode);
//! Get the last glyph page's index.
u32 getLastGlyphPageIndex() const { return Glyph_Pages.size() - 1; }
//! Create corresponding character's software image copy from the font,
//! so you can use this data just like any ordinary video::IImage.
//! \param ch The character you need
virtual video::IImage* createTextureFromChar(const uchar32_t& ch);
//! This function is for debugging mostly. If the page doesn't exist it returns zero.
//! \param page_index Simply return the texture handle of a given page index.
virtual video::ITexture* getPageTextureByIndex(const u32& page_index) const;
//! Add a list of scene nodes generated by putting font textures on the 3D planes.
virtual core::array<scene::ISceneNode*> addTextSceneNode
(const wchar_t* text, scene::ISceneManager* smgr, scene::ISceneNode* parent = 0,
const video::SColor& color = video::SColor(255, 0, 0, 0), bool center = false );
protected:
bool use_monochrome;
bool use_transparency;
bool use_hinting;
bool use_auto_hinting;
u32 size;
u32 batch_load_size;
core::dimension2du max_page_texture_size;
private:
// Manages the FreeType library.
static FT_Library c_library;
static core::map<io::path, SGUITTFace*> c_faces;
static bool c_libraryLoaded;
static scene::IMesh* shared_plane_ptr_;
static scene::SMesh shared_plane_;
CGUITTFont(IGUIEnvironment *env);
bool load(const io::path& filename, const u32 size, const bool antialias, const bool transparency);
void reset_images();
void update_glyph_pages() const;
void update_load_flags()
{
// Set up our loading flags.
load_flags = FT_LOAD_DEFAULT | FT_LOAD_RENDER;
if (!useHinting()) load_flags |= FT_LOAD_NO_HINTING;
if (!useAutoHinting()) load_flags |= FT_LOAD_NO_AUTOHINT;
if (useMonochrome()) load_flags |= FT_LOAD_MONOCHROME | FT_LOAD_TARGET_MONO | FT_RENDER_MODE_MONO;
else load_flags |= FT_LOAD_TARGET_NORMAL;
}
u32 getWidthFromCharacter(wchar_t c) const;
u32 getWidthFromCharacter(uchar32_t c) const;
u32 getHeightFromCharacter(wchar_t c) const;
u32 getHeightFromCharacter(uchar32_t c) const;
u32 getGlyphIndexByChar(wchar_t c) const;
u32 getGlyphIndexByChar(uchar32_t c) const;
core::vector2di getKerning(const wchar_t thisLetter, const wchar_t previousLetter) const;
core::vector2di getKerning(const uchar32_t thisLetter, const uchar32_t previousLetter) const;
core::dimension2d<u32> getDimensionUntilEndOfLine(const wchar_t* p) const;
void createSharedPlane();
irr::IrrlichtDevice* Device;
gui::IGUIEnvironment* Environment;
video::IVideoDriver* Driver;
io::path filename;
FT_Face tt_face;
FT_Size_Metrics font_metrics;
FT_Int32 load_flags;
mutable core::array<CGUITTGlyphPage*> Glyph_Pages;
mutable core::array<SGUITTGlyph> Glyphs;
s32 GlobalKerningWidth;
s32 GlobalKerningHeight;
core::ustring Invisible;
};
} // end namespace gui
} // end namespace irr
#endif // __C_GUI_TTFONT_H_INCLUDED__

View File

@@ -0,0 +1,17 @@
include_directories(
${IRRLICHT_INCLUDE_DIR}
${FREETYPE_INCLUDE_DIRS}
)
# CGUITTFont authors, y u no include headers you use?
# Do not add CGUITTFont.cpp to the line below.
# xCGUITTFont.cpp is a wrapper file that includes
# additional required headers.
add_library(cguittfont xCGUITTFont.cpp)
target_link_libraries(
cguittfont
${IRRLICHT_LIBRARY}
${FREETYPE_LIBRARY}
${ZLIB_LIBRARIES} # needed by freetype, repeated here for safety
)

3877
src/cguittfont/irrUString.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,5 @@
// A wrapper source file to avoid hack with gcc and modifying
// the CGUITTFont files.
#include "xCGUITTFont.h"
#include "CGUITTFont.cpp"

View File

@@ -0,0 +1,7 @@
// A wrapper header to avoid hack with gcc and modifying
// the CGUITTFont files.
#include <algorithm>
#include <stddef.h>
#include "irrUString.h"
#include "CGUITTFont.h"

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -117,8 +117,8 @@ void ChatBuffer::deleteOldest(u32 count)
--count;
}
m_unformatted.erase(0, del_unformatted);
m_formatted.erase(0, del_formatted);
m_unformatted.erase(m_unformatted.begin(), m_unformatted.begin() + del_unformatted);
m_formatted.erase(m_formatted.begin(), m_formatted.begin() + del_formatted);
}
void ChatBuffer::deleteByAge(f32 maxAge)
@@ -232,10 +232,10 @@ void ChatBuffer::scrollTop()
}
u32 ChatBuffer::formatChatLine(const ChatLine& line, u32 cols,
core::array<ChatFormattedLine>& destination) const
std::vector<ChatFormattedLine>& destination) const
{
u32 num_added = 0;
core::array<ChatFormattedFragment> next_frags;
std::vector<ChatFormattedFragment> next_frags;
ChatFormattedLine next_line;
ChatFormattedFragment temp_frag;
u32 out_column = 0;
@@ -292,7 +292,7 @@ u32 ChatBuffer::formatChatLine(const ChatLine& line, u32 cols,
frag.column = out_column;
next_line.fragments.push_back(frag);
out_column += frag.text.size();
next_frags.erase(0, 1);
next_frags.erase(next_frags.begin());
}
else
{
@@ -414,7 +414,7 @@ std::wstring ChatPrompt::submit()
if (!line.empty())
m_history.push_back(line);
if (m_history.size() > m_history_limit)
m_history.erase(0);
m_history.erase(m_history.begin());
m_history_index = m_history.size();
m_view = 0;
m_cursor = 0;
@@ -464,7 +464,7 @@ void ChatPrompt::historyNext()
}
}
void ChatPrompt::nickCompletion(const core::list<std::wstring>& names, bool backwards)
void ChatPrompt::nickCompletion(const std::list<std::wstring>& names, bool backwards)
{
// Two cases:
// (a) m_nick_completion_start == m_nick_completion_end == 0
@@ -492,10 +492,10 @@ void ChatPrompt::nickCompletion(const core::list<std::wstring>& names, bool back
std::wstring prefix = m_line.substr(prefix_start, prefix_end - prefix_start);
// find all names that start with the selected prefix
core::array<std::wstring> completions;
for (core::list<std::wstring>::ConstIterator
std::vector<std::wstring> completions;
for (std::list<std::wstring>::const_iterator
i = names.begin();
i != names.end(); i++)
i != names.end(); ++i)
{
if (str_starts_with(*i, prefix, true))
{

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -22,6 +22,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irrlichttypes_bloated.h"
#include <string>
#include <vector>
#include <list>
// Chat console related classes, only used by the client
@@ -55,7 +57,7 @@ struct ChatFormattedFragment
struct ChatFormattedLine
{
// Array of text fragments
core::array<ChatFormattedFragment> fragments;
std::vector<ChatFormattedFragment> fragments;
// true if first line of one formatted ChatLine
bool first;
};
@@ -110,7 +112,7 @@ class ChatBuffer
// Appends the formatted lines to the destination array and
// returns the number of formatted lines.
u32 formatChatLine(const ChatLine& line, u32 cols,
core::array<ChatFormattedLine>& destination) const;
std::vector<ChatFormattedLine>& destination) const;
protected:
s32 getTopScrollPos() const;
@@ -120,7 +122,7 @@ class ChatBuffer
// Scrollback size
u32 m_scrollback;
// Array of unformatted chat lines
core::array<ChatLine> m_unformatted;
std::vector<ChatLine> m_unformatted;
// Number of character columns in console
u32 m_cols;
@@ -129,7 +131,7 @@ class ChatBuffer
// Scroll position (console's top line index into m_formatted)
s32 m_scroll;
// Array of formatted lines
core::array<ChatFormattedLine> m_formatted;
std::vector<ChatFormattedLine> m_formatted;
// Empty formatted line, for error returns
ChatFormattedLine m_empty_formatted_line;
};
@@ -158,7 +160,7 @@ class ChatPrompt
void historyNext();
// Nick completion
void nickCompletion(const core::list<std::wstring>& names, bool backwards);
void nickCompletion(const std::list<std::wstring>& names, bool backwards);
// Update console size and reformat the visible portion of the prompt
void reformat(u32 cols);
@@ -209,7 +211,7 @@ class ChatPrompt
// Currently edited line
std::wstring m_line;
// History buffer
core::array<std::wstring> m_history;
std::vector<std::wstring> m_history;
// History index (0 <= m_history_index <= m_history.size())
u32 m_history_index;
// Maximum number of history entries

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -33,6 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "nodemetadata.h"
#include "nodedef.h"
#include "itemdef.h"
#include "shader.h"
#include <IFileSystem.h>
#include "sha1.h"
#include "base64.h"
@@ -41,21 +42,19 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "sound.h"
#include "util/string.h"
#include "hex.h"
#include "IMeshCache.h"
#include "util/serialize.h"
#include "config.h"
#if USE_CURL
#include <curl/curl.h>
#endif
static std::string getMediaCacheDir()
{
return porting::path_user + DIR_DELIM + "cache" + DIR_DELIM + "media";
}
struct MediaRequest
{
std::string name;
MediaRequest(const std::string &name_=""):
name(name_)
{}
};
/*
QueuedMeshUpdate
*/
@@ -220,18 +219,60 @@ void * MeshUpdateThread::Thread()
return NULL;
}
void * MediaFetchThread::Thread()
{
ThreadStarted();
log_register_thread("MediaFetchThread");
DSTACK(__FUNCTION_NAME);
BEGIN_DEBUG_EXCEPTION_HANDLER
#if USE_CURL
CURL *curl;
CURLcode res;
for (std::list<MediaRequest>::iterator i = m_file_requests.begin();
i != m_file_requests.end(); ++i) {
curl = curl_easy_init();
assert(curl);
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(curl, CURLOPT_URL, (m_remote_url + i->name).c_str());
curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
std::ostringstream stream;
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_write_data);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &stream);
res = curl_easy_perform(curl);
if (res == CURLE_OK) {
std::string data = stream.str();
m_file_data.push_back(make_pair(i->name, data));
} else {
m_failed.push_back(*i);
infostream << "cURL request failed for " << i->name << std::endl;
}
curl_easy_cleanup(curl);
}
#endif
END_DEBUG_EXCEPTION_HANDLER(errorstream)
return NULL;
}
Client::Client(
IrrlichtDevice *device,
const char *playername,
std::string password,
MapDrawControl &control,
IWritableTextureSource *tsrc,
IWritableShaderSource *shsrc,
IWritableItemDefManager *itemdef,
IWritableNodeDefManager *nodedef,
ISoundManager *sound,
MtEventManager *event
):
m_tsrc(tsrc),
m_shsrc(shsrc),
m_itemdef(itemdef),
m_nodedef(nodedef),
m_sound(sound),
@@ -258,13 +299,15 @@ Client::Client(
m_password(password),
m_access_denied(false),
m_media_cache(getMediaCacheDir()),
m_media_receive_progress(0),
m_media_received(false),
m_media_receive_started(false),
m_media_count(0),
m_media_received_count(0),
m_itemdef_received(false),
m_nodedef_received(false),
m_time_of_day_set(false),
m_last_time_of_day_f(-1),
m_time_of_day_update_timer(0),
m_recommended_send_interval(0.1),
m_removed_sounds_check_timer(0)
{
m_packetcounter_timer = 0.0;
@@ -290,6 +333,9 @@ Client::Client(
m_env.addPlayer(player);
}
for (size_t i = 0; i < g_settings->getU16("media_fetch_threads"); ++i)
m_media_fetch_threads.push_back(new MediaFetchThread(this));
}
Client::~Client()
@@ -313,6 +359,10 @@ Client::~Client()
delete i->second;
}
}
for (std::list<MediaFetchThread*>::iterator i = m_media_fetch_threads.begin();
i != m_media_fetch_threads.end(); ++i)
delete *i;
}
void Client::connect(Address address)
@@ -498,8 +548,9 @@ void Client::step(float dtime)
// [2] u8 SER_FMT_VER_HIGHEST
// [3] u8[20] player_name
// [23] u8[28] password (new in some version)
// [51] u16 client network protocol version (new in some version)
SharedBuffer<u8> data(2+1+PLAYERNAME_SIZE+PASSWORD_SIZE+2);
// [51] u16 minimum supported network protocol version (added sometime)
// [53] u16 maximum supported network protocol version (added later than the previous one)
SharedBuffer<u8> data(2+1+PLAYERNAME_SIZE+PASSWORD_SIZE+2+2);
writeU16(&data[0], TOSERVER_INIT);
writeU8(&data[2], SER_FMT_VER_HIGHEST);
@@ -512,8 +563,8 @@ void Client::step(float dtime)
memset((char*)&data[23], 0, PASSWORD_SIZE);
snprintf((char*)&data[23], PASSWORD_SIZE, "%s", m_password.c_str());
// This should be incremented in each version
writeU16(&data[51], PROTOCOL_VERSION);
writeU16(&data[51], CLIENT_PROTOCOL_VERSION_MIN);
writeU16(&data[53], CLIENT_PROTOCOL_VERSION_MAX);
// Send as unreliable
Send(0, data, false);
@@ -534,7 +585,7 @@ void Client::step(float dtime)
if(m_map_timer_and_unload_interval.step(dtime, map_timer_and_unload_dtime))
{
ScopeProfiler sp(g_profiler, "Client: map timer and unload");
core::list<v3s16> deleted_blocks;
std::list<v3s16> deleted_blocks;
m_env.getMap().timerUpdate(map_timer_and_unload_dtime,
g_settings->getFloat("client_unload_unused_data_timeout"),
&deleted_blocks);
@@ -548,8 +599,8 @@ void Client::step(float dtime)
NOTE: This loop is intentionally iterated the way it is.
*/
core::list<v3s16>::Iterator i = deleted_blocks.begin();
core::list<v3s16> sendlist;
std::list<v3s16>::iterator i = deleted_blocks.begin();
std::list<v3s16> sendlist;
for(;;)
{
if(sendlist.size() == 255 || i == deleted_blocks.end())
@@ -568,9 +619,9 @@ void Client::step(float dtime)
writeU16(&reply[0], TOSERVER_DELETEDBLOCKS);
reply[2] = sendlist.size();
u32 k = 0;
for(core::list<v3s16>::Iterator
for(std::list<v3s16>::iterator
j = sendlist.begin();
j != sendlist.end(); j++)
j != sendlist.end(); ++j)
{
writeV3S16(&reply[2+1+6*k], *j);
k++;
@@ -584,7 +635,7 @@ void Client::step(float dtime)
}
sendlist.push_back(*i);
i++;
++i;
}
}
@@ -655,7 +706,7 @@ void Client::step(float dtime)
{
float &counter = m_playerpos_send_timer;
counter += dtime;
if(counter >= 0.2)
if(counter >= m_recommended_send_interval)
{
counter = 0.0;
sendPlayerPos();
@@ -676,7 +727,7 @@ void Client::step(float dtime)
<<std::endl;*/
int num_processed_meshes = 0;
while(m_mesh_update_thread.m_queue_out.size() > 0)
while(!m_mesh_update_thread.m_queue_out.empty())
{
num_processed_meshes++;
MeshUpdateResult r = m_mesh_update_thread.m_queue_out.pop_front();
@@ -723,6 +774,62 @@ void Client::step(float dtime)
g_profiler->graphAdd("num_processed_meshes", num_processed_meshes);
}
/*
Load fetched media
*/
if (m_media_receive_started) {
bool all_stopped = true;
for (std::list<MediaFetchThread*>::iterator thread = m_media_fetch_threads.begin();
thread != m_media_fetch_threads.end(); ++thread) {
all_stopped &= !(*thread)->IsRunning();
while (!(*thread)->m_file_data.empty()) {
std::pair <std::string, std::string> out = (*thread)->m_file_data.pop_front();
++m_media_received_count;
bool success = loadMedia(out.second, out.first);
if(success){
verbosestream<<"Client: Loaded received media: "
<<"\""<<out.first<<"\". Caching."<<std::endl;
} else{
infostream<<"Client: Failed to load received media: "
<<"\""<<out.first<<"\". Not caching."<<std::endl;
continue;
}
bool did = fs::CreateAllDirs(getMediaCacheDir());
if(!did){
errorstream<<"Could not create media cache directory"
<<std::endl;
}
{
std::map<std::string, std::string>::iterator n;
n = m_media_name_sha1_map.find(out.first);
if(n == m_media_name_sha1_map.end())
errorstream<<"The server sent a file that has not "
<<"been announced."<<std::endl;
else
m_media_cache.update_sha1(out.second);
}
}
}
if (all_stopped) {
std::list<MediaRequest> fetch_failed;
for (std::list<MediaFetchThread*>::iterator thread = m_media_fetch_threads.begin();
thread != m_media_fetch_threads.end(); ++thread) {
for (std::list<MediaRequest>::iterator request = (*thread)->m_failed.begin();
request != (*thread)->m_failed.end(); ++request)
fetch_failed.push_back(*request);
(*thread)->m_failed.clear();
}
if (fetch_failed.size() > 0) {
infostream << "Failed to remote-fetch " << fetch_failed.size() << " files. "
<< "Requesting them the usual way." << std::endl;
request_media(fetch_failed);
}
}
}
/*
If the server didn't update the inventory in a while, revert
the local inventory (so the player notices the lag problem
@@ -821,7 +928,7 @@ bool Client::loadMedia(const std::string &data, const std::string &filename)
if(name != "")
{
verbosestream<<"Client: Attempting to load image "
<<"file \""<<filename<<"\""<<std::endl;
<<"file \""<<filename<<"\""<<std::endl;
io::IFileSystem *irrfs = m_device->getFileSystem();
video::IVideoDriver *vdrv = m_device->getVideoDriver();
@@ -855,11 +962,33 @@ bool Client::loadMedia(const std::string &data, const std::string &filename)
if(name != "")
{
verbosestream<<"Client: Attempting to load sound "
<<"file \""<<filename<<"\""<<std::endl;
<<"file \""<<filename<<"\""<<std::endl;
m_sound->loadSoundData(name, data);
return true;
}
const char *model_ext[] = {
".x", ".b3d", ".md2", ".obj",
NULL
};
name = removeStringEnd(filename, model_ext);
if(name != "")
{
verbosestream<<"Client: Storing model into Irrlicht: "
<<"\""<<filename<<"\""<<std::endl;
io::IFileSystem *irrfs = m_device->getFileSystem();
io::IReadFile *rfile = irrfs->createMemoryReadFile(
*data_rw, data_rw.getSize(), filename.c_str());
assert(rfile);
scene::ISceneManager *smgr = m_device->getSceneManager();
scene::IAnimatedMesh *mesh = smgr->getMesh(rfile);
smgr->getMeshCache()->addMesh(filename.c_str(), mesh);
return true;
}
errorstream<<"Client: Don't know how to load file \""
<<filename<<"\""<<std::endl;
return false;
@@ -878,6 +1007,34 @@ void Client::deletingPeer(con::Peer *peer, bool timeout)
<<"(timeout="<<timeout<<")"<<std::endl;
}
/*
u16 command
u16 number of files requested
for each file {
u16 length of name
string name
}
*/
void Client::request_media(const std::list<MediaRequest> &file_requests)
{
std::ostringstream os(std::ios_base::binary);
writeU16(os, TOSERVER_REQUEST_MEDIA);
writeU16(os, file_requests.size());
for(std::list<MediaRequest>::const_iterator i = file_requests.begin();
i != file_requests.end(); ++i) {
os<<serializeString(i->name);
}
// Make data buffer
std::string s = os.str();
SharedBuffer<u8> data((u8*)s.c_str(), s.size());
// Send as reliable
Send(0, data, true);
infostream<<"Client: Sending media request list to server ("
<<file_requests.size()<<" files)"<<std::endl;
}
void Client::ReceiveAll()
{
DSTACK(__FUNCTION_NAME);
@@ -997,6 +1154,14 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
m_map_seed = readU64(&data[2+1+6]);
infostream<<"Client: received map seed: "<<m_map_seed<<std::endl;
}
if(datasize >= 2+1+6+8+4)
{
// Get map seed
m_recommended_send_interval = readF1000(&data[2+1+6+8]);
infostream<<"Client: received recommended send interval "
<<m_recommended_send_interval<<std::endl;
}
// Reply to server
u32 replysize = 2;
@@ -1349,6 +1514,26 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
}
}
}
else if(command == TOCLIENT_MOVEMENT)
{
std::string datastring((char*)&data[2], datasize-2);
std::istringstream is(datastring, std::ios_base::binary);
Player *player = m_env.getLocalPlayer();
assert(player != NULL);
player->movement_acceleration_default = readF1000(is) * BS;
player->movement_acceleration_air = readF1000(is) * BS;
player->movement_acceleration_fast = readF1000(is) * BS;
player->movement_speed_walk = readF1000(is) * BS;
player->movement_speed_crouch = readF1000(is) * BS;
player->movement_speed_fast = readF1000(is) * BS;
player->movement_speed_climb = readF1000(is) * BS;
player->movement_speed_jump = readF1000(is) * BS;
player->movement_liquid_fluidity = readF1000(is) * BS;
player->movement_liquid_fluidity_smooth = readF1000(is) * BS;
player->movement_liquid_sink = readF1000(is) * BS;
player->movement_gravity = readF1000(is) * BS;
}
else if(command == TOCLIENT_HP)
{
std::string datastring((char*)&data[2], datasize-2);
@@ -1434,10 +1619,10 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
int num_files = readU16(is);
verbosestream<<"Client received TOCLIENT_ANNOUNCE_MEDIA ("
<<num_files<<" files)"<<std::endl;
infostream<<"Client: Received media announcement: packet size: "
<<datasize<<std::endl;
core::list<MediaRequest> file_requests;
std::list<MediaRequest> file_requests;
for(int i=0; i<num_files; i++)
{
@@ -1456,7 +1641,7 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
std::string sha1_hex = hex_encode(sha1_raw);
std::ostringstream tmp_os(std::ios_base::binary);
bool found_in_cache = m_media_cache.load_sha1(sha1_raw, tmp_os);
m_media_name_sha1_map.set(name, sha1_raw);
m_media_name_sha1_map[name] = sha1_raw;
// If found in cache, try to load it from there
if(found_in_cache)
@@ -1477,37 +1662,52 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
file_requests.push_back(MediaRequest(name));
}
std::string remote_media = "";
try {
remote_media = deSerializeString(is);
}
catch(SerializationError) {
// not supported by server or turned off
}
m_media_count = file_requests.size();
m_media_receive_started = true;
if (remote_media == "" || !USE_CURL) {
request_media(file_requests);
} else {
#if USE_CURL
std::list<MediaFetchThread*>::iterator cur = m_media_fetch_threads.begin();
for(std::list<MediaRequest>::iterator i = file_requests.begin();
i != file_requests.end(); ++i) {
(*cur)->m_file_requests.push_back(*i);
cur++;
if (cur == m_media_fetch_threads.end())
cur = m_media_fetch_threads.begin();
}
for (std::list<MediaFetchThread*>::iterator i = m_media_fetch_threads.begin();
i != m_media_fetch_threads.end(); ++i) {
(*i)->m_remote_url = remote_media;
(*i)->Start();
}
#endif
// notify server we received everything
std::ostringstream os(std::ios_base::binary);
writeU16(os, TOSERVER_RECEIVED_MEDIA);
std::string s = os.str();
SharedBuffer<u8> data((u8*)s.c_str(), s.size());
// Send as reliable
Send(0, data, true);
}
ClientEvent event;
event.type = CE_TEXTURES_UPDATED;
m_client_event_queue.push_back(event);
/*
u16 command
u16 number of files requested
for each file {
u16 length of name
string name
}
*/
std::ostringstream os(std::ios_base::binary);
writeU16(os, TOSERVER_REQUEST_MEDIA);
writeU16(os, file_requests.size());
for(core::list<MediaRequest>::Iterator i = file_requests.begin();
i != file_requests.end(); i++) {
os<<serializeString(i->name);
}
// Make data buffer
std::string s = os.str();
SharedBuffer<u8> data((u8*)s.c_str(), s.size());
// Send as reliable
Send(0, data, true);
infostream<<"Client: Sending media request list to server ("
<<file_requests.size()<<" files)"<<std::endl;
}
else if(command == TOCLIENT_MEDIA)
{
if (m_media_count == 0)
return;
std::string datastring((char*)&data[2], datasize-2);
std::istringstream is(datastring, std::ios_base::binary);
@@ -1529,17 +1729,12 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
*/
int num_bunches = readU16(is);
int bunch_i = readU16(is);
if(num_bunches >= 2)
m_media_receive_progress = (float)bunch_i / (float)(num_bunches - 1);
else
m_media_receive_progress = 1.0;
if(bunch_i == num_bunches - 1)
m_media_received = true;
int num_files = readU32(is);
infostream<<"Client: Received files: bunch "<<bunch_i<<"/"
<<num_bunches<<" files="<<num_files
<<" size="<<datasize<<std::endl;
for(int i=0; i<num_files; i++){
m_media_received_count++;
std::string name = deSerializeString(is);
std::string data = deSerializeLongString(is);
@@ -1567,9 +1762,9 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
}
{
core::map<std::string, std::string>::Node *n;
std::map<std::string, std::string>::iterator n;
n = m_media_name_sha1_map.find(name);
if(n == NULL)
if(n == m_media_name_sha1_map.end())
errorstream<<"The server sent a file that has not "
<<"been announced."<<std::endl;
else
@@ -1725,6 +1920,105 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
}
inv->deSerialize(is);
}
else if(command == TOCLIENT_SHOW_FORMSPEC)
{
std::string datastring((char*)&data[2], datasize-2);
std::istringstream is(datastring, std::ios_base::binary);
std::string formspec = deSerializeLongString(is);
std::string formname = deSerializeString(is);
ClientEvent event;
event.type = CE_SHOW_FORMSPEC;
// pointer is required as event is a struct only!
// adding a std:string to a struct isn't possible
event.show_formspec.formspec = new std::string(formspec);
event.show_formspec.formname = new std::string(formname);
m_client_event_queue.push_back(event);
}
else if(command == TOCLIENT_SPAWN_PARTICLE)
{
std::string datastring((char*)&data[2], datasize-2);
std::istringstream is(datastring, std::ios_base::binary);
v3f pos = readV3F1000(is);
v3f vel = readV3F1000(is);
v3f acc = readV3F1000(is);
float expirationtime = readF1000(is);
float size = readF1000(is);
bool collisiondetection = readU8(is);
std::string texture = deSerializeLongString(is);
ClientEvent event;
event.type = CE_SPAWN_PARTICLE;
event.spawn_particle.pos = new v3f (pos);
event.spawn_particle.vel = new v3f (vel);
event.spawn_particle.acc = new v3f (acc);
event.spawn_particle.expirationtime = expirationtime;
event.spawn_particle.size = size;
event.add_particlespawner.collisiondetection =
collisiondetection;
event.spawn_particle.texture = new std::string(texture);
m_client_event_queue.push_back(event);
}
else if(command == TOCLIENT_ADD_PARTICLESPAWNER)
{
std::string datastring((char*)&data[2], datasize-2);
std::istringstream is(datastring, std::ios_base::binary);
u16 amount = readU16(is);
float spawntime = readF1000(is);
v3f minpos = readV3F1000(is);
v3f maxpos = readV3F1000(is);
v3f minvel = readV3F1000(is);
v3f maxvel = readV3F1000(is);
v3f minacc = readV3F1000(is);
v3f maxacc = readV3F1000(is);
float minexptime = readF1000(is);
float maxexptime = readF1000(is);
float minsize = readF1000(is);
float maxsize = readF1000(is);
bool collisiondetection = readU8(is);
std::string texture = deSerializeLongString(is);
u32 id = readU32(is);
ClientEvent event;
event.type = CE_ADD_PARTICLESPAWNER;
event.add_particlespawner.amount = amount;
event.add_particlespawner.spawntime = spawntime;
event.add_particlespawner.minpos = new v3f (minpos);
event.add_particlespawner.maxpos = new v3f (maxpos);
event.add_particlespawner.minvel = new v3f (minvel);
event.add_particlespawner.maxvel = new v3f (maxvel);
event.add_particlespawner.minacc = new v3f (minacc);
event.add_particlespawner.maxacc = new v3f (maxacc);
event.add_particlespawner.minexptime = minexptime;
event.add_particlespawner.maxexptime = maxexptime;
event.add_particlespawner.minsize = minsize;
event.add_particlespawner.maxsize = maxsize;
event.add_particlespawner.collisiondetection = collisiondetection;
event.add_particlespawner.texture = new std::string(texture);
event.add_particlespawner.id = id;
m_client_event_queue.push_back(event);
}
else if(command == TOCLIENT_DELETE_PARTICLESPAWNER)
{
std::string datastring((char*)&data[2], datasize-2);
std::istringstream is(datastring, std::ios_base::binary);
u32 id = readU16(is);
ClientEvent event;
event.type = CE_DELETE_PARTICLESPAWNER;
event.delete_particlespawner.id = id;
m_client_event_queue.push_back(event);
}
else
{
infostream<<"Client: Ignoring unknown command "
@@ -1939,10 +2233,24 @@ void Client::sendPlayerPos()
{
//JMutexAutoLock envlock(m_env_mutex); //bulk comment-out
Player *myplayer = m_env.getLocalPlayer();
LocalPlayer *myplayer = m_env.getLocalPlayer();
if(myplayer == NULL)
return;
// Save bandwidth by only updating position when something changed
if(myplayer->last_position == myplayer->getPosition() &&
myplayer->last_speed == myplayer->getSpeed() &&
myplayer->last_pitch == myplayer->getPitch() &&
myplayer->last_yaw == myplayer->getYaw() &&
myplayer->last_keyPressed == myplayer->keyPressed)
return;
myplayer->last_position = myplayer->getPosition();
myplayer->last_speed = myplayer->getSpeed();
myplayer->last_pitch = myplayer->getPitch();
myplayer->last_yaw = myplayer->getYaw();
myplayer->last_keyPressed = myplayer->keyPressed;
u16 our_peer_id;
{
//JMutexAutoLock lock(m_con_mutex); //bulk comment-out
@@ -1961,7 +2269,7 @@ void Client::sendPlayerPos()
v3s32 speed(sf.X*100, sf.Y*100, sf.Z*100);
s32 pitch = myplayer->getPitch() * 100;
s32 yaw = myplayer->getYaw() * 100;
u32 keyPressed=myplayer->keyPressed;
/*
Format:
[0] u16 command
@@ -1969,15 +2277,15 @@ void Client::sendPlayerPos()
[2+12] v3s32 speed*100
[2+12+12] s32 pitch*100
[2+12+12+4] s32 yaw*100
[2+12+12+4+4] u32 keyPressed
*/
SharedBuffer<u8> data(2+12+12+4+4);
SharedBuffer<u8> data(2+12+12+4+4+4);
writeU16(&data[0], TOSERVER_PLAYERPOS);
writeV3S32(&data[2], position);
writeV3S32(&data[2+12], speed);
writeS32(&data[2+12+12], pitch);
writeS32(&data[2+12+12+4], yaw);
writeS32(&data[2+12+12+4], yaw);
writeU32(&data[2+12+12+4+4], keyPressed);
// Send as unreliable
Send(0, data, false);
}
@@ -2006,7 +2314,7 @@ void Client::sendPlayerItem(u16 item)
void Client::removeNode(v3s16 p)
{
core::map<v3s16, MapBlock*> modified_blocks;
std::map<v3s16, MapBlock*> modified_blocks;
try
{
@@ -2020,12 +2328,11 @@ void Client::removeNode(v3s16 p)
// add urgent task to update the modified node
addUpdateMeshTaskForNode(p, false, true);
for(core::map<v3s16, MapBlock * >::Iterator
i = modified_blocks.getIterator();
i.atEnd() == false; i++)
for(std::map<v3s16, MapBlock * >::iterator
i = modified_blocks.begin();
i != modified_blocks.end(); ++i)
{
v3s16 p = i.getNode()->getKey();
addUpdateMeshTaskWithEdge(p);
addUpdateMeshTaskWithEdge(i->first);
}
}
@@ -2033,7 +2340,7 @@ void Client::addNode(v3s16 p, MapNode n)
{
TimeTaker timer1("Client::addNode()");
core::map<v3s16, MapBlock*> modified_blocks;
std::map<v3s16, MapBlock*> modified_blocks;
try
{
@@ -2043,12 +2350,11 @@ void Client::addNode(v3s16 p, MapNode n)
catch(InvalidPositionException &e)
{}
for(core::map<v3s16, MapBlock * >::Iterator
i = modified_blocks.getIterator();
i.atEnd() == false; i++)
for(std::map<v3s16, MapBlock * >::iterator
i = modified_blocks.begin();
i != modified_blocks.end(); ++i)
{
v3s16 p = i.getNode()->getKey();
addUpdateMeshTaskWithEdge(p);
addUpdateMeshTaskWithEdge(i->first);
}
}
@@ -2148,7 +2454,7 @@ ClientActiveObject * Client::getSelectedActiveObject(
core::line3d<f32> shootline_on_map
)
{
core::array<DistanceSortedActiveObject> objects;
std::vector<DistanceSortedActiveObject> objects;
m_env.getActiveObjects(from_pos_f_on_map, max_d, objects);
@@ -2156,7 +2462,7 @@ ClientActiveObject * Client::getSelectedActiveObject(
// Sort them.
// After this, the closest object is the first in the array.
objects.sort();
std::sort(objects.begin(), objects.end());
for(u32 i=0; i<objects.size(); i++)
{
@@ -2195,13 +2501,13 @@ void Client::printDebugInfo(std::ostream &os)
<<std::endl;*/
}
core::list<std::wstring> Client::getConnectedPlayerNames()
std::list<std::wstring> Client::getConnectedPlayerNames()
{
core::list<Player*> players = m_env.getPlayers(true);
core::list<std::wstring> playerNames;
for(core::list<Player*>::Iterator
std::list<Player*> players = m_env.getPlayers(true);
std::list<std::wstring> playerNames;
for(std::list<Player*>::iterator
i = players.begin();
i != players.end(); i++)
i != players.end(); ++i)
{
Player *player = *i;
playerNames.push_back(narrow_to_wide(player->getName()));
@@ -2404,41 +2710,53 @@ ClientEvent Client::getClientEvent()
void Client::afterContentReceived()
{
verbosestream<<"Client::afterContentReceived() started"<<std::endl;
infostream<<"Client::afterContentReceived() started"<<std::endl;
assert(m_itemdef_received);
assert(m_nodedef_received);
assert(m_media_received);
assert(texturesReceived());
// remove the information about which checksum each texture
// ought to have
m_media_name_sha1_map.clear();
// Rebuild inherited images and recreate textures
verbosestream<<"Rebuilding images and textures"<<std::endl;
infostream<<"- Rebuilding images and textures"<<std::endl;
m_tsrc->rebuildImagesAndTextures();
// Update texture atlas
verbosestream<<"Updating texture atlas"<<std::endl;
infostream<<"- Updating texture atlas"<<std::endl;
if(g_settings->getBool("enable_texture_atlas"))
m_tsrc->buildMainAtlas(this);
// Rebuild shaders
m_shsrc->rebuildShaders();
// Update node aliases
verbosestream<<"Updating node aliases"<<std::endl;
infostream<<"- Updating node aliases"<<std::endl;
m_nodedef->updateAliases(m_itemdef);
// Update node textures
verbosestream<<"Updating node textures"<<std::endl;
infostream<<"- Updating node textures"<<std::endl;
m_nodedef->updateTextures(m_tsrc);
// Update item textures and meshes
verbosestream<<"Updating item textures and meshes"<<std::endl;
m_itemdef->updateTexturesAndMeshes(this);
// Preload item textures and meshes if configured to
if(g_settings->getBool("preload_item_visuals"))
{
verbosestream<<"Updating item textures and meshes"<<std::endl;
std::set<std::string> names = m_itemdef->getAll();
for(std::set<std::string>::const_iterator
i = names.begin(); i != names.end(); ++i){
// Asking for these caches the result
m_itemdef->getInventoryTexture(*i, this);
m_itemdef->getWieldMesh(*i, this);
}
}
// Start mesh update thread after setting up content definitions
verbosestream<<"Starting mesh update thread"<<std::endl;
infostream<<"- Starting mesh update thread"<<std::endl;
m_mesh_update_thread.Start();
verbosestream<<"Client::afterContentReceived() done"<<std::endl;
infostream<<"Client::afterContentReceived() done"<<std::endl;
}
float Client::getRTT(void)
@@ -2469,6 +2787,10 @@ ITextureSource* Client::getTextureSource()
{
return m_tsrc;
}
IShaderSource* Client::getShaderSource()
{
return m_shsrc;
}
u16 Client::allocateUnknownNodeId(const std::string &name)
{
errorstream<<"Client::allocateUnknownNodeId(): "

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -33,12 +33,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "filesys.h"
#include "filecache.h"
#include "localplayer.h"
#include "server.h"
#include "particles.h"
#include "util/pointedthing.h"
#include <algorithm>
struct MeshMakeData;
class MapBlockMesh;
class IGameDef;
class IWritableTextureSource;
class IWritableShaderSource;
class IWritableItemDefManager;
class IWritableNodeDefManager;
//class IWritableCraftDefManager;
@@ -128,13 +132,35 @@ class MeshUpdateThread : public SimpleThread
IGameDef *m_gamedef;
};
class MediaFetchThread : public SimpleThread
{
public:
MediaFetchThread(IGameDef *gamedef):
m_gamedef(gamedef)
{
}
void * Thread();
std::list<MediaRequest> m_file_requests;
MutexedQueue<std::pair<std::string, std::string> > m_file_data;
std::list<MediaRequest> m_failed;
std::string m_remote_url;
IGameDef *m_gamedef;
};
enum ClientEventType
{
CE_NONE,
CE_PLAYER_DAMAGE,
CE_PLAYER_FORCE_MOVE,
CE_DEATHSCREEN,
CE_TEXTURES_UPDATED
CE_TEXTURES_UPDATED,
CE_SHOW_FORMSPEC,
CE_SPAWN_PARTICLE,
CE_ADD_PARTICLESPAWNER,
CE_DELETE_PARTICLESPAWNER
};
struct ClientEvent
@@ -156,8 +182,41 @@ struct ClientEvent
f32 camera_point_target_y;
f32 camera_point_target_z;
} deathscreen;
struct{
std::string* formspec;
std::string* formname;
} show_formspec;
struct{
} textures_updated;
struct{
v3f *pos;
v3f *vel;
v3f *acc;
f32 expirationtime;
f32 size;
bool collisiondetection;
std::string *texture;
} spawn_particle;
struct{
u16 amount;
f32 spawntime;
v3f *minpos;
v3f *maxpos;
v3f *minvel;
v3f *maxvel;
v3f *minacc;
v3f *maxacc;
f32 minexptime;
f32 maxexptime;
f32 minsize;
f32 maxsize;
bool collisiondetection;
std::string *texture;
u32 id;
} add_particlespawner;
struct{
u32 id;
} delete_particlespawner;
};
};
@@ -174,6 +233,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
std::string password,
MapDrawControl &control,
IWritableTextureSource *tsrc,
IWritableShaderSource *shsrc,
IWritableItemDefManager *itemdef,
IWritableNodeDefManager *nodedef,
ISoundManager *sound,
@@ -255,7 +315,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
// Prints a line or two of info
void printDebugInfo(std::ostream &os);
core::list<std::wstring> getConnectedPlayerNames();
std::list<std::wstring> getConnectedPlayerNames();
float getAnimationTime();
@@ -287,10 +347,13 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
{ return m_access_denied_reason; }
float mediaReceiveProgress()
{ return m_media_receive_progress; }
{
if (!m_media_receive_started) return 0;
return 1.0 * m_media_received_count / m_media_count;
}
bool texturesReceived()
{ return m_media_received; }
{ return m_media_receive_started && m_media_received_count == m_media_count; }
bool itemdefReceived()
{ return m_itemdef_received; }
bool nodedefReceived()
@@ -305,6 +368,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
virtual INodeDefManager* getNodeDefManager();
virtual ICraftDefManager* getCraftDefManager();
virtual ITextureSource* getTextureSource();
virtual IShaderSource* getShaderSource();
virtual u16 allocateUnknownNodeId(const std::string &name);
virtual ISoundManager* getSoundManager();
virtual MtEventManager* getEventManager();
@@ -315,7 +379,9 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
// Insert a media file appropriately into the appropriate manager
bool loadMedia(const std::string &data, const std::string &filename);
void request_media(const std::list<MediaRequest> &file_requests);
// Virtual methods from con::PeerHandler
void peerAdded(con::Peer *peer);
void deletingPeer(con::Peer *peer, bool timeout);
@@ -337,12 +403,14 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
IntervalLimiter m_map_timer_and_unload_interval;
IWritableTextureSource *m_tsrc;
IWritableShaderSource *m_shsrc;
IWritableItemDefManager *m_itemdef;
IWritableNodeDefManager *m_nodedef;
ISoundManager *m_sound;
MtEventManager *m_event;
MeshUpdateThread m_mesh_update_thread;
std::list<MediaFetchThread*> m_media_fetch_threads;
ClientEnvironment m_env;
con::Connection m_con;
IrrlichtDevice *m_device;
@@ -352,7 +420,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
bool m_inventory_updated;
Inventory *m_inventory_from_server;
float m_inventory_from_server_age;
core::map<v3s16, bool> m_active_blocks;
std::set<v3s16> m_active_blocks;
PacketCounter m_packetcounter;
// Block mesh animation parameters
float m_animation_time;
@@ -370,9 +438,10 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
Queue<ClientEvent> m_client_event_queue;
FileCache m_media_cache;
// Mapping from media file name to SHA1 checksum
core::map<std::string, std::string> m_media_name_sha1_map;
float m_media_receive_progress;
bool m_media_received;
std::map<std::string, std::string> m_media_name_sha1_map;
bool m_media_receive_started;
u32 m_media_count;
u32 m_media_received_count;
bool m_itemdef_received;
bool m_nodedef_received;
friend class FarMesh;
@@ -382,6 +451,9 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
float m_last_time_of_day_f;
float m_time_of_day_update_timer;
// An interval for generally sending object positions and stuff
float m_recommended_send_interval;
// Sounds
float m_removed_sounds_check_timer;
// Mapping from server sound ids to our sound ids

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -30,6 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "profiler.h"
#include "settings.h"
#include "util/mathconstants.h"
#include <algorithm>
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
@@ -83,7 +84,7 @@ MapSector * ClientMap::emergeSector(v2s16 p2d)
{
//JMutexAutoLock lock(m_sector_mutex); // Bulk comment-out
m_sectors.insert(p2d, sector);
m_sectors[p2d] = sector;
}
return sector;
@@ -164,11 +165,11 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
INodeDefManager *nodemgr = m_gamedef->ndef();
for(core::map<v3s16, MapBlock*>::Iterator
i = m_drawlist.getIterator();
i.atEnd() == false; i++)
for(std::map<v3s16, MapBlock*>::iterator
i = m_drawlist.begin();
i != m_drawlist.end(); ++i)
{
MapBlock *block = i.getNode()->getValue();
MapBlock *block = i->second;
block->refDrop();
}
m_drawlist.clear();
@@ -215,11 +216,11 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
// Blocks from which stuff was actually drawn
//u32 blocks_without_stuff = 0;
for(core::map<v2s16, MapSector*>::Iterator
si = m_sectors.getIterator();
si.atEnd() == false; si++)
for(std::map<v2s16, MapSector*>::iterator
si = m_sectors.begin();
si != m_sectors.end(); ++si)
{
MapSector *sector = si.getNode()->getValue();
MapSector *sector = si->second;
v2s16 sp = sector->getPos();
if(m_control.range_all == false)
@@ -231,7 +232,7 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
continue;
}
core::list< MapBlock * > sectorblocks;
std::list< MapBlock * > sectorblocks;
sector->getBlocks(sectorblocks);
/*
@@ -240,7 +241,7 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
u32 sector_blocks_drawn = 0;
core::list< MapBlock * >::Iterator i;
std::list< MapBlock * >::iterator i;
for(i=sectorblocks.begin(); i!=sectorblocks.end(); i++)
{
MapBlock *block = *i;
@@ -350,26 +351,30 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver)
} // foreach sectorblocks
if(sector_blocks_drawn != 0)
m_last_drawn_sectors[sp] = true;
m_last_drawn_sectors.insert(sp);
}
m_control.blocks_would_have_drawn = blocks_would_have_drawn;
m_control.blocks_drawn = blocks_drawn;
g_profiler->avg("CM: blocks in range", blocks_in_range);
g_profiler->avg("CM: blocks occlusion culled", blocks_occlusion_culled);
if(blocks_in_range != 0)
g_profiler->avg("CM: blocks in range without mesh (frac)",
(float)blocks_in_range_without_mesh/blocks_in_range);
g_profiler->avg("CM: blocks drawn", blocks_drawn);
g_profiler->avg("CM: wanted max blocks", m_control.wanted_max_blocks);
}
struct MeshBufList
{
video::SMaterial m;
core::list<scene::IMeshBuffer*> bufs;
std::list<scene::IMeshBuffer*> bufs;
};
struct MeshBufListList
{
core::list<MeshBufList> lists;
std::list<MeshBufList> lists;
void clear()
{
@@ -378,8 +383,8 @@ struct MeshBufListList
void add(scene::IMeshBuffer *buf)
{
for(core::list<MeshBufList>::Iterator i = lists.begin();
i != lists.end(); i++){
for(std::list<MeshBufList>::iterator i = lists.begin();
i != lists.end(); ++i){
MeshBufList &l = *i;
if(l.m == buf->getMaterial()){
l.bufs.push_back(buf);
@@ -413,6 +418,10 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
m_last_drawn_sectors.clear();
}
bool use_trilinear_filter = g_settings->getBool("trilinear_filter");
bool use_bilinear_filter = g_settings->getBool("bilinear_filter");
bool use_anisotropic_filter = g_settings->getBool("anisotropic_filter");
/*
Get time for measuring timeout.
@@ -463,9 +472,6 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
u32 mesh_animate_count = 0;
u32 mesh_animate_count_far = 0;
// Blocks that had mesh that would have been drawn according to
// rendering range (if max blocks limit didn't kick in)
u32 blocks_would_have_drawn = 0;
// Blocks that were drawn and had a mesh
u32 blocks_drawn = 0;
// Blocks which had a corresponding meshbuffer for this pass
@@ -482,11 +488,11 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
MeshBufListList drawbufs;
for(core::map<v3s16, MapBlock*>::Iterator
i = m_drawlist.getIterator();
i.atEnd() == false; i++)
for(std::map<v3s16, MapBlock*>::iterator
i = m_drawlist.begin();
i != m_drawlist.end(); ++i)
{
MapBlock *block = i.getNode()->getValue();
MapBlock *block = i->second;
// If the mesh of the block happened to get deleted, ignore it
if(block->mesh == NULL)
@@ -544,6 +550,11 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
for(u32 i=0; i<c; i++)
{
scene::IMeshBuffer *buf = mesh->getMeshBuffer(i);
buf->getMaterial().setFlag(video::EMF_TRILINEAR_FILTER, use_trilinear_filter);
buf->getMaterial().setFlag(video::EMF_BILINEAR_FILTER, use_bilinear_filter);
buf->getMaterial().setFlag(video::EMF_ANISOTROPIC_FILTER, use_anisotropic_filter);
const video::SMaterial& material = buf->getMaterial();
video::IMaterialRenderer* rnd =
driver->getMaterialRenderer(material.MaterialType);
@@ -559,11 +570,11 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
}
}
core::list<MeshBufList> &lists = drawbufs.lists;
std::list<MeshBufList> &lists = drawbufs.lists;
int timecheck_counter = 0;
for(core::list<MeshBufList>::Iterator i = lists.begin();
i != lists.end(); i++)
for(std::list<MeshBufList>::iterator i = lists.begin();
i != lists.end(); ++i)
{
{
timecheck_counter++;
@@ -585,8 +596,8 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
driver->setMaterial(list.m);
for(core::list<scene::IMeshBuffer*>::Iterator j = list.bufs.begin();
j != list.bufs.end(); j++)
for(std::list<scene::IMeshBuffer*>::iterator j = list.bufs.begin();
j != list.bufs.end(); ++j)
{
scene::IMeshBuffer *buf = *j;
driver->drawMeshBuffer(buf);
@@ -656,9 +667,6 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
g_profiler->avg(prefix+"empty blocks (frac)",
(float)blocks_without_stuff / blocks_drawn);
m_control.blocks_drawn = blocks_drawn;
m_control.blocks_would_have_drawn = blocks_would_have_drawn;
/*infostream<<"renderMap(): is_transparent_pass="<<is_transparent_pass
<<", rendered "<<vertex_count<<" vertices."<<std::endl;*/
}
@@ -762,7 +770,7 @@ int ClientMap::getBackgroundBrightness(float max_d, u32 daylight_factor,
float sunlight_min_d = max_d*0.8;
if(sunlight_min_d > 35*BS)
sunlight_min_d = 35*BS;
core::array<int> values;
std::vector<int> values;
for(u32 i=0; i<sizeof(z_directions)/sizeof(*z_directions); i++){
v3f z_dir = z_directions[i];
z_dir.normalize();
@@ -791,7 +799,7 @@ int ClientMap::getBackgroundBrightness(float max_d, u32 daylight_factor,
}
int brightness_sum = 0;
int brightness_count = 0;
values.sort();
std::sort(values.begin(), values.end());
u32 num_values_to_use = values.size();
if(num_values_to_use >= 10)
num_values_to_use -= num_values_to_use/2;
@@ -857,7 +865,7 @@ void ClientMap::renderPostFx()
// - If the player is in liquid, draw a semi-transparent overlay.
const ContentFeatures& features = nodemgr->get(n);
video::SColor post_effect_color = features.post_effect_color;
if(features.solidness == 2 && g_settings->getBool("free_move") == false)
if(features.solidness == 2 && !(g_settings->getBool("noclip") && m_gamedef->checkLocalPrivilege("noclip")))
{
post_effect_color = video::SColor(255, 0, 0, 0);
}

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -22,6 +22,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irrlichttypes_extrabloated.h"
#include "map.h"
#include <set>
#include <map>
struct MapDrawControl
{
@@ -128,7 +130,7 @@ class ClientMap : public Map, public scene::ISceneNode
// Check if sector was drawn on last render()
bool sectorWasDrawn(v2s16 p)
{
return (m_last_drawn_sectors.find(p) != NULL);
return (m_last_drawn_sectors.find(p) != m_last_drawn_sectors.end());
}
private:
@@ -143,9 +145,9 @@ class ClientMap : public Map, public scene::ISceneNode
f32 m_camera_fov;
JMutex m_camera_mutex;
core::map<v3s16, MapBlock*> m_drawlist;
std::map<v3s16, MapBlock*> m_drawlist;
core::map<v2s16, bool> m_last_drawn_sectors;
std::set<v2s16> m_last_drawn_sectors;
};
#endif

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -36,16 +36,16 @@ ClientActiveObject::ClientActiveObject(u16 id, IGameDef *gamedef,
ClientActiveObject::~ClientActiveObject()
{
removeFromScene();
removeFromScene(true);
}
ClientActiveObject* ClientActiveObject::create(u8 type, IGameDef *gamedef,
ClientEnvironment *env)
{
// Find factory function
core::map<u16, Factory>::Node *n;
std::map<u16, Factory>::iterator n;
n = m_types.find(type);
if(n == NULL)
if(n == m_types.end())
{
// If factory is not found, just return.
dstream<<"WARNING: ClientActiveObject: No factory for type="
@@ -53,18 +53,18 @@ ClientActiveObject* ClientActiveObject::create(u8 type, IGameDef *gamedef,
return NULL;
}
Factory f = n->getValue();
Factory f = n->second;
ClientActiveObject *object = (*f)(gamedef, env);
return object;
}
void ClientActiveObject::registerType(u16 type, Factory f)
{
core::map<u16, Factory>::Node *n;
std::map<u16, Factory>::iterator n;
n = m_types.find(type);
if(n)
if(n != m_types.end())
return;
m_types.insert(type, f);
m_types[type] = f;
}

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irrlichttypes_extrabloated.h"
#include "activeobject.h"
#include <map>
/*
@@ -49,13 +50,19 @@ class ClientActiveObject : public ActiveObject
virtual void addToScene(scene::ISceneManager *smgr, ITextureSource *tsrc,
IrrlichtDevice *irr){}
virtual void removeFromScene(){}
virtual void removeFromScene(bool permanent){}
// 0 <= light_at_pos <= LIGHT_SUN
virtual void updateLight(u8 light_at_pos){}
virtual v3s16 getLightPosition(){return v3s16(0,0,0);}
virtual core::aabbox3d<f32>* getSelectionBox(){return NULL;}
virtual core::aabbox3d<f32>* getCollisionBox(){return NULL;}
virtual v3f getPosition(){return v3f(0,0,0);}
virtual scene::IMeshSceneNode *getMeshSceneNode(){return NULL;}
virtual scene::IAnimatedMeshSceneNode *getAnimatedMeshSceneNode(){return NULL;}
virtual scene::IBillboardSceneNode *getSpriteSceneNode(){return NULL;}
virtual bool isPlayer(){return false;}
virtual bool isLocalPlayer(){return false;}
virtual void setAttachments(){}
virtual bool doShowSelectionBox(){return true;}
// Step object in time
@@ -90,7 +97,7 @@ class ClientActiveObject : public ActiveObject
ClientEnvironment *m_env;
private:
// Used for creating objects based on type
static core::map<u16, Factory> m_types;
static std::map<u16, Factory> m_types;
};
struct DistanceSortedActiveObject
@@ -104,7 +111,7 @@ struct DistanceSortedActiveObject
d = a_d;
}
bool operator < (DistanceSortedActiveObject &other)
bool operator < (const DistanceSortedActiveObject &other) const
{
return d < other.d;
}

31
src/clientserver.cpp Normal file
View File

@@ -0,0 +1,31 @@
/*
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "clientserver.h"
#include "util/serialize.h"
SharedBuffer<u8> makePacket_TOCLIENT_TIME_OF_DAY(u16 time, float time_speed)
{
SharedBuffer<u8> data(2+2+4);
writeU16(&data[0], TOCLIENT_TIME_OF_DAY);
writeU16(&data[2], time);
writeF1000(&data[4], time_speed);
return data;
}

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -20,7 +20,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef CLIENTSERVER_HEADER
#define CLIENTSERVER_HEADER
#include "util/serialize.h"
#include "util/pointer.h"
SharedBuffer<u8> makePacket_TOCLIENT_TIME_OF_DAY(u16 time, float time_speed);
/*
changes by PROTOCOL_VERSION:
@@ -67,10 +69,38 @@ with this program; if not, write to the Free Software Foundation, Inc.,
TOCLIENT_DETACHED_INVENTORY
PROTOCOL_VERSION 13:
InventoryList field "Width" (deserialization fails with old versions)
PROTOCOL_VERSION 14:
Added transfer of player pressed keys to the server
Added new messages for mesh and bone animation, as well as attachments
GENERIC_CMD_SET_ANIMATION
GENERIC_CMD_SET_BONE_POSITION
GENERIC_CMD_SET_ATTACHMENT
PROTOCOL_VERSION 15:
Serialization format changes
PROTOCOL_VERSION 16:
TOCLIENT_SHOW_FORMSPEC
PROTOCOL_VERSION 17:
Serialization format change: include backface_culling flag in TileDef
Added rightclickable field in nodedef
TOCLIENT_SPAWN_PARTICLE
TOCLIENT_ADD_PARTICLESPAWNER
TOCLIENT_DELETE_PARTICLESPAWNER
PROTOCOL_VERSION 18:
damageGroups added to ToolCapabilities
sound_place added to ItemDefinition
*/
#define PROTOCOL_VERSION 13
#define LATEST_PROTOCOL_VERSION 18
// Server's supported network protocol range
#define SERVER_PROTOCOL_VERSION_MIN 13
#define SERVER_PROTOCOL_VERSION_MAX LATEST_PROTOCOL_VERSION
// Client's supported network protocol range
#define CLIENT_PROTOCOL_VERSION_MIN 13
#define CLIENT_PROTOCOL_VERSION_MAX LATEST_PROTOCOL_VERSION
// Constant that differentiates the protocol from random data and other protocols
#define PROTOCOL_ID 0x4f457403
#define PASSWORD_SIZE 28 // Maximum password length. Allows for
@@ -89,6 +119,7 @@ enum ToClientCommand
[2] u8 deployed version
[3] v3s16 player's position + v3f(0,BS/2,0) floatToInt'd
[12] u64 map seed (new as of 2011-02-27)
[20] f1000 recommended send interval (in seconds) (new as of 14)
NOTE: The position in here is deprecated; position is
explicitly sent afterwards
@@ -247,6 +278,8 @@ enum ToClientCommand
u32 length of data
data
}
u16 length of remote media server url (if applicable)
string url
*/
TOCLIENT_TOOLDEF = 0x39,
@@ -332,6 +365,72 @@ enum ToClientCommand
u8[len] name
[2] serialized inventory
*/
TOCLIENT_SHOW_FORMSPEC = 0x44,
/*
[0] u16 command
u32 len
u8[len] formspec
u16 len
u8[len] formname
*/
TOCLIENT_MOVEMENT = 0x45,
/*
u16 command
f1000 movement_acceleration_default
f1000 movement_acceleration_air
f1000 movement_acceleration_fast
f1000 movement_speed_walk
f1000 movement_speed_crouch
f1000 movement_speed_fast
f1000 movement_speed_climb
f1000 movement_speed_jump
f1000 movement_liquid_fluidity
f1000 movement_liquid_fluidity_smooth
f1000 movement_liquid_sink
f1000 movement_gravity
*/
TOCLIENT_SPAWN_PARTICLE = 0x46,
/*
u16 command
v3f1000 pos
v3f1000 velocity
v3f1000 acceleration
f1000 expirationtime
f1000 size
u8 bool collisiondetection
u32 len
u8[len] texture
*/
TOCLIENT_ADD_PARTICLESPAWNER = 0x47,
/*
u16 command
u16 amount
f1000 spawntime
v3f1000 minpos
v3f1000 maxpos
v3f1000 minvel
v3f1000 maxvel
v3f1000 minacc
v3f1000 maxacc
f1000 minexptime
f1000 maxexptime
f1000 minsize
f1000 maxsize
u8 bool collisiondetection
u32 len
u8[len] texture
u32 id
*/
TOCLIENT_DELETE_PARTICLESPAWNER = 0x48,
/*
u16 command
u32 id
*/
};
enum ToServerCommand
@@ -344,7 +443,8 @@ enum ToServerCommand
[2] u8 SER_FMT_VER_HIGHEST
[3] u8[20] player_name
[23] u8[28] password (new in some version)
[51] u16 client network protocol version (new in some version)
[51] u16 minimum supported network protocol version (added sometime)
[53] u16 maximum supported network protocol version (added later than the previous one)
*/
TOSERVER_INIT2 = 0x11,
@@ -366,6 +466,7 @@ enum ToServerCommand
[2+12] v3s32 speed*100
[2+12+12] s32 pitch*100
[2+12+12+4] s32 yaw*100
[2+12+12+4+4] u32 keyPressed
*/
TOSERVER_GOTBLOCKS = 0x24,
@@ -549,16 +650,11 @@ enum ToServerCommand
}
*/
TOSERVER_RECEIVED_MEDIA = 0x41,
/*
u16 command
*/
};
inline SharedBuffer<u8> makePacket_TOCLIENT_TIME_OF_DAY(u16 time, float time_speed)
{
SharedBuffer<u8> data(2+2+4);
writeU16(&data[0], TOCLIENT_TIME_OF_DAY);
writeU16(&data[2], time);
writeF1000(&data[4], time_speed);
return data;
}
#endif

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2012 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -29,7 +29,8 @@ Clouds::Clouds(
scene::ISceneNode* parent,
scene::ISceneManager* mgr,
s32 id,
u32 seed
u32 seed,
s16 cloudheight
):
scene::ISceneNode(parent, mgr, id),
m_seed(seed),
@@ -45,8 +46,8 @@ Clouds::Clouds(
//m_material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA;
m_material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
m_cloud_y = BS*100;
//m_cloud_y = BS*50;
m_cloud_y = BS * (cloudheight ? cloudheight :
g_settings->getS16("cloud_height"));
m_box = core::aabbox3d<f32>(-BS*1000000,m_cloud_y-BS,-BS*1000000,
BS*1000000,m_cloud_y+BS,BS*1000000);

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -30,7 +30,8 @@ class Clouds : public scene::ISceneNode
scene::ISceneNode* parent,
scene::ISceneManager* mgr,
s32 id,
u32 seed
u32 seed,
s16 cloudheight=0
);
~Clouds();

View File

@@ -7,7 +7,9 @@
#define CMAKE_VERSION_STRING "@VERSION_STRING@"
#define CMAKE_RUN_IN_PLACE @RUN_IN_PLACE@
#define CMAKE_USE_GETTEXT @USE_GETTEXT@
#define CMAKE_USE_CURL @USE_CURL@
#define CMAKE_USE_SOUND @USE_SOUND@
#define CMAKE_USE_FREETYPE @USE_FREETYPE@
#define CMAKE_STATIC_SHAREDIR "@SHAREDIR@"
#ifdef NDEBUG

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -23,7 +23,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "nodedef.h"
#include "gamedef.h"
#include "log.h"
#include "environment.h"
#include "serverobject.h"
#include <vector>
#include <set>
#include "util/timetaker.h"
#include "main.h" // g_profiler
#include "profiler.h"
@@ -186,11 +189,12 @@ bool wouldCollideWithCeiling(
}
collisionMoveResult collisionMoveSimple(Map *map, IGameDef *gamedef,
collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
f32 pos_max_d, const aabb3f &box_0,
f32 stepheight, f32 dtime,
v3f &pos_f, v3f &speed_f, v3f &accel_f)
{
Map *map = &env->getMap();
//TimeTaker tt("collisionMoveSimple");
ScopeProfiler sp(g_profiler, "collisionMoveSimple avg", SPT_AVG);
@@ -199,6 +203,10 @@ collisionMoveResult collisionMoveSimple(Map *map, IGameDef *gamedef,
/*
Calculate new velocity
*/
if( dtime > 0.5 ) {
infostream<<"collisionMoveSimple: WARNING: maximum step interval exceeded, lost movement details!"<<std::endl;
dtime = 0.5;
}
speed_f += accel_f * dtime;
// If there is no speed, there are no collisions
@@ -211,6 +219,7 @@ collisionMoveResult collisionMoveSimple(Map *map, IGameDef *gamedef,
std::vector<aabb3f> cboxes;
std::vector<bool> is_unloaded;
std::vector<bool> is_step_up;
std::vector<bool> is_object;
std::vector<int> bouncy_values;
std::vector<v3s16> node_positions;
{
@@ -252,6 +261,7 @@ collisionMoveResult collisionMoveSimple(Map *map, IGameDef *gamedef,
is_step_up.push_back(false);
bouncy_values.push_back(n_bouncy_value);
node_positions.push_back(p);
is_object.push_back(false);
}
}
catch(InvalidPositionException &e)
@@ -263,14 +273,72 @@ collisionMoveResult collisionMoveSimple(Map *map, IGameDef *gamedef,
is_step_up.push_back(false);
bouncy_values.push_back(0);
node_positions.push_back(p);
is_object.push_back(false);
}
}
} // tt2
{
ScopeProfiler sp(g_profiler, "collisionMoveSimple objects avg", SPT_AVG);
//TimeTaker tt3("collisionMoveSimple collect object boxes");
/* add object boxes to cboxes */
std::list<ActiveObject*> objects;
#ifndef SERVER
ClientEnvironment *c_env = dynamic_cast<ClientEnvironment*>(env);
if (c_env != 0)
{
f32 distance = speed_f.getLength();
std::vector<DistanceSortedActiveObject> clientobjects;
c_env->getActiveObjects(pos_f,distance * 1.5,clientobjects);
for (int i=0; i < clientobjects.size(); i++)
{
objects.push_back((ActiveObject*)clientobjects[i].obj);
}
}
else
#endif
{
ServerEnvironment *s_env = dynamic_cast<ServerEnvironment*>(env);
if (s_env != 0)
{
f32 distance = speed_f.getLength();
std::set<u16> s_objects = s_env->getObjectsInsideRadius(pos_f,distance * 1.5);
for (std::set<u16>::iterator iter = s_objects.begin(); iter != s_objects.end(); iter++)
{
ServerActiveObject *current = s_env->getActiveObject(*iter);
objects.push_back((ActiveObject*)current);
}
}
}
for (std::list<ActiveObject*>::const_iterator iter = objects.begin();iter != objects.end(); ++iter)
{
ActiveObject *object = *iter;
if (object != NULL)
{
aabb3f object_collisionbox;
if (object->getCollisionBox(&object_collisionbox))
{
cboxes.push_back(object_collisionbox);
is_unloaded.push_back(false);
is_step_up.push_back(false);
bouncy_values.push_back(0);
node_positions.push_back(v3s16(0,0,0));
is_object.push_back(true);
}
}
}
} //tt3
assert(cboxes.size() == is_unloaded.size());
assert(cboxes.size() == is_step_up.size());
assert(cboxes.size() == bouncy_values.size());
assert(cboxes.size() == node_positions.size());
assert(cboxes.size() == is_object.size());
/*
Collision detection
@@ -382,7 +450,11 @@ collisionMoveResult collisionMoveSimple(Map *map, IGameDef *gamedef,
is_collision = false;
CollisionInfo info;
info.type = COLLISION_NODE;
if (is_object[nearest_boxindex]) {
info.type = COLLISION_OBJECT;
}
else
info.type = COLLISION_NODE;
info.node_p = node_positions[nearest_boxindex];
info.bouncy = bouncy;
info.old_speed = speed_f;

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -25,10 +25,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
class Map;
class IGameDef;
class Environment;
enum CollisionType
{
COLLISION_NODE
COLLISION_NODE,
COLLISION_OBJECT,
};
struct CollisionInfo
@@ -65,7 +67,7 @@ struct collisionMoveResult
};
// Moves using a single iteration; speed should not exceed pos_max_d/dtime
collisionMoveResult collisionMoveSimple(Map *map, IGameDef *gamedef,
collisionMoveResult collisionMoveSimple(Environment *env,IGameDef *gamedef,
f32 pos_max_d, const aabb3f &box_0,
f32 stepheight, f32 dtime,
v3f &pos_f, v3f &speed_f, v3f &accel_f);

View File

@@ -11,6 +11,8 @@
#define RUN_IN_PLACE 0
#define USE_GETTEXT 0
#define USE_SOUND 0
#define USE_CURL 0
#define USE_FREETYPE 0
#define STATIC_SHAREDIR ""
#define BUILD_INFO "non-cmake"
@@ -26,6 +28,10 @@
#define USE_GETTEXT CMAKE_USE_GETTEXT
#undef USE_SOUND
#define USE_SOUND CMAKE_USE_SOUND
#undef USE_CURL
#define USE_CURL CMAKE_USE_CURL
#undef USE_FREETYPE
#define USE_FREETYPE CMAKE_USE_FREETYPE
#undef STATIC_SHAREDIR
#define STATIC_SHAREDIR CMAKE_STATIC_SHAREDIR
#undef BUILD_INFO

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "util/serialize.h"
#include "util/numeric.h"
#include "util/string.h"
#include "settings.h"
namespace con
{
@@ -75,19 +76,20 @@ SharedBuffer<u8> makeOriginalPacket(
return b;
}
core::list<SharedBuffer<u8> > makeSplitPacket(
std::list<SharedBuffer<u8> > makeSplitPacket(
SharedBuffer<u8> data,
u32 chunksize_max,
u16 seqnum)
{
// Chunk packets, containing the TYPE_SPLIT header
core::list<SharedBuffer<u8> > chunks;
std::list<SharedBuffer<u8> > chunks;
u32 chunk_header_size = 7;
u32 maximum_data_size = chunksize_max - chunk_header_size;
u32 start = 0;
u32 end = 0;
u32 chunk_num = 0;
u16 chunk_count = 0;
do{
end = start + maximum_data_size - 1;
if(end > data.getSize() - 1)
@@ -105,16 +107,15 @@ core::list<SharedBuffer<u8> > makeSplitPacket(
memcpy(&chunk[chunk_header_size], &data[start], payload_size);
chunks.push_back(chunk);
chunk_count++;
start = end + 1;
chunk_num++;
}
while(end != data.getSize() - 1);
u16 chunk_count = chunks.getSize();
core::list<SharedBuffer<u8> >::Iterator i = chunks.begin();
for(; i != chunks.end(); i++)
for(std::list<SharedBuffer<u8> >::iterator i = chunks.begin();
i != chunks.end(); ++i)
{
// Write chunk_count
writeU16(&((*i)[3]), chunk_count);
@@ -123,13 +124,13 @@ core::list<SharedBuffer<u8> > makeSplitPacket(
return chunks;
}
core::list<SharedBuffer<u8> > makeAutoSplitPacket(
std::list<SharedBuffer<u8> > makeAutoSplitPacket(
SharedBuffer<u8> data,
u32 chunksize_max,
u16 &split_seqnum)
{
u32 original_header_size = 1;
core::list<SharedBuffer<u8> > list;
std::list<SharedBuffer<u8> > list;
if(data.getSize() + original_header_size > chunksize_max)
{
list = makeSplitPacket(data, chunksize_max, split_seqnum);
@@ -169,11 +170,13 @@ SharedBuffer<u8> makeReliablePacket(
ReliablePacketBuffer
*/
ReliablePacketBuffer::ReliablePacketBuffer(): m_list_size(0) {}
void ReliablePacketBuffer::print()
{
core::list<BufferedPacket>::Iterator i;
i = m_list.begin();
for(; i != m_list.end(); i++)
for(std::list<BufferedPacket>::iterator i = m_list.begin();
i != m_list.end();
++i)
{
u16 s = readU16(&(i->data[BASE_HEADER_SIZE+1]));
dout_con<<s<<" ";
@@ -185,13 +188,12 @@ bool ReliablePacketBuffer::empty()
}
u32 ReliablePacketBuffer::size()
{
return m_list.getSize();
return m_list_size;
}
RPBSearchResult ReliablePacketBuffer::findPacket(u16 seqnum)
{
core::list<BufferedPacket>::Iterator i;
i = m_list.begin();
for(; i != m_list.end(); i++)
std::list<BufferedPacket>::iterator i = m_list.begin();
for(; i != m_list.end(); ++i)
{
u16 s = readU16(&(i->data[BASE_HEADER_SIZE+1]));
/*dout_con<<"findPacket(): finding seqnum="<<seqnum
@@ -217,8 +219,8 @@ BufferedPacket ReliablePacketBuffer::popFirst()
if(empty())
throw NotFoundException("Buffer is empty");
BufferedPacket p = *m_list.begin();
core::list<BufferedPacket>::Iterator i = m_list.begin();
m_list.erase(i);
m_list.erase(m_list.begin());
--m_list_size;
return p;
}
BufferedPacket ReliablePacketBuffer::popSeqnum(u16 seqnum)
@@ -230,6 +232,7 @@ BufferedPacket ReliablePacketBuffer::popSeqnum(u16 seqnum)
}
BufferedPacket p = *r;
m_list.erase(r);
--m_list_size;
return p;
}
void ReliablePacketBuffer::insert(BufferedPacket &p)
@@ -239,6 +242,7 @@ void ReliablePacketBuffer::insert(BufferedPacket &p)
assert(type == TYPE_RELIABLE);
u16 seqnum = readU16(&p.data[BASE_HEADER_SIZE+1]);
++m_list_size;
// Find the right place for the packet and insert it there
// If list is empty, just add it
@@ -249,12 +253,12 @@ void ReliablePacketBuffer::insert(BufferedPacket &p)
return;
}
// Otherwise find the right place
core::list<BufferedPacket>::Iterator i;
i = m_list.begin();
std::list<BufferedPacket>::iterator i = m_list.begin();
// Find the first packet in the list which has a higher seqnum
for(; i != m_list.end(); i++){
for(; i != m_list.end(); ++i){
u16 s = readU16(&(i->data[BASE_HEADER_SIZE+1]));
if(s == seqnum){
--m_list_size;
throw AlreadyExistsException("Same seqnum in list");
}
if(seqnum_higher(s, seqnum)){
@@ -270,14 +274,14 @@ void ReliablePacketBuffer::insert(BufferedPacket &p)
return;
}
// Insert before i
m_list.insert_before(i, p);
m_list.insert(i, p);
}
void ReliablePacketBuffer::incrementTimeouts(float dtime)
{
core::list<BufferedPacket>::Iterator i;
i = m_list.begin();
for(; i != m_list.end(); i++){
for(std::list<BufferedPacket>::iterator i = m_list.begin();
i != m_list.end(); ++i)
{
i->time += dtime;
i->totaltime += dtime;
}
@@ -285,9 +289,9 @@ void ReliablePacketBuffer::incrementTimeouts(float dtime)
void ReliablePacketBuffer::resetTimedOuts(float timeout)
{
core::list<BufferedPacket>::Iterator i;
i = m_list.begin();
for(; i != m_list.end(); i++){
for(std::list<BufferedPacket>::iterator i = m_list.begin();
i != m_list.end(); ++i)
{
if(i->time >= timeout)
i->time = 0.0;
}
@@ -295,21 +299,20 @@ void ReliablePacketBuffer::resetTimedOuts(float timeout)
bool ReliablePacketBuffer::anyTotaltimeReached(float timeout)
{
core::list<BufferedPacket>::Iterator i;
i = m_list.begin();
for(; i != m_list.end(); i++){
for(std::list<BufferedPacket>::iterator i = m_list.begin();
i != m_list.end(); ++i)
{
if(i->totaltime >= timeout)
return true;
}
return false;
}
core::list<BufferedPacket> ReliablePacketBuffer::getTimedOuts(float timeout)
std::list<BufferedPacket> ReliablePacketBuffer::getTimedOuts(float timeout)
{
core::list<BufferedPacket> timed_outs;
core::list<BufferedPacket>::Iterator i;
i = m_list.begin();
for(; i != m_list.end(); i++)
std::list<BufferedPacket> timed_outs;
for(std::list<BufferedPacket>::iterator i = m_list.begin();
i != m_list.end(); ++i)
{
if(i->time >= timeout)
timed_outs.push_back(*i);
@@ -323,11 +326,10 @@ core::list<BufferedPacket> ReliablePacketBuffer::getTimedOuts(float timeout)
IncomingSplitBuffer::~IncomingSplitBuffer()
{
core::map<u16, IncomingSplitPacket*>::Iterator i;
i = m_buf.getIterator();
for(; i.atEnd() == false; i++)
for(std::map<u16, IncomingSplitPacket*>::iterator i = m_buf.begin();
i != m_buf.end(); ++i)
{
delete i.getNode()->getValue();
delete i->second;
}
}
/*
@@ -345,7 +347,7 @@ SharedBuffer<u8> IncomingSplitBuffer::insert(BufferedPacket &p, bool reliable)
u16 chunk_num = readU16(&p.data[BASE_HEADER_SIZE+5]);
// Add if doesn't exist
if(m_buf.find(seqnum) == NULL)
if(m_buf.find(seqnum) == m_buf.end())
{
IncomingSplitPacket *sp = new IncomingSplitPacket();
sp->chunk_count = chunk_count;
@@ -368,7 +370,7 @@ SharedBuffer<u8> IncomingSplitBuffer::insert(BufferedPacket &p, bool reliable)
// If chunk already exists, ignore it.
// Sometimes two identical packets may arrive when there is network
// lag and the server re-sends stuff.
if(sp->chunks.find(chunk_num) != NULL)
if(sp->chunks.find(chunk_num) != sp->chunks.end())
return SharedBuffer<u8>();
// Cut chunk data out of packet
@@ -385,11 +387,10 @@ SharedBuffer<u8> IncomingSplitBuffer::insert(BufferedPacket &p, bool reliable)
// Calculate total size
u32 totalsize = 0;
core::map<u16, SharedBuffer<u8> >::Iterator i;
i = sp->chunks.getIterator();
for(; i.atEnd() == false; i++)
for(std::map<u16, SharedBuffer<u8> >::iterator i = sp->chunks.begin();
i != sp->chunks.end(); ++i)
{
totalsize += i.getNode()->getValue().getSize();
totalsize += i->second.getSize();
}
SharedBuffer<u8> fulldata(totalsize);
@@ -406,34 +407,32 @@ SharedBuffer<u8> IncomingSplitBuffer::insert(BufferedPacket &p, bool reliable)
}
// Remove sp from buffer
m_buf.remove(seqnum);
m_buf.erase(seqnum);
delete sp;
return fulldata;
}
void IncomingSplitBuffer::removeUnreliableTimedOuts(float dtime, float timeout)
{
core::list<u16> remove_queue;
core::map<u16, IncomingSplitPacket*>::Iterator i;
i = m_buf.getIterator();
for(; i.atEnd() == false; i++)
std::list<u16> remove_queue;
for(std::map<u16, IncomingSplitPacket*>::iterator i = m_buf.begin();
i != m_buf.end(); ++i)
{
IncomingSplitPacket *p = i.getNode()->getValue();
IncomingSplitPacket *p = i->second;
// Reliable ones are not removed by timeout
if(p->reliable == true)
continue;
p->time += dtime;
if(p->time >= timeout)
remove_queue.push_back(i.getNode()->getKey());
remove_queue.push_back(i->first);
}
core::list<u16>::Iterator j;
j = remove_queue.begin();
for(; j != remove_queue.end(); j++)
for(std::list<u16>::iterator j = remove_queue.begin();
j != remove_queue.end(); ++j)
{
dout_con<<"NOTE: Removing timed out unreliable split packet"
<<std::endl;
delete m_buf[*j];
m_buf.remove(*j);
m_buf.erase(*j);
}
}
@@ -466,7 +465,10 @@ Peer::Peer(u16 a_id, Address a_address):
m_sendtime_accu(0),
m_max_packets_per_second(10),
m_num_sent(0),
m_max_num_sent(0)
m_max_num_sent(0),
congestion_control_aim_rtt(0.2),
congestion_control_max_rate(400),
congestion_control_min_rate(10)
{
}
Peer::~Peer()
@@ -477,15 +479,15 @@ void Peer::reportRTT(float rtt)
{
if(rtt >= 0.0){
if(rtt < 0.01){
if(m_max_packets_per_second < 400)
if(m_max_packets_per_second < congestion_control_max_rate)
m_max_packets_per_second += 10;
} else if(rtt < 0.2){
if(m_max_packets_per_second < 100)
} else if(rtt < congestion_control_aim_rtt){
if(m_max_packets_per_second < congestion_control_max_rate)
m_max_packets_per_second += 2;
} else {
m_max_packets_per_second *= 0.8;
if(m_max_packets_per_second < 10)
m_max_packets_per_second = 10;
if(m_max_packets_per_second < congestion_control_min_rate)
m_max_packets_per_second = congestion_control_min_rate;
}
}
@@ -552,12 +554,11 @@ Connection::~Connection()
{
stop();
// Delete peers
for(core::map<u16, Peer*>::Iterator
j = m_peers.getIterator();
j.atEnd() == false; j++)
for(std::map<u16, Peer*>::iterator
j = m_peers.begin();
j != m_peers.end(); ++j)
{
Peer *peer = j.getNode()->getValue();
delete peer;
delete j->second;
}
}
@@ -587,7 +588,7 @@ void * Connection::Thread()
runTimeouts(dtime);
while(m_command_queue.size() != 0){
while(!m_command_queue.empty()){
ConnectionCommand c = m_command_queue.pop_front();
processCommand(c);
}
@@ -644,18 +645,18 @@ void Connection::processCommand(ConnectionCommand &c)
void Connection::send(float dtime)
{
for(core::map<u16, Peer*>::Iterator
j = m_peers.getIterator();
j.atEnd() == false; j++)
for(std::map<u16, Peer*>::iterator
j = m_peers.begin();
j != m_peers.end(); ++j)
{
Peer *peer = j.getNode()->getValue();
Peer *peer = j->second;
peer->m_sendtime_accu += dtime;
peer->m_num_sent = 0;
peer->m_max_num_sent = peer->m_sendtime_accu *
peer->m_max_packets_per_second;
}
Queue<OutgoingPacket> postponed_packets;
while(m_outgoing_queue.size() != 0){
while(!m_outgoing_queue.empty()){
OutgoingPacket packet = m_outgoing_queue.pop_front();
Peer *peer = getPeerNoEx(packet.peer_id);
if(!peer)
@@ -670,14 +671,14 @@ void Connection::send(float dtime)
postponed_packets.push_back(packet);
}
}
while(postponed_packets.size() != 0){
while(!postponed_packets.empty()){
m_outgoing_queue.push_back(postponed_packets.pop_front());
}
for(core::map<u16, Peer*>::Iterator
j = m_peers.getIterator();
j.atEnd() == false; j++)
for(std::map<u16, Peer*>::iterator
j = m_peers.begin();
j != m_peers.end(); ++j)
{
Peer *peer = j.getNode()->getValue();
Peer *peer = j->second;
peer->m_sendtime_accu -= (float)peer->m_num_sent /
peer->m_max_packets_per_second;
if(peer->m_sendtime_accu > 10. / peer->m_max_packets_per_second)
@@ -747,11 +748,11 @@ void Connection::receive()
Allow only entries that have has_sent_with_id==false.
*/
core::map<u16, Peer*>::Iterator j;
j = m_peers.getIterator();
for(; j.atEnd() == false; j++)
std::map<u16, Peer*>::iterator j;
j = m_peers.begin();
for(; j != m_peers.end(); ++j)
{
Peer *peer = j.getNode()->getValue();
Peer *peer = j->second;
if(peer->has_sent_with_id)
continue;
if(peer->address == sender)
@@ -762,14 +763,14 @@ void Connection::receive()
If no peer was found with the same address and port,
we shall assume it is a new peer and create an entry.
*/
if(j.atEnd())
if(j == m_peers.end())
{
// Pass on to adding the peer
}
// Else: A peer was found.
else
{
Peer *peer = j.getNode()->getValue();
Peer *peer = j->second;
peer_id = peer->id;
PrintInfo(derr_con);
derr_con<<"WARNING: Assuming unknown peer to be "
@@ -793,7 +794,7 @@ void Connection::receive()
for(;;)
{
// Check if exists
if(m_peers.find(peer_id_new) == NULL)
if(m_peers.find(peer_id_new) == m_peers.end())
break;
// Check for overflow
if(peer_id_new == 65535){
@@ -813,7 +814,7 @@ void Connection::receive()
// Create a peer
Peer *peer = new Peer(peer_id_new, sender);
m_peers.insert(peer->id, peer);
m_peers[peer->id] = peer;
// Create peer addition event
ConnectionEvent e;
@@ -833,9 +834,9 @@ void Connection::receive()
// Go on and process whatever it sent
}
core::map<u16, Peer*>::Node *node = m_peers.find(peer_id);
std::map<u16, Peer*>::iterator node = m_peers.find(peer_id);
if(node == NULL)
if(node == m_peers.end())
{
// Peer not found
// This means that the peer id of the sender is not PEER_ID_INEXISTENT
@@ -845,7 +846,7 @@ void Connection::receive()
throw InvalidIncomingDataException("Peer not found (possible timeout)");
}
Peer *peer = node->getValue();
Peer *peer = node->second;
// Validate peer address
if(peer->address != sender)
@@ -891,12 +892,23 @@ void Connection::receive()
void Connection::runTimeouts(float dtime)
{
core::list<u16> timeouted_peers;
core::map<u16, Peer*>::Iterator j;
j = m_peers.getIterator();
for(; j.atEnd() == false; j++)
float congestion_control_aim_rtt
= g_settings->getFloat("congestion_control_aim_rtt");
float congestion_control_max_rate
= g_settings->getFloat("congestion_control_max_rate");
float congestion_control_min_rate
= g_settings->getFloat("congestion_control_min_rate");
std::list<u16> timeouted_peers;
for(std::map<u16, Peer*>::iterator j = m_peers.begin();
j != m_peers.end(); ++j)
{
Peer *peer = j.getNode()->getValue();
Peer *peer = j->second;
// Update congestion control values
peer->congestion_control_aim_rtt = congestion_control_aim_rtt;
peer->congestion_control_max_rate = congestion_control_max_rate;
peer->congestion_control_min_rate = congestion_control_min_rate;
/*
Check peer timeout
@@ -918,8 +930,7 @@ void Connection::runTimeouts(float dtime)
float resend_timeout = peer->resend_timeout;
for(u16 i=0; i<CHANNEL_COUNT; i++)
{
core::list<BufferedPacket> timed_outs;
core::list<BufferedPacket>::Iterator j;
std::list<BufferedPacket> timed_outs;
Channel *channel = &peer->channels[i];
@@ -950,8 +961,8 @@ void Connection::runTimeouts(float dtime)
channel->outgoing_reliables.resetTimedOuts(resend_timeout);
j = timed_outs.begin();
for(; j != timed_outs.end(); j++)
for(std::list<BufferedPacket>::iterator j = timed_outs.begin();
j != timed_outs.end(); ++j)
{
u16 peer_id = readPeerId(*(j->data));
u8 channel = readChannel(*(j->data));
@@ -996,8 +1007,8 @@ void Connection::runTimeouts(float dtime)
}
// Remove timed out peers
core::list<u16>::Iterator i = timeouted_peers.begin();
for(; i != timeouted_peers.end(); i++)
for(std::list<u16>::iterator i = timeouted_peers.begin();
i != timeouted_peers.end(); ++i)
{
PrintInfo(derr_con);
derr_con<<"RunTimeouts(): Removing peer "<<(*i)<<std::endl;
@@ -1025,13 +1036,13 @@ void Connection::connect(Address address)
dout_con<<getDesc()<<" connecting to "<<address.serializeString()
<<":"<<address.getPort()<<std::endl;
core::map<u16, Peer*>::Node *node = m_peers.find(PEER_ID_SERVER);
if(node != NULL){
std::map<u16, Peer*>::iterator node = m_peers.find(PEER_ID_SERVER);
if(node != m_peers.end()){
throw ConnectionException("Already connected to a server");
}
Peer *peer = new Peer(PEER_ID_SERVER, address);
m_peers.insert(peer->id, peer);
m_peers[peer->id] = peer;
// Create event
ConnectionEvent e;
@@ -1056,22 +1067,20 @@ void Connection::disconnect()
writeU8(&data[1], CONTROLTYPE_DISCO);
// Send to all
core::map<u16, Peer*>::Iterator j;
j = m_peers.getIterator();
for(; j.atEnd() == false; j++)
for(std::map<u16, Peer*>::iterator j = m_peers.begin();
j != m_peers.end(); ++j)
{
Peer *peer = j.getNode()->getValue();
Peer *peer = j->second;
rawSendAsPacket(peer->id, 0, data, false);
}
}
void Connection::sendToAll(u8 channelnum, SharedBuffer<u8> data, bool reliable)
{
core::map<u16, Peer*>::Iterator j;
j = m_peers.getIterator();
for(; j.atEnd() == false; j++)
for(std::map<u16, Peer*>::iterator j = m_peers.begin();
j != m_peers.end(); ++j)
{
Peer *peer = j.getNode()->getValue();
Peer *peer = j->second;
send(peer->id, channelnum, data, reliable);
}
}
@@ -1092,13 +1101,12 @@ void Connection::send(u16 peer_id, u8 channelnum,
if(reliable)
chunksize_max -= RELIABLE_HEADER_SIZE;
core::list<SharedBuffer<u8> > originals;
std::list<SharedBuffer<u8> > originals;
originals = makeAutoSplitPacket(data, chunksize_max,
channel->next_outgoing_split_seqnum);
core::list<SharedBuffer<u8> >::Iterator i;
i = originals.begin();
for(; i != originals.end(); i++)
for(std::list<SharedBuffer<u8> >::iterator i = originals.begin();
i != originals.end(); ++i)
{
SharedBuffer<u8> original = *i;
@@ -1171,40 +1179,39 @@ void Connection::rawSend(const BufferedPacket &packet)
Peer* Connection::getPeer(u16 peer_id)
{
core::map<u16, Peer*>::Node *node = m_peers.find(peer_id);
std::map<u16, Peer*>::iterator node = m_peers.find(peer_id);
if(node == NULL){
if(node == m_peers.end()){
throw PeerNotFoundException("GetPeer: Peer not found (possible timeout)");
}
// Error checking
assert(node->getValue()->id == peer_id);
assert(node->second->id == peer_id);
return node->getValue();
return node->second;
}
Peer* Connection::getPeerNoEx(u16 peer_id)
{
core::map<u16, Peer*>::Node *node = m_peers.find(peer_id);
std::map<u16, Peer*>::iterator node = m_peers.find(peer_id);
if(node == NULL){
if(node == m_peers.end()){
return NULL;
}
// Error checking
assert(node->getValue()->id == peer_id);
assert(node->second->id == peer_id);
return node->getValue();
return node->second;
}
core::list<Peer*> Connection::getPeers()
std::list<Peer*> Connection::getPeers()
{
core::list<Peer*> list;
core::map<u16, Peer*>::Iterator j;
j = m_peers.getIterator();
for(; j.atEnd() == false; j++)
std::list<Peer*> list;
for(std::map<u16, Peer*>::iterator j = m_peers.begin();
j != m_peers.end(); ++j)
{
Peer *peer = j.getNode()->getValue();
Peer *peer = j->second;
list.push_back(peer);
}
return list;
@@ -1212,11 +1219,10 @@ core::list<Peer*> Connection::getPeers()
bool Connection::getFromBuffers(u16 &peer_id, SharedBuffer<u8> &dst)
{
core::map<u16, Peer*>::Iterator j;
j = m_peers.getIterator();
for(; j.atEnd() == false; j++)
for(std::map<u16, Peer*>::iterator j = m_peers.begin();
j != m_peers.end(); ++j)
{
Peer *peer = j.getNode()->getValue();
Peer *peer = j->second;
for(u16 i=0; i<CHANNEL_COUNT; i++)
{
Channel *channel = &peer->channels[i];
@@ -1522,7 +1528,7 @@ SharedBuffer<u8> Connection::processPacket(Channel *channel,
bool Connection::deletePeer(u16 peer_id, bool timeout)
{
if(m_peers.find(peer_id) == NULL)
if(m_peers.find(peer_id) == m_peers.end())
return false;
Peer *peer = m_peers[peer_id];
@@ -1533,7 +1539,7 @@ bool Connection::deletePeer(u16 peer_id, bool timeout)
putEvent(e);
delete m_peers[peer_id];
m_peers.remove(peer_id);
m_peers.erase(peer_id);
return true;
}
@@ -1541,7 +1547,7 @@ bool Connection::deletePeer(u16 peer_id, bool timeout)
ConnectionEvent Connection::getEvent()
{
if(m_event_queue.size() == 0){
if(m_event_queue.empty()){
ConnectionEvent e;
e.type = CONNEVENT_NONE;
return e;
@@ -1586,8 +1592,8 @@ bool Connection::Connected()
if(m_peers.size() != 1)
return false;
core::map<u16, Peer*>::Node *node = m_peers.find(PEER_ID_SERVER);
if(node == NULL)
std::map<u16, Peer*>::iterator node = m_peers.find(PEER_ID_SERVER);
if(node == m_peers.end())
return false;
if(m_peer_id == PEER_ID_INEXISTENT)

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -29,6 +29,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "util/thread.h"
#include <iostream>
#include <fstream>
#include <list>
#include <map>
namespace con
{
@@ -142,14 +144,14 @@ SharedBuffer<u8> makeOriginalPacket(
SharedBuffer<u8> data);
// Split data in chunks and add TYPE_SPLIT headers to them
core::list<SharedBuffer<u8> > makeSplitPacket(
std::list<SharedBuffer<u8> > makeSplitPacket(
SharedBuffer<u8> data,
u32 chunksize_max,
u16 seqnum);
// Depending on size, make a TYPE_ORIGINAL or TYPE_SPLIT packet
// Increments split_seqnum if a split packet is made
core::list<SharedBuffer<u8> > makeAutoSplitPacket(
std::list<SharedBuffer<u8> > makeAutoSplitPacket(
SharedBuffer<u8> data,
u32 chunksize_max,
u16 &split_seqnum);
@@ -167,7 +169,7 @@ struct IncomingSplitPacket
reliable = false;
}
// Key is chunk number, value is data without headers
core::map<u16, SharedBuffer<u8> > chunks;
std::map<u16, SharedBuffer<u8> > chunks;
u32 chunk_count;
float time; // Seconds from adding
bool reliable; // If true, isn't deleted on timeout
@@ -268,12 +270,12 @@ with a buffer in the receiving and transmitting end.
for fast access to the smallest one.
*/
typedef core::list<BufferedPacket>::Iterator RPBSearchResult;
typedef std::list<BufferedPacket>::iterator RPBSearchResult;
class ReliablePacketBuffer
{
public:
ReliablePacketBuffer();
void print();
bool empty();
u32 size();
@@ -286,10 +288,11 @@ class ReliablePacketBuffer
void incrementTimeouts(float dtime);
void resetTimedOuts(float timeout);
bool anyTotaltimeReached(float timeout);
core::list<BufferedPacket> getTimedOuts(float timeout);
std::list<BufferedPacket> getTimedOuts(float timeout);
private:
core::list<BufferedPacket> m_list;
std::list<BufferedPacket> m_list;
u16 m_list_size;
};
/*
@@ -310,7 +313,7 @@ class IncomingSplitBuffer
private:
// Key is seqnum
core::map<u16, IncomingSplitPacket*> m_buf;
std::map<u16, IncomingSplitPacket*> m_buf;
};
class Connection;
@@ -394,7 +397,11 @@ class Peer
float m_max_packets_per_second;
int m_num_sent;
int m_max_num_sent;
// Updated from configuration by Connection
float congestion_control_aim_rtt;
float congestion_control_max_rate;
float congestion_control_min_rate;
private:
};
@@ -585,7 +592,7 @@ class Connection: public SimpleThread
void rawSend(const BufferedPacket &packet);
Peer* getPeer(u16 peer_id);
Peer* getPeerNoEx(u16 peer_id);
core::list<Peer*> getPeers();
std::list<Peer*> getPeers();
bool getFromBuffers(u16 &peer_id, SharedBuffer<u8> &dst);
// Returns next data from a buffer if possible
// If found, returns true; if not, false.
@@ -615,7 +622,7 @@ class Connection: public SimpleThread
UDPSocket m_socket;
u16 m_peer_id;
core::map<u16, Peer*> m_peers;
std::map<u16, Peer*> m_peers;
JMutex m_peers_mutex;
// Backwards compatibility

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -25,7 +25,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "content_sao.h"
#include "settings.h"
#include "mapblock.h" // For getNodeBlockPos
#include "mapgen.h" // For mapgen::make_tree
#include "treegen.h" // For treegen::make_tree
#include "main.h" // for g_settings
#include "map.h"
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
@@ -37,7 +38,7 @@ class GrowGrassABM : public ActiveBlockModifier
virtual std::set<std::string> getTriggerContents()
{
std::set<std::string> s;
s.insert("dirt");
s.insert("mapgen_dirt");
return s;
}
virtual float getTriggerInterval()
@@ -54,7 +55,7 @@ class GrowGrassABM : public ActiveBlockModifier
!ndef->get(n_top).isLiquid() &&
n_top.getLightBlend(env->getDayNightRatio(), ndef) >= 13)
{
n.setContent(ndef->getId("dirt_with_grass"));
n.setContent(ndef->getId("mapgen_dirt_with_grass"));
map->addNodeWithEvent(p, n);
}
}
@@ -67,7 +68,7 @@ class RemoveGrassABM : public ActiveBlockModifier
virtual std::set<std::string> getTriggerContents()
{
std::set<std::string> s;
s.insert("dirt_with_grass");
s.insert("mapgen_dirt_with_grass");
return s;
}
virtual float getTriggerInterval()
@@ -80,10 +81,11 @@ class RemoveGrassABM : public ActiveBlockModifier
ServerMap *map = &env->getServerMap();
MapNode n_top = map->getNodeNoEx(p+v3s16(0,1,0));
if(!ndef->get(n_top).light_propagates ||
if((!ndef->get(n_top).light_propagates &&
n_top.getContent() != CONTENT_IGNORE) ||
ndef->get(n_top).isLiquid())
{
n.setContent(ndef->getId("dirt"));
n.setContent(ndef->getId("mapgen_dirt"));
map->addNodeWithEvent(p, n);
}
}
@@ -92,11 +94,22 @@ class RemoveGrassABM : public ActiveBlockModifier
class MakeTreesFromSaplingsABM : public ActiveBlockModifier
{
private:
content_t c_junglesapling;
content_t c_dirt;
content_t c_dirt_with_grass;
public:
MakeTreesFromSaplingsABM(ServerEnvironment *env, INodeDefManager *nodemgr) {
c_junglesapling = nodemgr->getId("junglesapling");
c_dirt = nodemgr->getId("mapgen_dirt");
c_dirt_with_grass = nodemgr->getId("mapgen_dirt_with_grass");
}
virtual std::set<std::string> getTriggerContents()
{
std::set<std::string> s;
s.insert("sapling");
s.insert("junglesapling");
return s;
}
virtual float getTriggerInterval()
@@ -109,47 +122,87 @@ class MakeTreesFromSaplingsABM : public ActiveBlockModifier
INodeDefManager *ndef = env->getGameDef()->ndef();
ServerMap *map = &env->getServerMap();
actionstream<<"A sapling grows into a tree at "
<<PP(p)<<std::endl;
MapNode n_below = map->getNodeNoEx(p - v3s16(0, 1, 0));
if (n_below.getContent() != c_dirt &&
n_below.getContent() != c_dirt_with_grass)
return;
bool is_jungle_tree = n.getContent() == c_junglesapling;
actionstream <<"A " << (is_jungle_tree ? "jungle " : "")
<< "sapling grows into a tree at "
<< PP(p) << std::endl;
core::map<v3s16, MapBlock*> modified_blocks;
std::map<v3s16, MapBlock*> modified_blocks;
v3s16 tree_p = p;
ManualMapVoxelManipulator vmanip(map);
v3s16 tree_blockp = getNodeBlockPos(tree_p);
vmanip.initialEmerge(tree_blockp - v3s16(1,1,1), tree_blockp + v3s16(1,1,1));
bool is_apple_tree = myrand()%4 == 0;
mapgen::make_tree(vmanip, tree_p, is_apple_tree, ndef);
if (is_jungle_tree) {
treegen::make_jungletree(vmanip, tree_p, ndef, myrand());
} else {
bool is_apple_tree = myrand() % 4 == 0;
treegen::make_tree(vmanip, tree_p, is_apple_tree, ndef, myrand());
}
vmanip.blitBackAll(&modified_blocks);
// update lighting
core::map<v3s16, MapBlock*> lighting_modified_blocks;
for(core::map<v3s16, MapBlock*>::Iterator
i = modified_blocks.getIterator();
i.atEnd() == false; i++)
{
lighting_modified_blocks.insert(i.getNode()->getKey(), i.getNode()->getValue());
}
std::map<v3s16, MapBlock*> lighting_modified_blocks;
lighting_modified_blocks.insert(modified_blocks.begin(), modified_blocks.end());
map->updateLighting(lighting_modified_blocks, modified_blocks);
// Send a MEET_OTHER event
MapEditEvent event;
event.type = MEET_OTHER;
for(core::map<v3s16, MapBlock*>::Iterator
i = modified_blocks.getIterator();
i.atEnd() == false; i++)
// event.modified_blocks.insert(modified_blocks.begin(), modified_blocks.end());
for(std::map<v3s16, MapBlock*>::iterator
i = modified_blocks.begin();
i != modified_blocks.end(); ++i)
{
v3s16 p = i.getNode()->getKey();
event.modified_blocks.insert(p, true);
event.modified_blocks.insert(i->first);
}
map->dispatchEvent(&event);
}
};
class LiquidFlowABM : public ActiveBlockModifier
{
private:
std::set<std::string> contents;
public:
LiquidFlowABM(ServerEnvironment *env, INodeDefManager *nodemgr)
{
std::set<content_t> liquids;
nodemgr->getIds("group:liquid", liquids);
for(std::set<content_t>::const_iterator k = liquids.begin(); k != liquids.end(); k++)
contents.insert(nodemgr->get(*k).liquid_alternative_flowing);
}
virtual std::set<std::string> getTriggerContents()
{
return contents;
}
virtual float getTriggerInterval()
{ return 10.0; }
virtual u32 getTriggerChance()
{ return 10; }
virtual void trigger(ServerEnvironment *env, v3s16 p, MapNode n)
{
ServerMap *map = &env->getServerMap();
if (map->transforming_liquid_size() < 500)
map->transforming_liquid_add(p);
//if ((*map).m_transforming_liquid.size() < 500) (*map).m_transforming_liquid.push_back(p);
}
};
void add_legacy_abms(ServerEnvironment *env, INodeDefManager *nodedef)
{
env->addActiveBlockModifier(new GrowGrassABM());
env->addActiveBlockModifier(new RemoveGrassABM());
env->addActiveBlockModifier(new MakeTreesFromSaplingsABM());
env->addActiveBlockModifier(new MakeTreesFromSaplingsABM(env, nodedef));
if (g_settings->getBool("liquid_finite"))
env->addActiveBlockModifier(new LiquidFlowABM(env, nodedef));
}

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -40,13 +40,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "util/serialize.h"
#include "util/mathconstants.h"
#include "map.h"
#include "main.h" // g_settings
#include <IMeshManipulator.h>
#include <IAnimatedMeshSceneNode.h>
#include <IBoneSceneNode.h>
class Settings;
struct ToolCapabilities;
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
core::map<u16, ClientActiveObject::Factory> ClientActiveObject::m_types;
std::map<u16, ClientActiveObject::Factory> ClientActiveObject::m_types;
/*
SmoothTranslator
@@ -170,6 +174,7 @@ class TestCAO : public ClientActiveObject
void processMessage(const std::string &data);
bool getCollisionBox(aabb3f *toset) { return false; }
private:
scene::IMeshSceneNode *m_node;
v3f m_position;
@@ -325,6 +330,7 @@ class ItemCAO : public ClientActiveObject
std::string infoText()
{return m_infotext;}
bool getCollisionBox(aabb3f *toset) { return false; }
private:
core::aabbox3d<f32> m_selection_box;
scene::IMeshSceneNode *m_node;
@@ -468,7 +474,7 @@ void ItemCAO::updateTexture()
IItemDefManager *idef = m_gamedef->idef();
ItemStack item;
item.deSerialize(is, idef);
texture = item.getDefinition(idef).inventory_texture;
texture = idef->getInventoryTexture(item.getDefinition(idef).name, m_gamedef);
}
catch(SerializationError &e)
{
@@ -551,7 +557,8 @@ class GenericCAO : public ClientActiveObject
// Only set at initialization
std::string m_name;
bool m_is_player;
bool m_is_local_player; // determined locally
bool m_is_local_player;
int m_id;
// Property-ish things
ObjectProperties m_prop;
//
@@ -559,6 +566,7 @@ class GenericCAO : public ClientActiveObject
IrrlichtDevice *m_irr;
core::aabbox3d<f32> m_selection_box;
scene::IMeshSceneNode *m_meshnode;
scene::IAnimatedMeshSceneNode *m_animated_meshnode;
scene::IBillboardSceneNode *m_spritenode;
scene::ITextSceneNode* m_textnode;
v3f m_position;
@@ -572,6 +580,14 @@ class GenericCAO : public ClientActiveObject
v2s16 m_tx_basepos;
bool m_initial_tx_basepos_set;
bool m_tx_select_horiz_by_yawpitch;
v2f m_animation_range;
int m_animation_speed;
int m_animation_blend;
std::map<std::string, core::vector2d<v3f> > m_bone_position; // stores position and rotation for each bone name
std::string m_attachment_bone;
v3f m_attachment_position;
v3f m_attachment_rotation;
bool m_attached_to_local;
int m_anim_frame;
int m_anim_num_frames;
float m_anim_framelength;
@@ -581,6 +597,7 @@ class GenericCAO : public ClientActiveObject
bool m_visuals_expired;
float m_step_distance_counter;
u8 m_last_light;
bool m_is_visible;
public:
GenericCAO(IGameDef *gamedef, ClientEnvironment *env):
@@ -588,11 +605,13 @@ class GenericCAO : public ClientActiveObject
//
m_is_player(false),
m_is_local_player(false),
m_id(0),
//
m_smgr(NULL),
m_irr(NULL),
m_selection_box(-BS/3.,-BS/3.,-BS/3., BS/3.,BS/3.,BS/3.),
m_meshnode(NULL),
m_animated_meshnode(NULL),
m_spritenode(NULL),
m_textnode(NULL),
m_position(v3f(0,10*BS,0)),
@@ -604,6 +623,14 @@ class GenericCAO : public ClientActiveObject
m_tx_basepos(0,0),
m_initial_tx_basepos_set(false),
m_tx_select_horiz_by_yawpitch(false),
m_animation_range(v2f(0,0)),
m_animation_speed(15),
m_animation_blend(0),
m_bone_position(std::map<std::string, core::vector2d<v3f> >()),
m_attachment_bone(""),
m_attachment_position(v3f(0,0,0)),
m_attachment_rotation(v3f(0,0,0)),
m_attached_to_local(false),
m_anim_frame(0),
m_anim_num_frames(1),
m_anim_framelength(0.2),
@@ -611,31 +638,63 @@ class GenericCAO : public ClientActiveObject
m_reset_textures_timer(-1),
m_visuals_expired(false),
m_step_distance_counter(0),
m_last_light(255)
m_last_light(255),
m_is_visible(false)
{
if(gamedef == NULL)
ClientActiveObject::registerType(getType(), create);
}
bool getCollisionBox(aabb3f *toset) {
if (m_prop.physical) {
aabb3f retval;
//update collision box
toset->MinEdge = m_prop.collisionbox.MinEdge * BS;
toset->MaxEdge = m_prop.collisionbox.MaxEdge * BS;
toset->MinEdge += m_position;
toset->MaxEdge += m_position;
return true;
}
return false;
}
void initialize(const std::string &data)
{
infostream<<"GenericCAO: Got init data"<<std::endl;
std::istringstream is(data, std::ios::binary);
int num_messages = 0;
// version
u8 version = readU8(is);
// check version
if(version != 0){
if(version == 1) // In PROTOCOL_VERSION 14
{
m_name = deSerializeString(is);
m_is_player = readU8(is);
m_id = readS16(is);
m_position = readV3F1000(is);
m_yaw = readF1000(is);
m_hp = readS16(is);
num_messages = readU8(is);
}
else if(version == 0) // In PROTOCOL_VERSION 13
{
m_name = deSerializeString(is);
m_is_player = readU8(is);
m_position = readV3F1000(is);
m_yaw = readF1000(is);
m_hp = readS16(is);
num_messages = readU8(is);
}
else
{
errorstream<<"GenericCAO: Unsupported init data version"
<<std::endl;
return;
}
m_name = deSerializeString(is);
m_is_player = readU8(is);
m_position = readV3F1000(is);
m_yaw = readF1000(is);
m_hp = readS16(is);
int num_messages = readU8(is);
for(int i=0; i<num_messages; i++){
std::string message = deSerializeLongString(is);
processMessage(message);
@@ -667,21 +726,113 @@ class GenericCAO : public ClientActiveObject
}
core::aabbox3d<f32>* getSelectionBox()
{
if(!m_prop.is_visible || m_is_local_player)
if(!m_prop.is_visible || !m_is_visible || m_is_local_player || getParent() != NULL)
return NULL;
return &m_selection_box;
}
v3f getPosition()
{
if(getParent() != NULL){
if(m_meshnode)
return m_meshnode->getAbsolutePosition();
if(m_animated_meshnode)
return m_animated_meshnode->getAbsolutePosition();
if(m_spritenode)
return m_spritenode->getAbsolutePosition();
return m_position;
}
return pos_translator.vect_show;
}
void removeFromScene()
scene::IMeshSceneNode *getMeshSceneNode()
{
if(m_meshnode)
return m_meshnode;
return NULL;
}
scene::IAnimatedMeshSceneNode *getAnimatedMeshSceneNode()
{
if(m_animated_meshnode)
return m_animated_meshnode;
return NULL;
}
scene::IBillboardSceneNode *getSpriteSceneNode()
{
if(m_spritenode)
return m_spritenode;
return NULL;
}
bool isPlayer()
{
return m_is_player;
}
bool isLocalPlayer()
{
return m_is_local_player;
}
void setAttachments()
{
updateAttachments();
}
ClientActiveObject *getParent()
{
ClientActiveObject *obj = NULL;
for(std::vector<core::vector2d<int> >::const_iterator cii = m_env->attachment_list.begin(); cii != m_env->attachment_list.end(); cii++)
{
if(cii->X == getId()){ // This ID is our child
if(cii->Y > 0){ // A parent ID exists for our child
if(cii->X != cii->Y){ // The parent and child ID are not the same
obj = m_env->getActiveObject(cii->Y);
}
}
break;
}
}
if(obj)
return obj;
return NULL;
}
void removeFromScene(bool permanent)
{
if(permanent) // Should be true when removing the object permanently and false when refreshing (eg: updating visuals)
{
// Detach this object's children
for(std::vector<core::vector2d<int> >::iterator ii = m_env->attachment_list.begin(); ii != m_env->attachment_list.end(); ii++)
{
if(ii->Y == getId()) // Is a child of our object
{
ii->Y = 0;
ClientActiveObject *obj = m_env->getActiveObject(ii->X); // Get the object of the child
if(obj)
obj->setAttachments();
}
}
// Delete this object from the attachments list
for(std::vector<core::vector2d<int> >::iterator ii = m_env->attachment_list.begin(); ii != m_env->attachment_list.end(); ii++)
{
if(ii->X == getId()) // Is our object
{
m_env->attachment_list.erase(ii);
break;
}
}
}
if(m_meshnode){
m_meshnode->remove();
m_meshnode = NULL;
}
if(m_animated_meshnode){
m_animated_meshnode->remove();
m_animated_meshnode = NULL;
}
if(m_spritenode){
m_spritenode->remove();
m_spritenode = NULL;
@@ -694,7 +845,7 @@ class GenericCAO : public ClientActiveObject
m_smgr = smgr;
m_irr = irr;
if(m_meshnode != NULL || m_spritenode != NULL)
if(m_meshnode != NULL || m_animated_meshnode != NULL || m_spritenode != NULL)
return;
m_visuals_expired = false;
@@ -790,15 +941,49 @@ class GenericCAO : public ClientActiveObject
m_prop.visual_size.X));
u8 li = m_last_light;
setMeshColor(m_meshnode->getMesh(), video::SColor(255,li,li,li));
} else if(m_prop.visual == "wielditem"){
m_meshnode->setMaterialFlag(video::EMF_LIGHTING, false);
m_meshnode->setMaterialFlag(video::EMF_BILINEAR_FILTER, false);
m_meshnode->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF);
m_meshnode->setMaterialFlag(video::EMF_FOG_ENABLE, true);
}
else if(m_prop.visual == "mesh"){
infostream<<"GenericCAO::addToScene(): mesh"<<std::endl;
scene::IAnimatedMesh *mesh = smgr->getMesh(m_prop.mesh.c_str());
if(mesh)
{
m_animated_meshnode = smgr->addAnimatedMeshSceneNode(mesh, NULL);
m_animated_meshnode->animateJoints(); // Needed for some animations
m_animated_meshnode->setScale(v3f(m_prop.visual_size.X,
m_prop.visual_size.Y,
m_prop.visual_size.X));
u8 li = m_last_light;
setMeshColor(m_animated_meshnode->getMesh(), video::SColor(255,li,li,li));
m_animated_meshnode->setMaterialFlag(video::EMF_LIGHTING, false);
m_animated_meshnode->setMaterialFlag(video::EMF_BILINEAR_FILTER, false);
m_animated_meshnode->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF);
m_animated_meshnode->setMaterialFlag(video::EMF_FOG_ENABLE, true);
}
else
errorstream<<"GenericCAO::addToScene(): Could not load mesh "<<m_prop.mesh<<std::endl;
}
else if(m_prop.visual == "wielditem"){
infostream<<"GenericCAO::addToScene(): node"<<std::endl;
infostream<<"textures: "<<m_prop.textures.size()<<std::endl;
if(m_prop.textures.size() >= 1){
infostream<<"textures[0]: "<<m_prop.textures[0]<<std::endl;
IItemDefManager *idef = m_gamedef->idef();
ItemStack item(m_prop.textures[0], 1, 0, "", idef);
scene::IMesh *mesh = item.getDefinition(idef).wield_mesh;
scene::IMesh *item_mesh = idef->getWieldMesh(item.getDefinition(idef).name, m_gamedef);
// Copy mesh to be able to set unique vertex colors
scene::IMeshManipulator *manip =
irr->getVideoDriver()->getMeshManipulator();
scene::IMesh *mesh = manip->createMeshUniquePrimitives(item_mesh);
m_meshnode = smgr->addMeshSceneNode(mesh, NULL);
mesh->drop();
m_meshnode->setScale(v3f(m_prop.visual_size.X/2,
m_prop.visual_size.Y/2,
@@ -815,6 +1000,8 @@ class GenericCAO : public ClientActiveObject
scene::ISceneNode *node = NULL;
if(m_spritenode)
node = m_spritenode;
else if(m_animated_meshnode)
node = m_animated_meshnode;
else if(m_meshnode)
node = m_meshnode;
if(node && m_is_player && !m_is_local_player){
@@ -825,8 +1012,11 @@ class GenericCAO : public ClientActiveObject
wname.c_str(), video::SColor(255,255,255,255), node);
m_textnode->setPosition(v3f(0, BS*1.1, 0));
}
updateNodePos();
updateAnimation();
updateBonePosition();
updateAttachments();
}
void expireVisuals()
@@ -836,17 +1026,16 @@ class GenericCAO : public ClientActiveObject
void updateLight(u8 light_at_pos)
{
bool is_visible = (m_hp != 0);
u8 li = decode_light(light_at_pos);
m_last_light = li;
video::SColor color(255,li,li,li);
if(m_meshnode){
setMeshColor(m_meshnode->getMesh(), color);
m_meshnode->setVisible(is_visible);
}
if(m_spritenode){
m_spritenode->setColor(color);
m_spritenode->setVisible(is_visible);
if(li != m_last_light){
m_last_light = li;
video::SColor color(255,li,li,li);
if(m_meshnode)
setMeshColor(m_meshnode->getMesh(), color);
if(m_animated_meshnode)
setMeshColor(m_animated_meshnode->getMesh(), color);
if(m_spritenode)
m_spritenode->setColor(color);
}
}
@@ -857,12 +1046,21 @@ class GenericCAO : public ClientActiveObject
void updateNodePos()
{
if(getParent() != NULL)
return;
if(m_meshnode){
m_meshnode->setPosition(pos_translator.vect_show);
v3f rot = m_meshnode->getRotation();
rot.Y = -m_yaw;
m_meshnode->setRotation(rot);
}
if(m_animated_meshnode){
m_animated_meshnode->setPosition(pos_translator.vect_show);
v3f rot = m_animated_meshnode->getRotation();
rot.Y = -m_yaw;
m_animated_meshnode->setRotation(rot);
}
if(m_spritenode){
m_spritenode->setPosition(pos_translator.vect_show);
}
@@ -870,56 +1068,115 @@ class GenericCAO : public ClientActiveObject
void step(float dtime, ClientEnvironment *env)
{
v3f lastpos = pos_translator.vect_show;
if(m_visuals_expired && m_smgr && m_irr){
m_visuals_expired = false;
removeFromScene();
// Attachments, part 1: All attached objects must be unparented first, or Irrlicht causes a segmentation fault
for(std::vector<core::vector2d<int> >::iterator ii = m_env->attachment_list.begin(); ii != m_env->attachment_list.end(); ii++)
{
if(ii->Y == getId()) // This is a child of our parent
{
ClientActiveObject *obj = m_env->getActiveObject(ii->X); // Get the object of the child
if(obj)
{
scene::IMeshSceneNode *m_child_meshnode = obj->getMeshSceneNode();
scene::IAnimatedMeshSceneNode *m_child_animated_meshnode = obj->getAnimatedMeshSceneNode();
scene::IBillboardSceneNode *m_child_spritenode = obj->getSpriteSceneNode();
if(m_child_meshnode)
m_child_meshnode->setParent(m_smgr->getRootSceneNode());
if(m_child_animated_meshnode)
m_child_animated_meshnode->setParent(m_smgr->getRootSceneNode());
if(m_child_spritenode)
m_child_spritenode->setParent(m_smgr->getRootSceneNode());
}
}
}
removeFromScene(false);
addToScene(m_smgr, m_gamedef->tsrc(), m_irr);
// Attachments, part 2: Now that the parent has been refreshed, put its attachments back
for(std::vector<core::vector2d<int> >::iterator ii = m_env->attachment_list.begin(); ii != m_env->attachment_list.end(); ii++)
{
if(ii->Y == getId()) // This is a child of our parent
{
ClientActiveObject *obj = m_env->getActiveObject(ii->X); // Get the object of the child
if(obj)
obj->setAttachments();
}
}
}
if(m_prop.physical){
core::aabbox3d<f32> box = m_prop.collisionbox;
box.MinEdge *= BS;
box.MaxEdge *= BS;
collisionMoveResult moveresult;
f32 pos_max_d = BS*0.125; // Distance per iteration
f32 stepheight = 0;
v3f p_pos = m_position;
v3f p_velocity = m_velocity;
v3f p_acceleration = m_acceleration;
IGameDef *gamedef = env->getGameDef();
moveresult = collisionMoveSimple(&env->getMap(), gamedef,
pos_max_d, box, stepheight, dtime,
p_pos, p_velocity, p_acceleration);
// Apply results
m_position = p_pos;
m_velocity = p_velocity;
m_acceleration = p_acceleration;
bool is_end_position = moveresult.collides;
pos_translator.update(m_position, is_end_position, dtime);
pos_translator.translate(dtime);
updateNodePos();
} else {
m_position += dtime * m_velocity + 0.5 * dtime * dtime * m_acceleration;
m_velocity += dtime * m_acceleration;
pos_translator.update(m_position, pos_translator.aim_is_end, pos_translator.anim_time);
pos_translator.translate(dtime);
updateNodePos();
}
// Make sure m_is_visible is always applied
if(m_meshnode)
m_meshnode->setVisible(m_is_visible);
if(m_animated_meshnode)
m_animated_meshnode->setVisible(m_is_visible);
if(m_spritenode)
m_spritenode->setVisible(m_is_visible);
if(m_textnode)
m_textnode->setVisible(m_is_visible);
float moved = lastpos.getDistanceFrom(pos_translator.vect_show);
m_step_distance_counter += moved;
if(m_step_distance_counter > 1.5*BS){
m_step_distance_counter = 0;
if(!m_is_local_player && m_prop.makes_footstep_sound){
INodeDefManager *ndef = m_gamedef->ndef();
v3s16 p = floatToInt(getPosition() + v3f(0,
(m_prop.collisionbox.MinEdge.Y-0.5)*BS, 0), BS);
MapNode n = m_env->getMap().getNodeNoEx(p);
SimpleSoundSpec spec = ndef->get(n).sound_footstep;
m_gamedef->sound()->playSoundAt(spec, false, getPosition());
if(getParent() != NULL) // Attachments should be glued to their parent by Irrlicht
{
// Set these for later
m_position = getPosition();
m_velocity = v3f(0,0,0);
m_acceleration = v3f(0,0,0);
pos_translator.vect_show = m_position;
if(m_is_local_player) // Update local player attachment position
{
LocalPlayer *player = m_env->getLocalPlayer();
player->overridePosition = getParent()->getPosition();
}
}
else
{
v3f lastpos = pos_translator.vect_show;
if(m_prop.physical){
core::aabbox3d<f32> box = m_prop.collisionbox;
box.MinEdge *= BS;
box.MaxEdge *= BS;
collisionMoveResult moveresult;
f32 pos_max_d = BS*0.125; // Distance per iteration
f32 stepheight = 0;
v3f p_pos = m_position;
v3f p_velocity = m_velocity;
v3f p_acceleration = m_acceleration;
moveresult = collisionMoveSimple(env,env->getGameDef(),
pos_max_d, box, stepheight, dtime,
p_pos, p_velocity, p_acceleration);
// Apply results
m_position = p_pos;
m_velocity = p_velocity;
m_acceleration = p_acceleration;
bool is_end_position = moveresult.collides;
pos_translator.update(m_position, is_end_position, dtime);
pos_translator.translate(dtime);
updateNodePos();
} else {
m_position += dtime * m_velocity + 0.5 * dtime * dtime * m_acceleration;
m_velocity += dtime * m_acceleration;
pos_translator.update(m_position, pos_translator.aim_is_end, pos_translator.anim_time);
pos_translator.translate(dtime);
updateNodePos();
}
float moved = lastpos.getDistanceFrom(pos_translator.vect_show);
m_step_distance_counter += moved;
if(m_step_distance_counter > 1.5*BS){
m_step_distance_counter = 0;
if(!m_is_local_player && m_prop.makes_footstep_sound){
INodeDefManager *ndef = m_gamedef->ndef();
v3s16 p = floatToInt(getPosition() + v3f(0,
(m_prop.collisionbox.MinEdge.Y-0.5)*BS, 0), BS);
MapNode n = m_env->getMap().getNodeNoEx(p);
SimpleSoundSpec spec = ndef->get(n).sound_footstep;
m_gamedef->sound()->playSoundAt(spec, false, getPosition());
}
}
}
@@ -940,7 +1197,7 @@ class GenericCAO : public ClientActiveObject
updateTextures("");
}
}
if(fabs(m_prop.automatic_rotate) > 0.001){
if(getParent() == NULL && fabs(m_prop.automatic_rotate) > 0.001){
m_yaw += dtime * m_prop.automatic_rotate * 180 / M_PI;
updateNodePos();
}
@@ -998,6 +1255,10 @@ class GenericCAO : public ClientActiveObject
{
ITextureSource *tsrc = m_gamedef->tsrc();
bool use_trilinear_filter = g_settings->getBool("trilinear_filter");
bool use_bilinear_filter = g_settings->getBool("bilinear_filter");
bool use_anisotropic_filter = g_settings->getBool("anisotropic_filter");
if(m_spritenode)
{
if(m_prop.visual == "sprite")
@@ -1008,6 +1269,58 @@ class GenericCAO : public ClientActiveObject
texturestring += mod;
m_spritenode->setMaterialTexture(0,
tsrc->getTextureRaw(texturestring));
// This allows setting per-material colors. However, until a real lighting
// system is added, the code below will have no effect. Once MineTest
// has directional lighting, it should work automatically.
if(m_prop.colors.size() >= 1)
{
m_spritenode->getMaterial(0).AmbientColor = m_prop.colors[0];
m_spritenode->getMaterial(0).DiffuseColor = m_prop.colors[0];
m_spritenode->getMaterial(0).SpecularColor = m_prop.colors[0];
}
m_spritenode->getMaterial(0).setFlag(video::EMF_TRILINEAR_FILTER, use_trilinear_filter);
m_spritenode->getMaterial(0).setFlag(video::EMF_BILINEAR_FILTER, use_bilinear_filter);
m_spritenode->getMaterial(0).setFlag(video::EMF_ANISOTROPIC_FILTER, use_anisotropic_filter);
}
}
if(m_animated_meshnode)
{
if(m_prop.visual == "mesh")
{
for (u32 i = 0; i < m_prop.textures.size() && i < m_animated_meshnode->getMaterialCount(); ++i)
{
std::string texturestring = m_prop.textures[i];
if(texturestring == "")
continue; // Empty texture string means don't modify that material
texturestring += mod;
video::ITexture* texture = tsrc->getTextureRaw(texturestring);
if(!texture)
{
errorstream<<"GenericCAO::updateTextures(): Could not load texture "<<texturestring<<std::endl;
continue;
}
// Set material flags and texture
m_animated_meshnode->setMaterialTexture(i, texture);
video::SMaterial& material = m_animated_meshnode->getMaterial(i);
material.setFlag(video::EMF_LIGHTING, false);
material.setFlag(video::EMF_BILINEAR_FILTER, false);
m_animated_meshnode->getMaterial(i).setFlag(video::EMF_TRILINEAR_FILTER, use_trilinear_filter);
m_animated_meshnode->getMaterial(i).setFlag(video::EMF_BILINEAR_FILTER, use_bilinear_filter);
m_animated_meshnode->getMaterial(i).setFlag(video::EMF_ANISOTROPIC_FILTER, use_anisotropic_filter);
}
for (u32 i = 0; i < m_prop.colors.size() && i < m_animated_meshnode->getMaterialCount(); ++i)
{
// This allows setting per-material colors. However, until a real lighting
// system is added, the code below will have no effect. Once MineTest
// has directional lighting, it should work automatically.
m_animated_meshnode->getMaterial(i).AmbientColor = m_prop.colors[i];
m_animated_meshnode->getMaterial(i).DiffuseColor = m_prop.colors[i];
m_animated_meshnode->getMaterial(i).SpecularColor = m_prop.colors[i];
}
}
}
if(m_meshnode)
@@ -1034,6 +1347,20 @@ class GenericCAO : public ClientActiveObject
material.setTexture(0, atlas);
material.getTextureMatrix(0).setTextureTranslate(pos.X, pos.Y);
material.getTextureMatrix(0).setTextureScale(size.X, size.Y);
// This allows setting per-material colors. However, until a real lighting
// system is added, the code below will have no effect. Once MineTest
// has directional lighting, it should work automatically.
if(m_prop.colors.size() > i)
{
m_meshnode->getMaterial(i).AmbientColor = m_prop.colors[i];
m_meshnode->getMaterial(i).DiffuseColor = m_prop.colors[i];
m_meshnode->getMaterial(i).SpecularColor = m_prop.colors[i];
}
m_meshnode->getMaterial(i).setFlag(video::EMF_TRILINEAR_FILTER, use_trilinear_filter);
m_meshnode->getMaterial(i).setFlag(video::EMF_BILINEAR_FILTER, use_bilinear_filter);
m_meshnode->getMaterial(i).setFlag(video::EMF_ANISOTROPIC_FILTER, use_anisotropic_filter);
}
}
else if(m_prop.visual == "upright_sprite")
@@ -1047,6 +1374,20 @@ class GenericCAO : public ClientActiveObject
scene::IMeshBuffer *buf = mesh->getMeshBuffer(0);
buf->getMaterial().setTexture(0,
tsrc->getTextureRaw(tname));
// This allows setting per-material colors. However, until a real lighting
// system is added, the code below will have no effect. Once MineTest
// has directional lighting, it should work automatically.
if(m_prop.colors.size() >= 1)
{
buf->getMaterial().AmbientColor = m_prop.colors[0];
buf->getMaterial().DiffuseColor = m_prop.colors[0];
buf->getMaterial().SpecularColor = m_prop.colors[0];
}
buf->getMaterial().setFlag(video::EMF_TRILINEAR_FILTER, use_trilinear_filter);
buf->getMaterial().setFlag(video::EMF_BILINEAR_FILTER, use_bilinear_filter);
buf->getMaterial().setFlag(video::EMF_ANISOTROPIC_FILTER, use_anisotropic_filter);
}
{
std::string tname = "unknown_object.png";
@@ -1058,11 +1399,213 @@ class GenericCAO : public ClientActiveObject
scene::IMeshBuffer *buf = mesh->getMeshBuffer(1);
buf->getMaterial().setTexture(0,
tsrc->getTextureRaw(tname));
// This allows setting per-material colors. However, until a real lighting
// system is added, the code below will have no effect. Once MineTest
// has directional lighting, it should work automatically.
if(m_prop.colors.size() >= 2)
{
buf->getMaterial().AmbientColor = m_prop.colors[1];
buf->getMaterial().DiffuseColor = m_prop.colors[1];
buf->getMaterial().SpecularColor = m_prop.colors[1];
}
else if(m_prop.colors.size() >= 1)
{
buf->getMaterial().AmbientColor = m_prop.colors[0];
buf->getMaterial().DiffuseColor = m_prop.colors[0];
buf->getMaterial().SpecularColor = m_prop.colors[0];
}
buf->getMaterial().setFlag(video::EMF_TRILINEAR_FILTER, use_trilinear_filter);
buf->getMaterial().setFlag(video::EMF_BILINEAR_FILTER, use_bilinear_filter);
buf->getMaterial().setFlag(video::EMF_ANISOTROPIC_FILTER, use_anisotropic_filter);
}
}
}
}
void updateAnimation()
{
if(m_animated_meshnode == NULL)
return;
m_animated_meshnode->setFrameLoop((int)m_animation_range.X, (int)m_animation_range.Y);
m_animated_meshnode->setAnimationSpeed(m_animation_speed);
m_animated_meshnode->setTransitionTime(m_animation_blend);
}
void updateBonePosition()
{
if(!m_bone_position.size() || m_animated_meshnode == NULL)
return;
m_animated_meshnode->setJointMode(irr::scene::EJUOR_CONTROL); // To write positions to the mesh on render
for(std::map<std::string, core::vector2d<v3f> >::const_iterator ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii){
std::string bone_name = (*ii).first;
v3f bone_pos = (*ii).second.X;
v3f bone_rot = (*ii).second.Y;
irr::scene::IBoneSceneNode* bone = m_animated_meshnode->getJointNode(bone_name.c_str());
if(bone)
{
bone->setPosition(bone_pos);
bone->setRotation(bone_rot);
}
}
}
void updateAttachments()
{
m_attached_to_local = getParent() != NULL && getParent()->isLocalPlayer();
m_is_visible = !m_attached_to_local; // Objects attached to the local player should always be hidden
if(getParent() == NULL || m_attached_to_local) // Detach or don't attach
{
if(m_meshnode)
{
v3f old_position = m_meshnode->getAbsolutePosition();
v3f old_rotation = m_meshnode->getRotation();
m_meshnode->setParent(m_smgr->getRootSceneNode());
m_meshnode->setPosition(old_position);
m_meshnode->setRotation(old_rotation);
m_meshnode->updateAbsolutePosition();
}
if(m_animated_meshnode)
{
v3f old_position = m_animated_meshnode->getAbsolutePosition();
v3f old_rotation = m_animated_meshnode->getRotation();
m_animated_meshnode->setParent(m_smgr->getRootSceneNode());
m_animated_meshnode->setPosition(old_position);
m_animated_meshnode->setRotation(old_rotation);
m_animated_meshnode->updateAbsolutePosition();
}
if(m_spritenode)
{
v3f old_position = m_spritenode->getAbsolutePosition();
v3f old_rotation = m_spritenode->getRotation();
m_spritenode->setParent(m_smgr->getRootSceneNode());
m_spritenode->setPosition(old_position);
m_spritenode->setRotation(old_rotation);
m_spritenode->updateAbsolutePosition();
}
if(m_is_local_player)
{
LocalPlayer *player = m_env->getLocalPlayer();
player->isAttached = false;
}
}
else // Attach
{
scene::IMeshSceneNode *parent_mesh = NULL;
if(getParent()->getMeshSceneNode())
parent_mesh = getParent()->getMeshSceneNode();
scene::IAnimatedMeshSceneNode *parent_animated_mesh = NULL;
if(getParent()->getAnimatedMeshSceneNode())
parent_animated_mesh = getParent()->getAnimatedMeshSceneNode();
scene::IBillboardSceneNode *parent_sprite = NULL;
if(getParent()->getSpriteSceneNode())
parent_sprite = getParent()->getSpriteSceneNode();
scene::IBoneSceneNode *parent_bone = NULL;
if(parent_animated_mesh && m_attachment_bone != "")
parent_bone = parent_animated_mesh->getJointNode(m_attachment_bone.c_str());
// The spaghetti code below makes sure attaching works if either the parent or child is a spritenode, meshnode, or animatedmeshnode
// TODO: Perhaps use polymorphism here to save code duplication
if(m_meshnode){
if(parent_bone){
m_meshnode->setParent(parent_bone);
m_meshnode->setPosition(m_attachment_position);
m_meshnode->setRotation(m_attachment_rotation);
m_meshnode->updateAbsolutePosition();
}
else
{
if(parent_mesh){
m_meshnode->setParent(parent_mesh);
m_meshnode->setPosition(m_attachment_position);
m_meshnode->setRotation(m_attachment_rotation);
m_meshnode->updateAbsolutePosition();
}
else if(parent_animated_mesh){
m_meshnode->setParent(parent_animated_mesh);
m_meshnode->setPosition(m_attachment_position);
m_meshnode->setRotation(m_attachment_rotation);
m_meshnode->updateAbsolutePosition();
}
else if(parent_sprite){
m_meshnode->setParent(parent_sprite);
m_meshnode->setPosition(m_attachment_position);
m_meshnode->setRotation(m_attachment_rotation);
m_meshnode->updateAbsolutePosition();
}
}
}
if(m_animated_meshnode){
if(parent_bone){
m_animated_meshnode->setParent(parent_bone);
m_animated_meshnode->setPosition(m_attachment_position);
m_animated_meshnode->setRotation(m_attachment_rotation);
m_animated_meshnode->updateAbsolutePosition();
}
else
{
if(parent_mesh){
m_animated_meshnode->setParent(parent_mesh);
m_animated_meshnode->setPosition(m_attachment_position);
m_animated_meshnode->setRotation(m_attachment_rotation);
m_animated_meshnode->updateAbsolutePosition();
}
else if(parent_animated_mesh){
m_animated_meshnode->setParent(parent_animated_mesh);
m_animated_meshnode->setPosition(m_attachment_position);
m_animated_meshnode->setRotation(m_attachment_rotation);
m_animated_meshnode->updateAbsolutePosition();
}
else if(parent_sprite){
m_animated_meshnode->setParent(parent_sprite);
m_animated_meshnode->setPosition(m_attachment_position);
m_animated_meshnode->setRotation(m_attachment_rotation);
m_animated_meshnode->updateAbsolutePosition();
}
}
}
if(m_spritenode){
if(parent_bone){
m_spritenode->setParent(parent_bone);
m_spritenode->setPosition(m_attachment_position);
m_spritenode->setRotation(m_attachment_rotation);
m_spritenode->updateAbsolutePosition();
}
else
{
if(parent_mesh){
m_spritenode->setParent(parent_mesh);
m_spritenode->setPosition(m_attachment_position);
m_spritenode->setRotation(m_attachment_rotation);
m_spritenode->updateAbsolutePosition();
}
else if(parent_animated_mesh){
m_spritenode->setParent(parent_animated_mesh);
m_spritenode->setPosition(m_attachment_position);
m_spritenode->setRotation(m_attachment_rotation);
m_spritenode->updateAbsolutePosition();
}
else if(parent_sprite){
m_spritenode->setParent(parent_sprite);
m_spritenode->setPosition(m_attachment_position);
m_spritenode->setRotation(m_attachment_rotation);
m_spritenode->updateAbsolutePosition();
}
}
}
if(m_is_local_player)
{
LocalPlayer *player = m_env->getLocalPlayer();
player->isAttached = true;
}
}
}
void processMessage(const std::string &data)
{
//infostream<<"GenericCAO: Got message"<<std::endl;
@@ -1089,6 +1632,8 @@ class GenericCAO : public ClientActiveObject
}
else if(cmd == GENERIC_CMD_UPDATE_POSITION)
{
// Not sent by the server if this object is an attachment.
// We might however get here if the server notices the object being detached before the client.
m_position = readV3F1000(is);
m_velocity = readV3F1000(is);
m_acceleration = readV3F1000(is);
@@ -1102,7 +1647,10 @@ class GenericCAO : public ClientActiveObject
// the ground due to sucky collision detection...
if(m_prop.physical)
m_position += v3f(0,0.002,0);
if(getParent() != NULL) // Just in case
return;
if(do_interpolate){
if(!m_prop.physical)
pos_translator.update(m_position, is_end_position, update_interval);
@@ -1130,6 +1678,41 @@ class GenericCAO : public ClientActiveObject
updateTexturePos();
}
else if(cmd == GENERIC_CMD_SET_ANIMATION)
{
m_animation_range = readV2F1000(is);
m_animation_speed = readF1000(is);
m_animation_blend = readF1000(is);
updateAnimation();
}
else if(cmd == GENERIC_CMD_SET_BONE_POSITION)
{
std::string bone = deSerializeString(is);
v3f position = readV3F1000(is);
v3f rotation = readV3F1000(is);
m_bone_position[bone] = core::vector2d<v3f>(position, rotation);
updateBonePosition();
}
else if(cmd == GENERIC_CMD_SET_ATTACHMENT)
{
// If an entry already exists for this object, delete it first to avoid duplicates
for(std::vector<core::vector2d<int> >::iterator ii = m_env->attachment_list.begin(); ii != m_env->attachment_list.end(); ii++)
{
if(ii->X == getId()) // This is the ID of our object
{
m_env->attachment_list.erase(ii);
break;
}
}
m_env->attachment_list.push_back(core::vector2d<int>(getId(), readS16(is)));
m_attachment_bone = deSerializeString(is);
m_attachment_position = readV3F1000(is);
m_attachment_rotation = readV3F1000(is);
updateAttachments();
}
else if(cmd == GENERIC_CMD_PUNCHED)
{
/*s16 damage =*/ readS16(is);

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2012 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "log.h"
#include "map.h"
/*
static void setBillboardTextureMatrix(scene::IBillboardSceneNode *bill,
float txs, float tys, int col, int row)
{
@@ -33,6 +34,7 @@ static void setBillboardTextureMatrix(scene::IBillboardSceneNode *bill,
matrix.setTextureTranslate(txs*col, tys*row);
matrix.setTextureScale(txs, tys);
}
*/
class SmokePuffCSO: public ClientSimpleObject
{

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2012 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -26,7 +26,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "tile.h"
#include "gamedef.h"
#include "util/numeric.h"
#include "util/serialize.h"
#include "util/directiontables.h"
// Create a cuboid.
@@ -43,14 +42,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
// (compatible with ContentFeatures). If you specified 0,0,1,1
// for each face, that would be the same as passing NULL.
void makeCuboid(MeshCollector *collector, const aabb3f &box,
const TileSpec *tiles, int tilecount,
TileSpec *tiles, int tilecount,
video::SColor &c, const f32* txc)
{
assert(tilecount >= 1 && tilecount <= 6);
v3f min = box.MinEdge;
v3f max = box.MaxEdge;
if(txc == NULL)
{
static const f32 txc_default[24] = {
@@ -98,15 +99,70 @@ void makeCuboid(MeshCollector *collector, const aabb3f &box,
video::S3DVertex(min.X,min.Y,min.Z, 0,0,-1, c, txc[20],txc[23]),
};
for(s32 j=0; j<24; j++)
v2f t;
for(int i = 0; i < tilecount; i++)
{
switch (tiles[i].rotation)
{
case 0:
break;
case 1: //R90
for (int x = 0; x < 4; x++)
vertices[i*4+x].TCoords.rotateBy(90,irr::core::vector2df(0, 0));
break;
case 2: //R180
for (int x = 0; x < 4; x++)
vertices[i*4+x].TCoords.rotateBy(180,irr::core::vector2df(0, 0));
break;
case 3: //R270
for (int x = 0; x < 4; x++)
vertices[i*4+x].TCoords.rotateBy(270,irr::core::vector2df(0, 0));
break;
case 4: //FXR90
for (int x = 0; x < 4; x++)
vertices[i*4+x].TCoords.rotateBy(90,irr::core::vector2df(0, 0));
tiles[i].texture.pos.Y += tiles[i].texture.size.Y;
tiles[i].texture.size.Y *= -1;
break;
case 5: //FXR270
for (int x = 0; x < 4; x++)
vertices[i*4+x].TCoords.rotateBy(270,irr::core::vector2df(0, 0));
t=vertices[i*4].TCoords;
tiles[i].texture.pos.Y += tiles[i].texture.size.Y;
tiles[i].texture.size.Y *= -1;
break;
case 6: //FYR90
for (int x = 0; x < 4; x++)
vertices[i*4+x].TCoords.rotateBy(90,irr::core::vector2df(0, 0));
tiles[i].texture.pos.X += tiles[i].texture.size.X;
tiles[i].texture.size.X *= -1;
break;
case 7: //FYR270
for (int x = 0; x < 4; x++)
vertices[i*4+x].TCoords.rotateBy(270,irr::core::vector2df(0, 0));
tiles[i].texture.pos.X += tiles[i].texture.size.X;
tiles[i].texture.size.X *= -1;
break;
case 8: //FX
tiles[i].texture.pos.Y += tiles[i].texture.size.Y;
tiles[i].texture.size.Y *= -1;
break;
case 9: //FY
tiles[i].texture.pos.X += tiles[i].texture.size.X;
tiles[i].texture.size.X *= -1;
break;
default:
break;
}
}
for(s32 j=0; j<24; j++)
{
int tileindex = MYMIN(j/4, tilecount-1);
vertices[j].TCoords *= tiles[tileindex].texture.size;
vertices[j].TCoords += tiles[tileindex].texture.pos;
}
u16 indices[] = {0,1,2,2,3,0};
// Add to mesh collector
for(s32 j=0; j<24; j+=4)
{
@@ -161,18 +217,145 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
Add water sources to mesh if using new style
*/
TileSpec tile_liquid = f.special_tiles[0];
TileSpec tile_liquid_bfculled = getNodeTile(n, p, v3s16(0,0,0), data);
AtlasPointer &pa_liquid = tile_liquid.texture;
bool top_is_air = false;
MapNode n = data->m_vmanip.getNodeNoEx(blockpos_nodes + v3s16(x,y+1,z));
if(n.getContent() == CONTENT_AIR)
top_is_air = true;
if(top_is_air == false)
continue;
bool top_is_same_liquid = false;
MapNode ntop = data->m_vmanip.getNodeNoEx(blockpos_nodes + v3s16(x,y+1,z));
content_t c_flowing = nodedef->getId(f.liquid_alternative_flowing);
content_t c_source = nodedef->getId(f.liquid_alternative_source);
if(ntop.getContent() == c_flowing || ntop.getContent() == c_source)
top_is_same_liquid = true;
u16 l = getInteriorLight(n, 0, data);
video::SColor c = MapBlock_LightColor(f.alpha, l);
video::SColor c = MapBlock_LightColor(f.alpha, l, decode_light(f.light_source));
/*
Generate sides
*/
v3s16 side_dirs[4] = {
v3s16(1,0,0),
v3s16(-1,0,0),
v3s16(0,0,1),
v3s16(0,0,-1),
};
for(u32 i=0; i<4; i++)
{
v3s16 dir = side_dirs[i];
MapNode neighbor = data->m_vmanip.getNodeNoEx(blockpos_nodes + p + dir);
content_t neighbor_content = neighbor.getContent();
const ContentFeatures &n_feat = nodedef->get(neighbor_content);
MapNode n_top = data->m_vmanip.getNodeNoEx(blockpos_nodes + p + dir+ v3s16(0,1,0));
content_t n_top_c = n_top.getContent();
if(neighbor_content == CONTENT_IGNORE)
continue;
/*
If our topside is liquid and neighbor's topside
is liquid, don't draw side face
*/
if(top_is_same_liquid && (n_top_c == c_flowing ||
n_top_c == c_source || n_top_c == CONTENT_IGNORE))
continue;
// Don't draw face if neighbor is blocking the view
if(n_feat.solidness == 2)
continue;
bool neighbor_is_same_liquid = (neighbor_content == c_source
|| neighbor_content == c_flowing);
// Don't draw any faces if neighbor same is liquid and top is
// same liquid
if(neighbor_is_same_liquid && !top_is_same_liquid)
continue;
// Use backface culled material if neighbor doesn't have a
// solidness of 0
const TileSpec *current_tile = &tile_liquid;
if(n_feat.solidness != 0 || n_feat.visual_solidness != 0)
current_tile = &tile_liquid_bfculled;
video::S3DVertex vertices[4] =
{
video::S3DVertex(-BS/2,0,BS/2,0,0,0, c,
pa_liquid.x0(), pa_liquid.y1()),
video::S3DVertex(BS/2,0,BS/2,0,0,0, c,
pa_liquid.x1(), pa_liquid.y1()),
video::S3DVertex(BS/2,0,BS/2, 0,0,0, c,
pa_liquid.x1(), pa_liquid.y0()),
video::S3DVertex(-BS/2,0,BS/2, 0,0,0, c,
pa_liquid.x0(), pa_liquid.y0()),
};
/*
If our topside is liquid, set upper border of face
at upper border of node
*/
if(top_is_same_liquid)
{
vertices[2].Pos.Y = 0.5*BS;
vertices[3].Pos.Y = 0.5*BS;
}
/*
Otherwise upper position of face is liquid level
*/
else
{
vertices[2].Pos.Y = (node_liquid_level-0.5)*BS;
vertices[3].Pos.Y = (node_liquid_level-0.5)*BS;
}
/*
If neighbor is liquid, lower border of face is liquid level
*/
if(neighbor_is_same_liquid)
{
vertices[0].Pos.Y = (node_liquid_level-0.5)*BS;
vertices[1].Pos.Y = (node_liquid_level-0.5)*BS;
}
/*
If neighbor is not liquid, lower border of face is
lower border of node
*/
else
{
vertices[0].Pos.Y = -0.5*BS;
vertices[1].Pos.Y = -0.5*BS;
}
for(s32 j=0; j<4; j++)
{
if(dir == v3s16(0,0,1))
vertices[j].Pos.rotateXZBy(0);
if(dir == v3s16(0,0,-1))
vertices[j].Pos.rotateXZBy(180);
if(dir == v3s16(-1,0,0))
vertices[j].Pos.rotateXZBy(90);
if(dir == v3s16(1,0,-0))
vertices[j].Pos.rotateXZBy(-90);
// Do this to not cause glitches when two liquids are
// side-by-side
/*if(neighbor_is_same_liquid == false){
vertices[j].Pos.X *= 0.98;
vertices[j].Pos.Z *= 0.98;
}*/
vertices[j].Pos += intToFloat(p, BS);
}
u16 indices[] = {0,1,2,2,3,0};
// Add to mesh collector
collector.append(*current_tile, vertices, 4, indices, 6);
}
/*
Generate top
*/
if(top_is_same_liquid)
continue;
video::S3DVertex vertices[4] =
{
@@ -186,7 +369,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
pa_liquid.x0(), pa_liquid.y0()),
};
v3f offset(p.X, p.Y + (-0.5+node_liquid_level)*BS, p.Z);
v3f offset(p.X*BS, p.Y*BS + (-0.5+node_liquid_level)*BS, p.Z*BS);
for(s32 i=0; i<4; i++)
{
vertices[i].Pos += offset;
@@ -227,13 +410,13 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
// Otherwise use the light of this node (the liquid)
else
l = getInteriorLight(n, 0, data);
video::SColor c = MapBlock_LightColor(f.alpha, l);
video::SColor c = MapBlock_LightColor(f.alpha, l, decode_light(f.light_source));
// Neighbor liquid levels (key = relative position)
// Includes current node
core::map<v3s16, f32> neighbor_levels;
core::map<v3s16, content_t> neighbor_contents;
core::map<v3s16, u8> neighbor_flags;
std::map<v3s16, f32> neighbor_levels;
std::map<v3s16, content_t> neighbor_contents;
std::map<v3s16, u8> neighbor_flags;
const u8 neighborflag_top_is_same_liquid = 0x01;
v3s16 neighbor_dirs[9] = {
v3s16(0,0,0),
@@ -262,7 +445,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
level = (-0.5+node_liquid_level) * BS;
else if(n2.getContent() == c_flowing)
level = (-0.5 + ((float)(n2.param2&LIQUID_LEVEL_MASK)
+ 0.5) / 8.0 * node_liquid_level) * BS;
+ 0.5) / (float)LIQUID_LEVEL_SOURCE * node_liquid_level) * BS;
// Check node above neighbor.
// NOTE: This doesn't get executed if neighbor
@@ -274,9 +457,9 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
flags |= neighborflag_top_is_same_liquid;
}
neighbor_levels.insert(neighbor_dirs[i], level);
neighbor_contents.insert(neighbor_dirs[i], content);
neighbor_flags.insert(neighbor_dirs[i], flags);
neighbor_levels[neighbor_dirs[i]] = level;
neighbor_contents[neighbor_dirs[i]] = content;
neighbor_flags[neighbor_dirs[i]] = flags;
}
// Corner heights (average between four liquids)
@@ -325,7 +508,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
}
}
if(air_count >= 2)
cornerlevel = -0.5*BS;
cornerlevel = -0.5*BS+0.2;
else if(valid_count > 0)
cornerlevel /= valid_count;
corner_levels[i] = cornerlevel;
@@ -492,15 +675,15 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
// -Z towards +Z, thus the direction is +Z.
// Rotate texture to make animation go in flow direction
// Positive if liquid moves towards +Z
int dz = (corner_levels[side_corners[2][0]] +
corner_levels[side_corners[2][1]] <
corner_levels[side_corners[3][0]] +
corner_levels[side_corners[3][1]]);
int dz = (corner_levels[side_corners[3][0]] +
corner_levels[side_corners[3][1]]) -
(corner_levels[side_corners[2][0]] +
corner_levels[side_corners[2][1]]);
// Positive if liquid moves towards +X
int dx = (corner_levels[side_corners[0][0]] +
corner_levels[side_corners[0][1]] <
corner_levels[side_corners[1][0]] +
corner_levels[side_corners[1][1]]);
int dx = (corner_levels[side_corners[1][0]] +
corner_levels[side_corners[1][1]]) -
(corner_levels[side_corners[0][0]] +
corner_levels[side_corners[0][1]]);
// -X
if(-dx >= abs(dz))
{
@@ -545,7 +728,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
AtlasPointer ap = tile.texture;
u16 l = getInteriorLight(n, 1, data);
video::SColor c = MapBlock_LightColor(255, l);
video::SColor c = MapBlock_LightColor(255, l, decode_light(f.light_source));
for(u32 j=0; j<6; j++)
{
@@ -605,7 +788,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
AtlasPointer pa_leaves = tile_leaves.texture;
u16 l = getInteriorLight(n, 1, data);
video::SColor c = MapBlock_LightColor(255, l);
video::SColor c = MapBlock_LightColor(255, l, decode_light(f.light_source));
v3f pos = intToFloat(p, BS);
aabb3f box(-BS/2,-BS/2,-BS/2,BS/2,BS/2,BS/2);
@@ -639,7 +822,8 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
AtlasPointer ap = tile.texture;
video::SColor c(255,255,255,255);
u16 l = getInteriorLight(n, 1, data);
video::SColor c = MapBlock_LightColor(255, l, decode_light(f.light_source));
// Wall at X+ of node
video::S3DVertex vertices[4] =
@@ -684,7 +868,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
AtlasPointer ap = tile.texture;
u16 l = getInteriorLight(n, 0, data);
video::SColor c = MapBlock_LightColor(255, l);
video::SColor c = MapBlock_LightColor(255, l, decode_light(f.light_source));
float d = (float)BS/16;
// Wall at X+ of node
@@ -731,9 +915,9 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
AtlasPointer ap = tile.texture;
u16 l = getInteriorLight(n, 1, data);
video::SColor c = MapBlock_LightColor(255, l);
video::SColor c = MapBlock_LightColor(255, l, decode_light(f.light_source));
for(u32 j=0; j<4; j++)
for(u32 j=0; j<2; j++)
{
video::S3DVertex vertices[4] =
{
@@ -759,16 +943,6 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
for(u16 i=0; i<4; i++)
vertices[i].Pos.rotateXZBy(-45);
}
else if(j == 2)
{
for(u16 i=0; i<4; i++)
vertices[i].Pos.rotateXZBy(135);
}
else if(j == 3)
{
for(u16 i=0; i<4; i++)
vertices[i].Pos.rotateXZBy(-135);
}
for(u16 i=0; i<4; i++)
{
@@ -794,7 +968,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
tile.texture.id) + "^[transformR90");
u16 l = getInteriorLight(n, 1, data);
video::SColor c = MapBlock_LightColor(255, l);
video::SColor c = MapBlock_LightColor(255, l, decode_light(f.light_source));
const f32 post_rad=(f32)BS/8;
const f32 bar_rad=(f32)BS/16;
@@ -997,7 +1171,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
AtlasPointer ap = tile.texture;
u16 l = getInteriorLight(n, 0, data);
video::SColor c = MapBlock_LightColor(255, l);
video::SColor c = MapBlock_LightColor(255, l, decode_light(f.light_source));
float d = (float)BS/64;
@@ -1037,16 +1211,10 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
v3s16(0, 0, 1),
v3s16(0, 0, -1)
};
TileSpec tiles[6];
for(int i = 0; i < 6; i++)
{
// Handles facedir rotation for textures
tiles[i] = getNodeTile(n, p, tile_dirs[i], data);
}
u16 l = getInteriorLight(n, 0, data);
video::SColor c = MapBlock_LightColor(255, l);
video::SColor c = MapBlock_LightColor(255, l, decode_light(f.light_source));
v3f pos = intToFloat(p, BS);
@@ -1055,17 +1223,43 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
i = boxes.begin();
i != boxes.end(); i++)
{
for(int j = 0; j < 6; j++)
{
// Handles facedir rotation for textures
tiles[j] = getNodeTile(n, p, tile_dirs[j], data);
}
aabb3f box = *i;
box.MinEdge += pos;
box.MaxEdge += pos;
f32 temp;
if (box.MinEdge.X > box.MaxEdge.X)
{
temp=box.MinEdge.X;
box.MinEdge.X=box.MaxEdge.X;
box.MaxEdge.X=temp;
}
if (box.MinEdge.Y > box.MaxEdge.Y)
{
temp=box.MinEdge.Y;
box.MinEdge.Y=box.MaxEdge.Y;
box.MaxEdge.Y=temp;
}
if (box.MinEdge.Z > box.MaxEdge.Z)
{
temp=box.MinEdge.Z;
box.MinEdge.Z=box.MaxEdge.Z;
box.MaxEdge.Z=temp;
}
//
// Compute texture coords
f32 tx1 = (i->MinEdge.X/BS)+0.5;
f32 ty1 = (i->MinEdge.Y/BS)+0.5;
f32 tz1 = (i->MinEdge.Z/BS)+0.5;
f32 tx2 = (i->MaxEdge.X/BS)+0.5;
f32 ty2 = (i->MaxEdge.Y/BS)+0.5;
f32 tz2 = (i->MaxEdge.Z/BS)+0.5;
f32 tx1 = (box.MinEdge.X/BS)+0.5;
f32 ty1 = (box.MinEdge.Y/BS)+0.5;
f32 tz1 = (box.MinEdge.Z/BS)+0.5;
f32 tx2 = (box.MaxEdge.X/BS)+0.5;
f32 ty2 = (box.MaxEdge.Y/BS)+0.5;
f32 tz2 = (box.MaxEdge.Z/BS)+0.5;
f32 txc[24] = {
// up
tx1, 1-tz2, tx2, 1-tz1,
@@ -1080,7 +1274,6 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
// front
tx1, 1-ty2, tx2, 1-ty1,
};
makeCuboid(&collector, box, tiles, 6, c, txc);
}
break;}

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View File

@@ -1,6 +1,6 @@
/*
Minetest-c55
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -31,7 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "genericobject.h"
#include "util/serialize.h"
core::map<u16, ServerActiveObject::Factory> ServerActiveObject::m_types;
std::map<u16, ServerActiveObject::Factory> ServerActiveObject::m_types;
/*
DummyLoadSAO
@@ -64,6 +64,10 @@ class DummyLoadSAO : public ServerActiveObject
infostream<<"DummyLoadSAO step"<<std::endl;
}
bool getCollisionBox(aabb3f *toset) {
return false;
}
private:
};
@@ -132,6 +136,10 @@ class TestSAO : public ServerActiveObject
}
}
bool getCollisionBox(aabb3f *toset) {
return false;
}
private:
float m_timer1;
float m_age;
@@ -208,8 +216,7 @@ class ItemSAO : public ServerActiveObject
v3f pos_f_old = pos_f;
v3f accel_f = v3f(0,0,0);
f32 stepheight = 0;
IGameDef *gamedef = m_env->getGameDef();
moveresult = collisionMoveSimple(&m_env->getMap(), gamedef,
moveresult = collisionMoveSimple(m_env,m_env->getGameDef(),
pos_max_d, box, stepheight, dtime,
pos_f, m_speed_f, accel_f);
@@ -245,7 +252,7 @@ class ItemSAO : public ServerActiveObject
}
}
std::string getClientInitializationData()
std::string getClientInitializationData(u16 protocol_version)
{
std::ostringstream os(std::ios::binary);
// version
@@ -314,6 +321,10 @@ class ItemSAO : public ServerActiveObject
return 0;
}
bool getCollisionBox(aabb3f *toset) {
return false;
}
private:
std::string m_itemstring;
@@ -355,7 +366,13 @@ LuaEntitySAO::LuaEntitySAO(ServerEnvironment *env, v3f pos,
m_last_sent_velocity(0,0,0),
m_last_sent_position_timer(0),
m_last_sent_move_precision(0),
m_armor_groups_sent(false)
m_armor_groups_sent(false),
m_animation_speed(0),
m_animation_blend(0),
m_animation_sent(false),
m_bone_position_sent(false),
m_attachment_parent_id(0),
m_attachment_sent(false)
{
// Only register type if no environment supplied
if(env == NULL){
@@ -364,8 +381,7 @@ LuaEntitySAO::LuaEntitySAO(ServerEnvironment *env, v3f pos,
}
// Initialize something to armor groups
m_armor_groups["fleshy"] = 3;
m_armor_groups["snappy"] = 2;
m_armor_groups["fleshy"] = 100;
}
LuaEntitySAO::~LuaEntitySAO()
@@ -376,9 +392,9 @@ LuaEntitySAO::~LuaEntitySAO()
}
}
void LuaEntitySAO::addedToEnvironment()
void LuaEntitySAO::addedToEnvironment(u32 dtime_s)
{
ServerActiveObject::addedToEnvironment();
ServerActiveObject::addedToEnvironment(dtime_s);
// Create entity from name
lua_State *L = m_env->getLua();
@@ -390,7 +406,7 @@ void LuaEntitySAO::addedToEnvironment()
// Initialize HP from properties
m_hp = m_prop.hp_max;
// Activate entity, supplying serialized state
scriptapi_luaentity_activate(L, m_id, m_init_state.c_str());
scriptapi_luaentity_activate(L, m_id, m_init_state.c_str(), dtime_s);
}
}
@@ -429,6 +445,17 @@ ServerActiveObject* LuaEntitySAO::create(ServerEnvironment *env, v3f pos,
return sao;
}
bool LuaEntitySAO::isAttached()
{
if(!m_attachment_parent_id)
return false;
// Check if the parent still exists
ServerActiveObject *obj = m_env->getActiveObject(m_attachment_parent_id);
if(obj)
return true;
return false;
}
void LuaEntitySAO::step(float dtime, bool send_recommended)
{
if(!m_properties_sent)
@@ -440,30 +467,51 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
m_messages_out.push_back(aom);
}
// If attached, check that our parent is still there. If it isn't, detach.
if(m_attachment_parent_id && !isAttached())
{
m_attachment_parent_id = 0;
m_attachment_bone = "";
m_attachment_position = v3f(0,0,0);
m_attachment_rotation = v3f(0,0,0);
sendPosition(false, true);
}
m_last_sent_position_timer += dtime;
if(m_prop.physical){
core::aabbox3d<f32> box = m_prop.collisionbox;
box.MinEdge *= BS;
box.MaxEdge *= BS;
collisionMoveResult moveresult;
f32 pos_max_d = BS*0.25; // Distance per iteration
f32 stepheight = 0; // Maximum climbable step height
v3f p_pos = m_base_position;
v3f p_velocity = m_velocity;
v3f p_acceleration = m_acceleration;
IGameDef *gamedef = m_env->getGameDef();
moveresult = collisionMoveSimple(&m_env->getMap(), gamedef,
pos_max_d, box, stepheight, dtime,
p_pos, p_velocity, p_acceleration);
// Apply results
m_base_position = p_pos;
m_velocity = p_velocity;
m_acceleration = p_acceleration;
} else {
m_base_position += dtime * m_velocity + 0.5 * dtime
* dtime * m_acceleration;
m_velocity += dtime * m_acceleration;
// Each frame, parent position is copied if the object is attached, otherwise it's calculated normally
// If the object gets detached this comes into effect automatically from the last known origin
if(isAttached())
{
v3f pos = m_env->getActiveObject(m_attachment_parent_id)->getBasePosition();
m_base_position = pos;
m_velocity = v3f(0,0,0);
m_acceleration = v3f(0,0,0);
}
else
{
if(m_prop.physical){
core::aabbox3d<f32> box = m_prop.collisionbox;
box.MinEdge *= BS;
box.MaxEdge *= BS;
collisionMoveResult moveresult;
f32 pos_max_d = BS*0.25; // Distance per iteration
f32 stepheight = 0; // Maximum climbable step height
v3f p_pos = m_base_position;
v3f p_velocity = m_velocity;
v3f p_acceleration = m_acceleration;
moveresult = collisionMoveSimple(m_env,m_env->getGameDef(),
pos_max_d, box, stepheight, dtime,
p_pos, p_velocity, p_acceleration);
// Apply results
m_base_position = p_pos;
m_velocity = p_velocity;
m_acceleration = p_acceleration;
} else {
m_base_position += dtime * m_velocity + 0.5 * dtime
* dtime * m_acceleration;
m_velocity += dtime * m_acceleration;
}
}
if(m_registered){
@@ -473,20 +521,23 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
if(send_recommended == false)
return;
// TODO: force send when acceleration changes enough?
float minchange = 0.2*BS;
if(m_last_sent_position_timer > 1.0){
minchange = 0.01*BS;
} else if(m_last_sent_position_timer > 0.2){
minchange = 0.05*BS;
}
float move_d = m_base_position.getDistanceFrom(m_last_sent_position);
move_d += m_last_sent_move_precision;
float vel_d = m_velocity.getDistanceFrom(m_last_sent_velocity);
if(move_d > minchange || vel_d > minchange ||
fabs(m_yaw - m_last_sent_yaw) > 1.0){
sendPosition(true, false);
if(!isAttached())
{
// TODO: force send when acceleration changes enough?
float minchange = 0.2*BS;
if(m_last_sent_position_timer > 1.0){
minchange = 0.01*BS;
} else if(m_last_sent_position_timer > 0.2){
minchange = 0.05*BS;
}
float move_d = m_base_position.getDistanceFrom(m_last_sent_position);
move_d += m_last_sent_move_precision;
float vel_d = m_velocity.getDistanceFrom(m_last_sent_velocity);
if(move_d > minchange || vel_d > minchange ||
fabs(m_yaw - m_last_sent_yaw) > 1.0){
sendPosition(true, false);
}
}
if(m_armor_groups_sent == false){
@@ -497,20 +548,70 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
ActiveObjectMessage aom(getId(), true, str);
m_messages_out.push_back(aom);
}
if(m_animation_sent == false){
m_animation_sent = true;
std::string str = gob_cmd_update_animation(m_animation_range, m_animation_speed, m_animation_blend);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
m_messages_out.push_back(aom);
}
if(m_bone_position_sent == false){
m_bone_position_sent = true;
for(std::map<std::string, core::vector2d<v3f> >::const_iterator ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii){
std::string str = gob_cmd_update_bone_position((*ii).first, (*ii).second.X, (*ii).second.Y);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
m_messages_out.push_back(aom);
}
}
if(m_attachment_sent == false){
m_attachment_sent = true;
std::string str = gob_cmd_update_attachment(m_attachment_parent_id, m_attachment_bone, m_attachment_position, m_attachment_rotation);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
m_messages_out.push_back(aom);
}
}
std::string LuaEntitySAO::getClientInitializationData()
std::string LuaEntitySAO::getClientInitializationData(u16 protocol_version)
{
std::ostringstream os(std::ios::binary);
writeU8(os, 0); // version
os<<serializeString(""); // name
writeU8(os, 0); // is_player
writeV3F1000(os, m_base_position);
writeF1000(os, m_yaw);
writeS16(os, m_hp);
writeU8(os, 2); // number of messages stuffed in here
os<<serializeLongString(getPropertyPacket()); // message 1
os<<serializeLongString(gob_cmd_update_armor_groups(m_armor_groups)); // 2
if(protocol_version >= 14)
{
writeU8(os, 1); // version
os<<serializeString(""); // name
writeU8(os, 0); // is_player
writeS16(os, getId()); //id
writeV3F1000(os, m_base_position);
writeF1000(os, m_yaw);
writeS16(os, m_hp);
writeU8(os, 4 + m_bone_position.size()); // number of messages stuffed in here
os<<serializeLongString(getPropertyPacket()); // message 1
os<<serializeLongString(gob_cmd_update_armor_groups(m_armor_groups)); // 2
os<<serializeLongString(gob_cmd_update_animation(m_animation_range, m_animation_speed, m_animation_blend)); // 3
for(std::map<std::string, core::vector2d<v3f> >::const_iterator ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii){
os<<serializeLongString(gob_cmd_update_bone_position((*ii).first, (*ii).second.X, (*ii).second.Y)); // m_bone_position.size
}
os<<serializeLongString(gob_cmd_update_attachment(m_attachment_parent_id, m_attachment_bone, m_attachment_position, m_attachment_rotation)); // 4
}
else
{
writeU8(os, 0); // version
os<<serializeString(""); // name
writeU8(os, 0); // is_player
writeV3F1000(os, m_base_position);
writeF1000(os, m_yaw);
writeS16(os, m_hp);
writeU8(os, 2); // number of messages stuffed in here
os<<serializeLongString(getPropertyPacket()); // message 1
os<<serializeLongString(gob_cmd_update_armor_groups(m_armor_groups)); // 2
}
// return result
return os.str();
}
@@ -550,6 +651,10 @@ int LuaEntitySAO::punch(v3f dir,
m_removed = true;
return 0;
}
// It's best that attachments cannot be punched
if(isAttached())
return 0;
ItemStack *punchitem = NULL;
ItemStack punchitem_static;
@@ -594,18 +699,25 @@ void LuaEntitySAO::rightClick(ServerActiveObject *clicker)
{
if(!m_registered)
return;
// It's best that attachments cannot be clicked
if(isAttached())
return;
lua_State *L = m_env->getLua();
scriptapi_luaentity_rightclick(L, m_id, clicker);
}
void LuaEntitySAO::setPos(v3f pos)
{
if(isAttached())
return;
m_base_position = pos;
sendPosition(false, true);
}
void LuaEntitySAO::moveTo(v3f pos, bool continuous)
{
if(isAttached())
return;
m_base_position = pos;
if(!continuous)
sendPosition(true, true);
@@ -644,6 +756,37 @@ void LuaEntitySAO::setArmorGroups(const ItemGroupList &armor_groups)
m_armor_groups_sent = false;
}
void LuaEntitySAO::setAnimation(v2f frame_range, float frame_speed, float frame_blend)
{
m_animation_range = frame_range;
m_animation_speed = frame_speed;
m_animation_blend = frame_blend;
m_animation_sent = false;
}
void LuaEntitySAO::setBonePosition(std::string bone, v3f position, v3f rotation)
{
m_bone_position[bone] = core::vector2d<v3f>(position, rotation);
m_bone_position_sent = false;
}
void LuaEntitySAO::setAttachment(int parent_id, std::string bone, v3f position, v3f rotation)
{
// Attachments need to be handled on both the server and client.
// If we just attach on the server, we can only copy the position of the parent. Attachments
// are still sent to clients at an interval so players might see them lagging, plus we can't
// read and attach to skeletal bones.
// If we just attach on the client, the server still sees the child at its original location.
// This breaks some things so we also give the server the most accurate representation
// even if players only see the client changes.
m_attachment_parent_id = parent_id;
m_attachment_bone = bone;
m_attachment_position = position;
m_attachment_rotation = rotation;
m_attachment_sent = false;
}
ObjectProperties* LuaEntitySAO::accessObjectProperties()
{
return &m_prop;
@@ -718,6 +861,10 @@ std::string LuaEntitySAO::getPropertyPacket()
void LuaEntitySAO::sendPosition(bool do_interpolate, bool is_movement_end)
{
// If the object is attached client-side, don't waste bandwidth sending its position to clients
if(isAttached())
return;
m_last_sent_move_precision = m_base_position.getDistanceFrom(
m_last_sent_position);
m_last_sent_position_timer = 0;
@@ -742,6 +889,22 @@ void LuaEntitySAO::sendPosition(bool do_interpolate, bool is_movement_end)
m_messages_out.push_back(aom);
}
bool LuaEntitySAO::getCollisionBox(aabb3f *toset) {
if (m_prop.physical)
{
//update collision box
toset->MinEdge = m_prop.collisionbox.MinEdge * BS;
toset->MaxEdge = m_prop.collisionbox.MaxEdge * BS;
toset->MinEdge += m_base_position;
toset->MaxEdge += m_base_position;
return true;
}
return false;
}
/*
PlayerSAO
*/
@@ -765,8 +928,11 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, Player *player_, u16 peer_id_,
m_properties_sent(true),
m_privs(privs),
m_is_singleplayer(is_singleplayer),
m_animation_sent(false),
m_bone_position_sent(false),
m_attachment_sent(false),
// public
m_teleported(false),
m_moved(false),
m_inventory_not_sent(false),
m_hp_not_sent(false),
m_wielded_item_not_sent(false)
@@ -775,20 +941,23 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, Player *player_, u16 peer_id_,
assert(m_peer_id != 0);
setBasePosition(m_player->getPosition());
m_inventory = &m_player->inventory;
m_armor_groups["choppy"] = 2;
m_armor_groups["fleshy"] = 3;
m_armor_groups["fleshy"] = 100;
m_prop.hp_max = PLAYER_MAX_HP;
m_prop.physical = false;
m_prop.weight = 75;
m_prop.collisionbox = core::aabbox3d<f32>(-1/3.,-1.0,-1/3., 1/3.,1.0,1/3.);
// start of default appearance, this should be overwritten by LUA
m_prop.visual = "upright_sprite";
m_prop.visual_size = v2f(1, 2);
m_prop.textures.clear();
m_prop.textures.push_back("player.png");
m_prop.textures.push_back("player_back.png");
m_prop.colors.clear();
m_prop.colors.push_back(video::SColor(255, 255, 255, 255));
m_prop.spritediv = v2s16(1,1);
m_prop.is_visible = (getHP() != 0);
// end of default appearance
m_prop.is_visible = true;
m_prop.makes_footstep_sound = true;
}
@@ -805,9 +974,9 @@ std::string PlayerSAO::getDescription()
}
// Called after id has been set and has been inserted in environment
void PlayerSAO::addedToEnvironment()
void PlayerSAO::addedToEnvironment(u32 dtime_s)
{
ServerActiveObject::addedToEnvironment();
ServerActiveObject::addedToEnvironment(dtime_s);
ServerActiveObject::setBasePosition(m_player->getPosition());
m_player->setPlayerSAO(this);
m_player->peer_id = m_peer_id;
@@ -836,18 +1005,43 @@ bool PlayerSAO::unlimitedTransferDistance() const
return g_settings->getBool("unlimited_player_transfer_distance");
}
std::string PlayerSAO::getClientInitializationData()
std::string PlayerSAO::getClientInitializationData(u16 protocol_version)
{
std::ostringstream os(std::ios::binary);
writeU8(os, 0); // version
os<<serializeString(m_player->getName()); // name
writeU8(os, 1); // is_player
writeV3F1000(os, m_player->getPosition() + v3f(0,BS*1,0));
writeF1000(os, m_player->getYaw());
writeS16(os, getHP());
writeU8(os, 2); // number of messages stuffed in here
os<<serializeLongString(getPropertyPacket()); // message 1
os<<serializeLongString(gob_cmd_update_armor_groups(m_armor_groups)); // 2
if(protocol_version >= 15)
{
writeU8(os, 1); // version
os<<serializeString(m_player->getName()); // name
writeU8(os, 1); // is_player
writeS16(os, getId()); //id
writeV3F1000(os, m_player->getPosition() + v3f(0,BS*1,0));
writeF1000(os, m_player->getYaw());
writeS16(os, getHP());
writeU8(os, 4 + m_bone_position.size()); // number of messages stuffed in here
os<<serializeLongString(getPropertyPacket()); // message 1
os<<serializeLongString(gob_cmd_update_armor_groups(m_armor_groups)); // 2
os<<serializeLongString(gob_cmd_update_animation(m_animation_range, m_animation_speed, m_animation_blend)); // 3
for(std::map<std::string, core::vector2d<v3f> >::const_iterator ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii){
os<<serializeLongString(gob_cmd_update_bone_position((*ii).first, (*ii).second.X, (*ii).second.Y)); // m_bone_position.size
}
os<<serializeLongString(gob_cmd_update_attachment(m_attachment_parent_id, m_attachment_bone, m_attachment_position, m_attachment_rotation)); // 4
}
else
{
writeU8(os, 0); // version
os<<serializeString(m_player->getName()); // name
writeU8(os, 1); // is_player
writeV3F1000(os, m_player->getPosition() + v3f(0,BS*1,0));
writeF1000(os, m_player->getYaw());
writeS16(os, getHP());
writeU8(os, 2); // number of messages stuffed in here
os<<serializeLongString(getPropertyPacket()); // message 1
os<<serializeLongString(gob_cmd_update_armor_groups(m_armor_groups)); // 2
}
// return result
return os.str();
}
@@ -857,6 +1051,17 @@ std::string PlayerSAO::getStaticData()
return "";
}
bool PlayerSAO::isAttached()
{
if(!m_attachment_parent_id)
return false;
// Check if the parent still exists
ServerActiveObject *obj = m_env->getActiveObject(m_attachment_parent_id);
if(obj)
return true;
return false;
}
void PlayerSAO::step(float dtime, bool send_recommended)
{
if(!m_properties_sent)
@@ -868,73 +1073,102 @@ void PlayerSAO::step(float dtime, bool send_recommended)
m_messages_out.push_back(aom);
}
// If attached, check that our parent is still there. If it isn't, detach.
if(m_attachment_parent_id && !isAttached())
{
m_attachment_parent_id = 0;
m_attachment_bone = "";
m_attachment_position = v3f(0,0,0);
m_attachment_rotation = v3f(0,0,0);
m_player->setPosition(m_last_good_position);
m_moved = true;
}
m_time_from_last_punch += dtime;
m_nocheat_dig_time += dtime;
if(m_is_singleplayer || g_settings->getBool("disable_anticheat"))
// Each frame, parent position is copied if the object is attached, otherwise it's calculated normally
// If the object gets detached this comes into effect automatically from the last known origin
if(isAttached())
{
m_last_good_position = m_player->getPosition();
v3f pos = m_env->getActiveObject(m_attachment_parent_id)->getBasePosition();
m_last_good_position = pos;
m_last_good_position_age = 0;
m_player->setPosition(pos);
}
else
{
/*
Check player movements
NOTE: Actually the server should handle player physics like the
client does and compare player's position to what is calculated
on our side. This is required when eg. players fly due to an
explosion. Altough a node-based alternative might be possible
too, and much more lightweight.
*/
float player_max_speed = 0;
float player_max_speed_up = 0;
if(m_privs.count("fast") != 0){
// Fast speed
player_max_speed = BS * 20;
player_max_speed_up = BS * 20;
} else {
// Normal speed
player_max_speed = BS * 4.0;
player_max_speed_up = BS * 4.0;
}
// Tolerance
player_max_speed *= 2.5;
player_max_speed_up *= 2.5;
m_last_good_position_age += dtime;
if(m_last_good_position_age >= 1.0){
float age = m_last_good_position_age;
v3f diff = (m_player->getPosition() - m_last_good_position);
float d_vert = diff.Y;
diff.Y = 0;
float d_horiz = diff.getLength();
/*infostream<<m_player->getName()<<"'s horizontal speed is "
<<(d_horiz/age)<<std::endl;*/
if(d_horiz <= age * player_max_speed &&
(d_vert < 0 || d_vert < age * player_max_speed_up)){
m_last_good_position = m_player->getPosition();
} else {
actionstream<<"Player "<<m_player->getName()
<<" moved too fast; resetting position"
<<std::endl;
m_player->setPosition(m_last_good_position);
m_teleported = true;
}
if(m_is_singleplayer || g_settings->getBool("disable_anticheat"))
{
m_last_good_position = m_player->getPosition();
m_last_good_position_age = 0;
}
else
{
/*
Check player movements
NOTE: Actually the server should handle player physics like the
client does and compare player's position to what is calculated
on our side. This is required when eg. players fly due to an
explosion. Altough a node-based alternative might be possible
too, and much more lightweight.
*/
float player_max_speed = 0;
float player_max_speed_up = 0;
if(m_privs.count("fast") != 0){
// Fast speed
player_max_speed = BS * 20;
player_max_speed_up = BS * 20;
} else {
// Normal speed
player_max_speed = BS * 4.0;
player_max_speed_up = BS * 4.0;
}
// Tolerance
player_max_speed *= 2.5;
player_max_speed_up *= 2.5;
m_last_good_position_age += dtime;
if(m_last_good_position_age >= 1.0){
float age = m_last_good_position_age;
v3f diff = (m_player->getPosition() - m_last_good_position);
float d_vert = diff.Y;
diff.Y = 0;
float d_horiz = diff.getLength();
/*infostream<<m_player->getName()<<"'s horizontal speed is "
<<(d_horiz/age)<<std::endl;*/
if(d_horiz <= age * player_max_speed &&
(d_vert < 0 || d_vert < age * player_max_speed_up)){
m_last_good_position = m_player->getPosition();
} else {
actionstream<<"Player "<<m_player->getName()
<<" moved too fast; resetting position"
<<std::endl;
m_player->setPosition(m_last_good_position);
m_moved = true;
}
m_last_good_position_age = 0;
}
}
}
if(send_recommended == false)
return;
if(m_position_not_sent)
// If the object is attached client-side, don't waste bandwidth sending its position to clients
if(m_position_not_sent && !isAttached())
{
m_position_not_sent = false;
float update_interval = m_env->getSendRecommendedInterval();
v3f pos;
if(isAttached()) // Just in case we ever do send attachment position too
pos = m_env->getActiveObject(m_attachment_parent_id)->getBasePosition();
else
pos = m_player->getPosition() + v3f(0,BS*1,0);
std::string str = gob_cmd_update_position(
m_player->getPosition() + v3f(0,BS*1,0),
pos,
v3f(0,0,0),
v3f(0,0,0),
m_player->getYaw(),
@@ -961,32 +1195,77 @@ void PlayerSAO::step(float dtime, bool send_recommended)
ActiveObjectMessage aom(getId(), true, str);
m_messages_out.push_back(aom);
}
if(m_animation_sent == false){
m_animation_sent = true;
std::string str = gob_cmd_update_animation(m_animation_range, m_animation_speed, m_animation_blend);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
m_messages_out.push_back(aom);
}
if(m_bone_position_sent == false){
m_bone_position_sent = true;
for(std::map<std::string, core::vector2d<v3f> >::const_iterator ii = m_bone_position.begin(); ii != m_bone_position.end(); ++ii){
std::string str = gob_cmd_update_bone_position((*ii).first, (*ii).second.X, (*ii).second.Y);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
m_messages_out.push_back(aom);
}
}
if(m_attachment_sent == false){
m_attachment_sent = true;
std::string str = gob_cmd_update_attachment(m_attachment_parent_id, m_attachment_bone, m_attachment_position, m_attachment_rotation);
// create message and add to list
ActiveObjectMessage aom(getId(), true, str);
m_messages_out.push_back(aom);
}
}
void PlayerSAO::setBasePosition(const v3f &position)
{
// This needs to be ran for attachments too
ServerActiveObject::setBasePosition(position);
m_position_not_sent = true;
}
void PlayerSAO::setPos(v3f pos)
{
if(isAttached())
return;
m_player->setPosition(pos);
// Movement caused by this command is always valid
m_last_good_position = pos;
m_last_good_position_age = 0;
// Force position change on client
m_teleported = true;
m_moved = true;
}
void PlayerSAO::moveTo(v3f pos, bool continuous)
{
if(isAttached())
return;
m_player->setPosition(pos);
// Movement caused by this command is always valid
m_last_good_position = pos;
m_last_good_position_age = 0;
// Force position change on client
m_teleported = true;
m_moved = true;
}
void PlayerSAO::setYaw(float yaw)
{
m_player->setYaw(yaw);
// Force change on client
m_moved = true;
}
void PlayerSAO::setPitch(float pitch)
{
m_player->setPitch(pitch);
// Force change on client
m_moved = true;
}
int PlayerSAO::punch(v3f dir,
@@ -994,6 +1273,10 @@ int PlayerSAO::punch(v3f dir,
ServerActiveObject *puncher,
float time_from_last_punch)
{
// It's best that attachments cannot be punched
if(isAttached())
return 0;
if(!toolcap)
return 0;
@@ -1075,6 +1358,39 @@ void PlayerSAO::setArmorGroups(const ItemGroupList &armor_groups)
m_armor_groups_sent = false;
}
void PlayerSAO::setAnimation(v2f frame_range, float frame_speed, float frame_blend)
{
// store these so they can be updated to clients
m_animation_range = frame_range;
m_animation_speed = frame_speed;
m_animation_blend = frame_blend;
m_animation_sent = false;
}
void PlayerSAO::setBonePosition(std::string bone, v3f position, v3f rotation)
{
// store these so they can be updated to clients
m_bone_position[bone] = core::vector2d<v3f>(position, rotation);
m_bone_position_sent = false;
}
void PlayerSAO::setAttachment(int parent_id, std::string bone, v3f position, v3f rotation)
{
// Attachments need to be handled on both the server and client.
// If we just attach on the server, we can only copy the position of the parent. Attachments
// are still sent to clients at an interval so players might see them lagging, plus we can't
// read and attach to skeletal bones.
// If we just attach on the client, the server still sees the child at its original location.
// This breaks some things so we also give the server the most accurate representation
// even if players only see the client changes.
m_attachment_parent_id = parent_id;
m_attachment_bone = bone;
m_attachment_position = position;
m_attachment_rotation = rotation;
m_attachment_sent = false;
}
ObjectProperties* PlayerSAO::accessObjectProperties()
{
return &m_prop;
@@ -1138,7 +1454,11 @@ void PlayerSAO::disconnected()
std::string PlayerSAO::getPropertyPacket()
{
m_prop.is_visible = (getHP() != 0);
m_prop.is_visible = (true);
return gob_cmd_set_properties(m_prop);
}
bool PlayerSAO::getCollisionBox(aabb3f *toset) {
//player collision handling is already done clientside no need to do it twice
return false;
}

Some files were not shown because too many files have changed in this diff Show More