Time |
Nick |
Message |
00:03 |
|
werwerwer_ joined #minetest-dev |
00:35 |
|
djdduty joined #minetest-dev |
00:35 |
|
djdduty joined #minetest-dev |
01:22 |
|
Miner_48er joined #minetest-dev |
01:39 |
PilzAdam |
proller, I dont understand how your comment on #914 is related to the pull request |
03:27 |
|
ch98 joined #minetest-dev |
04:08 |
|
smoke_fumus joined #minetest-dev |
04:59 |
|
neko259 joined #minetest-dev |
05:20 |
thexyz |
nice, all my arguments for bundled leveldb were ignored and no vote was held |
05:30 |
sfan5 |
no, but with celeron being against bundled leveldb and me really wanting to get it merged I removed the bundled one |
05:37 |
sfan5 |
YES! I got leveldb source code that cross-compiles for windows |
06:03 |
|
Neological joined #minetest-dev |
06:17 |
|
OWNSyouAll_DESKT joined #minetest-dev |
06:20 |
|
hmmmm joined #minetest-dev |
06:32 |
|
Calinou joined #minetest-dev |
07:03 |
|
OWNSyouAll_DESKT joined #minetest-dev |
07:55 |
|
OWNSyouAll_DESKT joined #minetest-dev |
08:01 |
|
n4x joined #minetest-dev |
08:05 |
|
RealBadAngel joined #minetest-dev |
08:11 |
|
Akien joined #minetest-dev |
08:28 |
|
OWNSyouAll_DESKT joined #minetest-dev |
08:32 |
|
Calinou joined #minetest-dev |
08:46 |
|
darkrose joined #minetest-dev |
09:17 |
|
OWNSyouAll_DESK1 joined #minetest-dev |
09:22 |
|
Zeg9 joined #minetest-dev |
09:22 |
|
ironzorg joined #minetest-dev |
09:22 |
|
khonkhortisan joined #minetest-dev |
09:22 |
|
Calinou_ joined #minetest-dev |
09:22 |
|
DemonRaiser joined #minetest-dev |
09:22 |
|
darkrose joined #minetest-dev |
09:22 |
|
Akien joined #minetest-dev |
09:22 |
|
RealBadAngel joined #minetest-dev |
09:22 |
|
n4x joined #minetest-dev |
09:22 |
|
smoke_fumus joined #minetest-dev |
09:22 |
|
ch98 joined #minetest-dev |
09:22 |
|
djdduty joined #minetest-dev |
09:22 |
|
harrison joined #minetest-dev |
09:22 |
|
ecube joined #minetest-dev |
09:22 |
|
Yepoleb joined #minetest-dev |
09:22 |
|
Taoki joined #minetest-dev |
09:22 |
|
xrogaan_ joined #minetest-dev |
09:22 |
|
hax404 joined #minetest-dev |
09:22 |
|
Dan68 joined #minetest-dev |
09:22 |
|
BrandonReese joined #minetest-dev |
09:22 |
|
IceCraft joined #minetest-dev |
09:22 |
|
salamanderrake joined #minetest-dev |
09:22 |
|
VanessaE joined #minetest-dev |
09:22 |
|
pitriss joined #minetest-dev |
09:22 |
|
celeron55 joined #minetest-dev |
09:22 |
|
Sokomine joined #minetest-dev |
09:22 |
|
andersje joined #minetest-dev |
09:22 |
|
BackupCoder joined #minetest-dev |
09:22 |
|
kahrl joined #minetest-dev |
09:22 |
|
nyuszika7h joined #minetest-dev |
09:22 |
|
thexyz joined #minetest-dev |
09:22 |
|
sfan5 joined #minetest-dev |
09:22 |
|
Exio4 joined #minetest-dev |
09:22 |
|
dzho joined #minetest-dev |
09:22 |
|
psedlak joined #minetest-dev |
09:22 |
|
tango_ joined #minetest-dev |
09:22 |
|
yno joined #minetest-dev |
09:22 |
|
Kray joined #minetest-dev |
09:30 |
|
OWNSyouAll_DESKT joined #minetest-dev |
09:38 |
|
Akien_ joined #minetest-dev |
09:49 |
|
proller joined #minetest-dev |
09:57 |
|
john_minetest joined #minetest-dev |
09:57 |
|
john_minetest joined #minetest-dev |
10:22 |
|
iqualfragile joined #minetest-dev |
11:40 |
|
PilzAdam joined #minetest-dev |
12:03 |
|
Calinou joined #minetest-dev |
12:19 |
|
proller joined #minetest-dev |
12:38 |
IceCraft |
hello |
12:46 |
|
Taoki_1 joined #minetest-dev |
13:09 |
|
proller joined #minetest-dev |
13:12 |
|
Ritchie joined #minetest-dev |
13:16 |
celeron55 |
AnAfkIceNotHere: are you related to icecraft-mc.eu? |
13:19 |
|
Taoki joined #minetest-dev |
13:23 |
kahrl |
noticed 2 things about database.h |
13:23 |
kahrl |
1. it's missing a license header (the other database source files do, as well) |
13:23 |
kahrl |
2. it needlessly introduces a lot of header dependencies |
13:24 |
kahrl |
it has the worst score (1650) in my depgraph script, in fact |
13:24 |
|
Taoki joined #minetest-dev |
13:24 |
kahrl |
score = number of files that include database.h * number of files that are included from database.h |
13:30 |
|
Zeitgeist_ joined #minetest-dev |
13:37 |
|
nyuszika7h joined #minetest-dev |
13:39 |
|
zweipktfkt joined #minetest-dev |
13:51 |
kahrl |
https://github.com/minetest/minetest/pull/917 |
13:53 |
kahrl |
huh, why does server.h include environment.h now |
13:56 |
kahrl |
obviously because of getMap, but I don't like the amount of things that pulls in |
14:08 |
kahrl |
I guess it was hopeless to try to keep environment.h out of server.h so I'll give up |
14:08 |
sfan5 |
you can merge that pull |
14:09 |
kahrl |
alright |
14:12 |
kahrl |
should --migrate be documented in minetest(server).6? |
14:14 |
sfan5 |
yes |
14:25 |
|
rubenwardy joined #minetest-dev |
14:28 |
kahrl |
sfan5: https://gist.github.com/kahrl/6510194 |
14:38 |
|
OWNSyouAll_DESKT joined #minetest-dev |
14:43 |
sfan5 |
kahrl: merge that |
14:52 |
|
Jordach joined #minetest-dev |
15:01 |
|
eeew joined #minetest-dev |
15:02 |
|
Calinou joined #minetest-dev |
15:24 |
PilzAdam |
kahrl, added is_yes() to docs |
15:27 |
|
salamanderrake joined #minetest-dev |
15:28 |
|
Miner_48er joined #minetest-dev |
15:28 |
kahrl |
PilzAdam: I just noticed another thing |
15:29 |
kahrl |
what makes sure m_filename is valid over the whole lifetime of a LuaSettings object? |
15:29 |
PilzAdam |
what would make it invalid? |
15:30 |
kahrl |
popping the string passed to LuaSettings() from the lua stack |
15:30 |
kahrl |
I think |
15:32 |
kahrl |
I'd just use std::string m_filename |
15:32 |
|
anonyme0245 joined #minetest-dev |
15:35 |
kahrl |
oh and the Settings object should be deleted in ~LuaSettings |
15:36 |
|
hmmmm joined #minetest-dev |
15:36 |
PilzAdam |
does settings=nil in Lua trigger the destructor? |
15:36 |
kahrl |
it should, maybe not immediately |
15:37 |
PilzAdam |
ok, pushed everything |
15:38 |
kahrl |
you can force the GC to run with collectgarbage("collect") |
15:40 |
kahrl |
looks good to me now |
15:42 |
PilzAdam |
great, I merge it then |
15:44 |
PilzAdam |
minetest/src/debug.h:88:0: warning: "assert" redefined [enabled by default] |
15:45 |
PilzAdam |
minetest/src/main.cpp:1260:11: error: invalid use of incomplete type 'class MapSector' |
15:45 |
PilzAdam |
^ kahrl |
15:46 |
kahrl |
first one: did that just appear now? strange... |
15:46 |
kahrl |
second one: oops... |
15:47 |
PilzAdam |
fix that first, Ill merge the settings thing later |
15:47 |
kahrl |
does it compile with #include "mapsector.h" in main.cpp? |
15:48 |
PilzAdam |
yes |
15:50 |
kahrl |
fixed the second, any idea what's up with the assert? |
15:51 |
PilzAdam |
from /home/adam/Minetest/minetest/src/database-leveldb.cpp:28: |
15:51 |
PilzAdam |
/usr/include/assert.h:89:0: note: this is the location of the previous definition |
15:51 |
|
salamanderrake joined #minetest-dev |
15:52 |
kahrl |
I guess the leveldb headers include assert.h |
15:52 |
PilzAdam |
/usr/include/leveldb/slice.h:18:0, includes it |
15:53 |
kahrl |
should we #undef assert in debug.h? |
15:53 |
PilzAdam |
Im using the leveldb package from the ubuntu repos |
15:54 |
kahrl |
ah yeah it used to be included after debug.h but I changed the order in 95e4a93b1b |
15:56 |
kahrl |
before that commit, the asserts in database-leveldb.cpp would use the system version, not our version from debug.h |
15:58 |
PilzAdam |
I guess #undef assert would be good then? |
15:58 |
kahrl |
maybe |
15:59 |
kahrl |
although wait |
15:59 |
kahrl |
even then, any assert in main.cpp uses the system version if compiled with leveldb, but the debug.h version if compiled without leveldb |
15:59 |
kahrl |
this is stupid |
16:01 |
kahrl |
should we #include <assert.h> in debug.h and then #undef assert so that it won't be included later? |
16:03 |
Exio4 |
hmm, do i need to do other thing that --migrate for making the world work with leveldb? |
16:03 |
Exio4 |
what(): Unknown map backend |
16:03 |
PilzAdam |
kahrl, dunno, if that works |
16:04 |
PilzAdam |
Exio4, --migrate leveldb |
16:04 |
Exio4 |
did that |
16:04 |
PilzAdam |
have you leveldb support compiled in? |
16:04 |
Exio4 |
yes |
16:04 |
thexyz |
has the --migrate command succeeded? |
16:05 |
Exio4 |
13:02:48: ACTION[main]: Successfully migrated 41413 blocks |
16:05 |
Exio4 |
13:02:48: ACTION[main]: world.mt updated |
16:05 |
thexyz |
when does the error happen? |
16:05 |
thexyz |
show your world.mt |
16:05 |
Exio4 |
when i try to open my singleplayer world |
16:05 |
PilzAdam |
kahrl, --migrate is in the manpage, but it doesnt even exist if USE_LEVELDB is false |
16:05 |
kahrl |
I know |
16:05 |
Exio4 |
http://dpaste.com/1373953/ |
16:06 |
kahrl |
it should be obvious that migrate won't work if you only compiled one backend in |
16:07 |
PilzAdam |
its not so obvious if --migrate says "unknown option" |
16:07 |
thexyz |
Exio4: how did you run --migrate? |
16:07 |
Exio4 |
$ ../bin/minetest --server --migrate leveldb --worldname adsdasasdsadadsdasadsadsadsdasasd |
16:07 |
Exio4 |
(yes, asda es the world name) |
16:07 |
Exio4 |
i ran out of random names |
16:08 |
thexyz |
and then the very same executable throws unknown backend error? |
16:08 |
Exio4 |
yep |
16:08 |
kahrl |
PilzAdam: so accept the option, but immediately throw an error if compiled without leveldb support? |
16:08 |
kahrl |
I'd be okay with that |
16:08 |
PilzAdam |
kahrl, or just print "unknown backend" everytime |
16:11 |
Exio4 |
i'm compiling MT using this cmake command, fwiw, " cmake .. -DENABLE_LEVELDB=1 " |
16:11 |
kahrl |
Exio4, very odd |
16:11 |
Exio4 |
and -- LevelDB backend enabled |
16:14 |
Exio4 |
without your cleanups it seems to work kahrl |
16:15 |
PilzAdam |
wait, I cant load leveldb world either with current master |
16:15 |
PilzAdam |
+s |
16:15 |
Exio4 |
kahrl: leveldb breaker!!!1 :P |
16:16 |
PilzAdam |
the missing license headers where just an excuse to silently break it :-p |
16:17 |
kahrl |
I guess you two were just using an outdated master. It's fixed now. |
16:18 |
Exio4 |
haha |
16:19 |
PilzAdam |
kahrl, so, what about the assert() thing? |
16:19 |
kahrl |
dunno |
16:21 |
kahrl |
PilzAdam: https://gist.github.com/kahrl/6511856 attempt |
16:22 |
PilzAdam |
kahrl, that seems good |
16:22 |
kahrl |
1 commit or 2 commits? |
16:22 |
PilzAdam |
1 commit if the commit message doesnt contain an "and" |
16:22 |
PilzAdam |
otherwise 2 |
16:23 |
kahrl |
heh |
16:23 |
kahrl |
what about &&? |
16:23 |
PilzAdam |
that equals and |
16:31 |
kahrl |
the 2 commit messages contained "and" so I made... 2 commits |
16:35 |
PilzAdam |
I merge the settings thing now |
16:49 |
|
rubenwardy joined #minetest-dev |
16:57 |
thexyz |
why are there so many places where "#if 0" is used? |
16:58 |
PilzAdam |
https://github.com/minetest/minetest/pull/918 |
16:58 |
PilzAdam |
this would make automatic_face_movement_dir also useable for other mobs than sapiers mobf |
17:07 |
|
Calinou joined #minetest-dev |
17:09 |
|
iqualfragile joined #minetest-dev |
17:18 |
|
neko259 joined #minetest-dev |
17:25 |
|
OWNSyouAll_DESKT joined #minetest-dev |
17:25 |
PilzAdam |
thexyz, https://github.com/PilzAdam/minetest/commit/ea986d95382be7fc0a19024261df5423781e0c8d |
17:26 |
thexyz |
std::string str(lua_tostring(L, -1)); |
17:27 |
thexyz |
also, I have very little understanding of how Lua api works/should work, so better ask somebody else to review |
17:41 |
ShadowNinja |
MAINMENU ERROR: LuaError: error running function engine.button_handler: .../builtin/modmgr.lua:512: attempt to index a nil value |
17:53 |
ShadowNinja |
PilzAdam: https://github.com/minetest/minetest/pull/919 |
17:53 |
rubenwardy |
Could have a whole forum for windows builds... |
17:57 |
ShadowNinja |
While testing it I noticed a inconsistency. luaL_checkstring(L, n) converts numbers to strings but errors on booleans. |
17:58 |
celeron55 |
does anyone else think there should be a section for community builds and compiling help? |
17:59 |
rubenwardy |
https://gist.github.com/rubenwardy/f5d1c5c2a32efde4bb91 |
17:59 |
rubenwardy |
Meh |
18:07 |
|
john_minetest left #minetest-dev |
18:14 |
ShadowNinja |
PilzAdam: ^ Comments on my pull? |
18:21 |
PilzAdam |
ShadowNinja, Im still not convinced about its usability |
18:21 |
PilzAdam |
ehm, *usefulness |
18:22 |
celeron55 |
i get an error if i try to save world configuration; is this known? |
18:23 |
PilzAdam |
celeron55, yes |
18:23 |
celeron55 |
"21:23:00: ERROR[main]: MAINMENU ERROR: LuaError: error running function engine.button_handler: /home/celeron55/softat/minetest/builtin/modmgr.lua:734: attempt to concatenate field 'backend' (a nil value)" |
18:24 |
PilzAdam |
someone needs to rewrite the world.mt reading in the mainmenu to use the Settings object in Lua |
18:25 |
kahrl |
<MinetestBot> kahrl: Sorry, I haven't seen someone around. |
18:39 |
|
Miner_48er joined #minetest-dev |
18:43 |
ShadowNinja |
PilzAdam: It makes it posible to use short, readable ifs with config settings without annother function and allows you to store all of the defaults in one file. And the feature is already there, let mods use it. |
18:52 |
|
proller joined #minetest-dev |
18:59 |
kahrl |
should --migrate imply --server? |
19:00 |
Exio4 |
yes |
19:00 |
* ShadowNinja |
agrees |
19:00 |
PilzAdam |
yes |
19:01 |
celeron55 |
what about making it quit after migrating if not --server? i guess code would get too convoluted |
19:02 |
kahrl |
it always quits anyway now |
19:02 |
celeron55 |
oh well, that doesn't matter then |
19:03 |
celeron55 |
but then --migrate shouldn't need to imply server or client, it should be simply a migrate |
19:03 |
ShadowNinja |
Also: I consider it a bug that mods are loaded before the migration. |
19:04 |
kahrl |
https://gist.github.com/kahrl/6514030 |
19:04 |
kahrl |
ShadowNinja: tough to fix because mods are loaded in the Server constructor |
19:04 |
celeron55 |
ShadowNinja: well the mods are loaded if the server is loaded, so that is same as my comment |
19:05 |
celeron55 |
and the mods should always be loaded if server is loaded |
19:05 |
celeron55 |
there's no changing that |
19:05 |
ShadowNinja |
Only the map and related things should really be loaded. |
19:05 |
celeron55 |
migrating probably doesn't require much code at all; not even 5% of the server |
19:12 |
PilzAdam |
https://github.com/PilzAdam/minetest/commit/d7dea81a3228f59db051fe542c6a5a3827ecdd2a |
19:13 |
PilzAdam |
^ usage of Settings() to read world.mt |
19:13 |
PilzAdam |
it only modifies settings that start with "load_mod_" |
19:16 |
kahrl |
https://github.com/PilzAdam/minetest/commit/d7dea81a3228f59db051fe542c6a5a3827ecdd2a#L0R510 the field worldconfig.backend shouldn't be needed anymore |
19:18 |
PilzAdam |
anything else? |
19:19 |
ShadowNinja |
PilzAdam: The load_mod_* method is ugly. |
19:20 |
PilzAdam |
ShadowNinja, its the only way to keep track of what settings are mods |
19:20 |
kahrl |
https://github.com/PilzAdam/minetest/commit/d7dea81a3228f59db051fe542c6a5a3827ecdd2a#L0R893 I guess you can do element.enabled = engine.is_yes(value) |
19:20 |
ShadowNinja |
PilzAdam: mods = mod1, mod2, mod3...? |
19:21 |
kahrl |
rest looks good |
19:21 |
PilzAdam |
ShadowNinja, thats agains the whole structure of Settings |
19:21 |
PilzAdam |
+t |
19:21 |
ShadowNinja |
PilzAdam: How so? Just get the string and split it along ", ". |
19:21 |
PilzAdam |
also its harder to set mods to true in an texteditor |
19:22 |
ShadowNinja |
Just add the modname to the line. |
19:22 |
PilzAdam |
people might not know all the modnames |
19:22 |
ShadowNinja |
Well if you are manually editing world.mt you should know that... |
19:22 |
PilzAdam |
> should |
19:22 |
kahrl |
we'd have to have code to parse both versions... not worth it imo |
19:24 |
celeron55 |
clearly not worth it |
19:25 |
ShadowNinja |
You would ignore other settings and set mods to all mods. Although you could convert the settings temporarily. |
19:26 |
PilzAdam |
kahrl, fixed everything: https://github.com/PilzAdam/minetest/commit/93162de2d334de4a40e99d7cfdce808f410b9449 |
19:26 |
PilzAdam |
also: https://github.com/PilzAdam/minetest/commit/2035344db3eb33cafc7c982da8c0c7a58662e7df |
19:28 |
|
sapier1 joined #minetest-dev |
19:28 |
PilzAdam |
sapier1, can you look at http://irc.minetest.ru/minetest-dev/2013-09-10#i_3312134 ? |
19:29 |
ShadowNinja |
PilzAdam: Just use engine.setting_set(key, str) not engine.setting_set(key, is_yes(str)) Which is converted to a string internally. |
19:29 |
sapier1 |
#918 is fixing wrong issue just because pilzadam doesn't want to admit he was wrong |
19:29 |
ShadowNinja |
s/setting_set/setting_setbool/ |
19:29 |
ShadowNinja |
(Second time) |
19:30 |
PilzAdam |
ShadowNinja, you are right |
19:31 |
PilzAdam |
I just replaced all tobool() calls |
19:32 |
sapier1 |
but I assume that's not what you meant pa is it? |
19:33 |
kahrl |
https://github.com/PilzAdam/minetest/commit/744f81c099c4bd9ba88bb53b77f9c0b1e7b99a5d#L2R228 I think you can remove the pushvalue call below this |
19:36 |
PilzAdam |
ShadowNinja, fixed |
19:36 |
sapier1 |
don't remove mods that arent present atm |
19:37 |
PilzAdam |
sapier1, why? |
19:37 |
sapier1 |
because it wasn't that way before and both options could be false |
19:37 |
PilzAdam |
only mods that actually exist should be there, so people can only enable mods that they have installed |
19:38 |
sapier1 |
but you actually implement a autodelete |
19:38 |
PilzAdam |
kahrl, indeed |
19:39 |
sapier1 |
if someone deleted a mod without realizing he used it in some world he'll have to find out which mod this was and add it back ... no way to find out this in gui while it was possible before |
19:40 |
PilzAdam |
sapier1, previously missing mods were deleted too |
19:40 |
sapier1 |
define "previously" |
19:40 |
PilzAdam |
before the switch to Settings() |
19:41 |
sapier1 |
I'll have a look but I don't think so only disabled mods have been deleted |
19:41 |
PilzAdam |
all known (== installed) mods are written, every unknwon mods are removed |
19:42 |
sapier1 |
are you absolutely sure this is non settings behaviour too |
19:42 |
sapier1 |
? |
19:42 |
kahrl |
the previous code simply loops through filterlist.get_raw_list(modmgr.modlist) |
19:42 |
kahrl |
which is the list of installed mods |
19:47 |
sapier1 |
no it isn't |
19:48 |
sapier1 |
the filterlist contains all mod specified in world file as well as all installed mods |
19:48 |
sapier1 |
at least it was meant that way |
19:49 |
sapier1 |
but isn't ... ok so settings is identical good |
19:51 |
PilzAdam |
so is anything else wrong in the 3 commits: https://github.com/PilzAdam/minetest/commits/master ? |
19:51 |
celeron55 |
i propose that it is changed to preserve every setting in there |
19:51 |
kahrl |
they conflict with my formspec_table ;) |
19:51 |
kahrl |
but I'll deal with it |
19:52 |
celeron55 |
but... oh well, it's not that important |
19:53 |
PilzAdam |
well, code-wise its actually easier to not remove unknown mods |
19:53 |
kahrl |
I think it might cause surprises which is not good |
19:54 |
kahrl |
let's say you configure a world and disable all mods, save that |
19:54 |
kahrl |
now you install some mods and suddenly they are enabled in the world? |
19:54 |
sapier1 |
why should they be enabled? |
19:54 |
kahrl |
because they were enabled once in world.mt |
19:54 |
PilzAdam |
also: the unknown mods are only removed if you hit "Save" in the GUI, not when you load a world |
19:55 |
PilzAdam |
while new mods are always written with default to false into it |
19:55 |
celeron55 |
PilzAdam: hmm, actually that's an important point |
19:55 |
celeron55 |
it makes it make sense as-is |
19:55 |
sapier1 |
it's just a matter of personal preference both ways have good reasons for and against |
19:56 |
PilzAdam |
what sapier1 said, is right |
19:57 |
PilzAdam |
so I think its best to not change the behaviour (i.e. remove unknown mods when hitting save) |
19:58 |
PilzAdam |
(someone has to say "yes, merge these 3 commits now" now) |
19:59 |
kahrl |
yes, merge these 3 commits now |
19:59 |
kahrl |
copy-pasta ftw! |
19:59 |
celeron55 |
something that came to mind: someone should test setting up dedicated servers and fix or file issues about things that don't work well there; we've been focusing on the UI/client quite a lot but not really anything else since a long time ago |
20:00 |
sapier1 |
hmm I assume there might be some issues left introduced by removal of old mainmenu |
20:00 |
celeron55 |
all these per-world settings and mod handling stuff might have made things wonky someplace |
20:01 |
celeron55 |
the answer to the unasked question "do we care" is "yes" |
20:02 |
sapier1 |
that's not a question as far as I know our most holy rule is "did it work before it has to work now" no matter how silly behaviour has been before ;-) |
20:06 |
kahrl |
should I commit https://gist.github.com/kahrl/6514030? |
20:06 |
|
sapier joined #minetest-dev |
20:06 |
sapier |
dedicated server settings aren't even silly things of course |
20:09 |
PilzAdam |
kahrl, what about loading mods? |
20:09 |
|
Jordach joined #minetest-dev |
20:10 |
kahrl |
I don't see a good way of fixing that |
20:13 |
kahrl |
we can't make a ServerMap directly because it requires an IGameDef and some kind of emerge manager |
20:16 |
sapier |
https://github.com/minetest/minetest/pull/912 any comments on this one? |
20:17 |
kahrl |
added a comment about run_dedicated_server, updated gist |
20:18 |
PilzAdam |
sapier, re #918: let me quote the description: "This is especially needed for upright_sprite, since without an offset it always moves "sideways"." |
20:18 |
sapier |
just rotate that damn upright_sprite model |
20:18 |
sapier |
it's a compile time fix not a once per entity step fix |
20:19 |
PilzAdam |
no, some mobs want to move sideways |
20:19 |
sapier |
then rotate that model |
20:19 |
PilzAdam |
there is not the single right solution |
20:20 |
sapier |
so we add a lot of calculation just to support a new feature for 2d mobs to allow front as well as side 2d mobs? which haven't been supported before too? |
20:21 |
PilzAdam |
sapier, btw, I still dont believe that this simple addition is that bad |
20:21 |
PilzAdam |
feel free to proove it |
20:21 |
sapier |
it's not "that bad" it's just not in balance with cost ... yo don't buy a house if you just need a mailbox |
20:23 |
sapier |
you're adding load to almost 50% of cases (assuming a mob is moving only 50% of time) to fix a <1% issue |
20:25 |
sapier |
if you really need different upright sprites you could define an additional drawtype too |
20:26 |
kahrl |
I'd be a lot more concerned about those repeated getParent() calls |
20:26 |
PilzAdam |
sapier, what if a mob would look at the side while moving? the offset might change at runtime (heh "run" time :D) |
20:27 |
kahrl |
it sounds like a object field lookup but is actually a loop over all attached objects in the whole server |
20:27 |
sapier |
if you made this setting runtime switchable it made sense but you havent |
20:27 |
sapier |
are you serious kahrl? |
20:30 |
sapier |
btw I guess if you want something to look sideways you'd use bone system (at least for models)... but I don't have any idea how to do that |
20:30 |
ShadowNinja |
ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: error: C++ exception 1) This isn't very helpfull 2) Does this really have to print the string "error" (With or wihout caps) five times? |
20:31 |
sapier |
wow why do we loop through all entitiys to find a parent? |
20:31 |
PilzAdam |
sapier, s/we/taoki |
20:31 |
sapier |
compared to this even pa's patch is minor |
20:32 |
kahrl |
apparently the method use before that caused tons of segfaults |
20:32 |
sapier |
I still believe your reason isn't upright sprite but your rotated mobs for simplemobs ;-P |
20:32 |
kahrl |
used* |
20:33 |
sapier |
most likely due to inconsistent parent handling |
20:33 |
PilzAdam |
sapier, ehm... all object properties are changeable at runtime |
20:33 |
ShadowNinja |
Can upright_sprite simply be rotated? |
20:33 |
PilzAdam |
kahrl, I guess because it wasnt initialized with NULL |
20:33 |
sapier |
you can change a object property after entity creation? |
20:34 |
PilzAdam |
there were shitton of other bugs with exactly the same cause |
20:34 |
PilzAdam |
sapier, of course, obj:set_properties() |
20:34 |
sapier |
so I could replace a objects model at runtime? |
20:34 |
PilzAdam |
yes |
20:34 |
PilzAdam |
(simplemobs does this to shear sheeps) |
20:34 |
sapier |
could someone plz document that feature! |
20:35 |
PilzAdam |
sapier, https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L1571 |
20:35 |
PilzAdam |
wow, you get really smooth curves with automatic_face_movement_dir |
20:35 |
sapier |
I know |
20:35 |
sapier |
that's why I added it |
20:36 |
sapier |
almost half a year ago |
20:36 |
PilzAdam |
I mean by setting the offset to 275 and changing the velocity based on yaw |
20:36 |
PilzAdam |
offset would be 5 for your models then |
20:37 |
sapier |
? |
20:37 |
sapier |
no idea what you're talking about |
20:37 |
PilzAdam |
just an example how useful the offset is |
20:38 |
sapier |
I still don't get any use of it |
20:38 |
sapier |
of course if it's runtime changeable at least you could make mobs walk sideways temporary ... ok a small usecase |
20:39 |
PilzAdam |
if you change the offset so that the mob does not look at the direction moves, and then change the velocity to the new direction, then you get a perfect circle |
20:39 |
sapier |
I already get perfect cycles |
20:40 |
kahrl |
can you make a mob circlestrafe the player? |
20:40 |
sapier |
at least as good as pa ;-) |
20:41 |
sapier |
it won't work in lag scenarios but velocity based movement won't work in that cases too |
20:43 |
PilzAdam |
sapier, so you are still against the offset? |
20:43 |
sapier |
- set_properties(object property table) what is included within object property table? the object iself too? |
20:43 |
PilzAdam |
this: https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L1859 |
20:44 |
PilzAdam |
but only the given fields are overwritten, the rest stays as it is |
20:44 |
sapier |
interesting I thought those values are read only |
20:44 |
PilzAdam |
hm? |
20:45 |
ShadowNinja |
PilzAdam: Um, the treedef? |
20:45 |
sapier |
obviously I was wrong |
20:45 |
ShadowNinja |
Check that link. |
20:45 |
PilzAdam |
they are read in Lua and overwrite the properties in c++ |
20:45 |
PilzAdam |
woops |
20:45 |
PilzAdam |
line 1873 |
20:46 |
PilzAdam |
(haven refreshed since Settings() was added) |
20:46 |
PilzAdam |
+t |
20:47 |
sapier |
I still think you're doing this from wrong reason but as it's changeable at runtime at least the effect is positive |
20:49 |
PilzAdam |
https://github.com/minetest/minetest/pull/912 <- works, can be merged |
20:52 |
kahrl |
merged |
20:52 |
ShadowNinja |
Does anyone else have any comments about this? https://github.com/minetest/minetest/pull/919 kahrl, sapier? |
20:53 |
sapier |
whats the usecase for this? |
20:53 |
ShadowNinja |
sapier: Mods providing default values for their config files. |
20:54 |
sapier |
but they could just set them? |
20:54 |
PilzAdam |
sapier, basically the same as: value = settings:get("key") or "default) |
20:54 |
PilzAdam |
*" |
20:54 |
ShadowNinja |
sapier: No, you can't create a settings object without loading a file. |
20:54 |
ShadowNinja |
PilzAdam: With the exception of get_bool. |
20:54 |
sapier |
and right after opening that file you could set your defaults |
20:55 |
PilzAdam |
sapier, you would override the file |
20:55 |
sapier |
not if you do a get first and check for nil |
20:55 |
ShadowNinja |
sapier: You would have to loop through it and set any that aren't set, which is far more code than needed. |
20:55 |
PilzAdam |
so basically what I said |
20:56 |
sapier |
if settings:get("name") == nil then settings:set("name","default") end |
20:57 |
sapier |
you have to set the default value each time too |
20:57 |
PilzAdam |
kahrl, what do you think about #918 (face movement dir)? |
20:57 |
sapier |
ohh you want to provide a table ... hmm |
20:57 |
kahrl |
PilzAdam, I think it makes sense |
20:57 |
sapier |
I don't really se the big benefit in her but it doesn't harm either |
20:57 |
kahrl |
haven't looked at the code really though |
20:58 |
sapier |
linked to 918 we schould create a issue replacing that insane getparent thing |
20:58 |
sapier |
-c |
20:58 |
PilzAdam |
yes |
20:59 |
ShadowNinja |
kahrl: Any comments on #919? |
21:00 |
kahrl |
sapier: well as a first fix getParent() should only be called once in step() |
21:00 |
kahrl |
ShadowNinja: dunno, I'm undecided |
21:01 |
kahrl |
ShadowNinja: do you have example code that would be much simpler with set_defaults? |
21:01 |
PilzAdam |
hmm, with #918 it crashes if you write "automatic_face_movement_dir = true," |
21:01 |
PilzAdam |
sapier, is that a problem for you? |
21:01 |
sapier |
what are you talking about pa? |
21:01 |
sapier |
the crash |
21:01 |
PilzAdam |
automatic_face_movement_dir = true crashes with my changes, because it expects a number now |
21:02 |
sapier |
hmm I guess I need to do a quick rerelease for mobf |
21:02 |
sapier |
but not a big issue I can blame you ;-P |
21:02 |
PilzAdam |
so it would be ok? |
21:02 |
sapier |
it's not stable right now so I expected things like that when releasing last mobf version |
21:03 |
ShadowNinja |
kahrl: http://ix.io/7XC |
21:03 |
sapier |
I'm more concerned about kahrls table fixes ;-) that'd be way more work to fix |
21:04 |
kahrl |
table fixes? |
21:04 |
PilzAdam |
kahrl, you were ok with #918, right? |
21:04 |
kahrl |
PilzAdam: didn't look at the code |
21:04 |
sapier |
hmm maybe it was thexyz :-) |
21:05 |
kahrl |
well I'm making a table element for formspec, do you mean that? |
21:05 |
ShadowNinja |
kahrl: Without set_defaults: http://ix.io/7XD |
21:06 |
sapier |
yes that one ;-) |
21:06 |
ShadowNinja |
You could also do it with to_table. |
21:06 |
sapier |
you said it'd be compatible to textlist ;-) |
21:07 |
kahrl |
I didn't :P |
21:07 |
ShadowNinja |
And add pairs() to that. |
21:07 |
sapier |
that's what I'm concerned about ;-P |
21:07 |
kahrl |
but I could make it pretty much completely compatible |
21:07 |
kahrl |
right now it's not parsing colors |
21:07 |
sapier |
the good thing is it's you breaking main menu so at least that things have to be fixed by you ;-) |
21:07 |
kahrl |
the rest is the same |
21:08 |
kahrl |
eh, and it has a border when set to transparent, I'll change that |
21:08 |
|
jojoa1997 joined #minetest-dev |
21:08 |
sapier |
that's been a glitch in textlist too ... the line at the right |
21:09 |
kahrl |
at least I can now fix it without irrlicht black magic |
21:09 |
PilzAdam |
sapier, have you looked at the code of #918? |
21:09 |
ShadowNinja |
hmmmm, RealBadAngel: Any comments on #919? |
21:10 |
kahrl |
ShadowNinja: the code with the loop doesn't seem too bad |
21:10 |
sapier |
why do we need a bool value and a offset ? |
21:11 |
PilzAdam |
sapier, how would you make it with one variable? |
21:12 |
sapier |
because we can't encode no rotation in an offset value without doing some tricks |
21:12 |
sapier |
<0 --> disabled |
21:12 |
sapier |
could be a trick to do it |
21:12 |
PilzAdam |
who says that mods wont pass <0 values? |
21:12 |
kahrl |
I'm a bit against exposing the setDefault method to lua, as we'll to continue supporting it |
21:12 |
kahrl |
we'll have* |
21:13 |
kahrl |
I have this idea in mind (won't be doing it any soon though) of rewriting the settings and defaultsettings code |
21:13 |
sapier |
no one says but they can do anything they want to do by using values >0 |
21:13 |
kahrl |
so that each setting is only parsed once into its binary format, not every time it is needed |
21:14 |
sapier |
so if you'd limit value range from 0->2pi this would be enough ... but maybe that isn't as speaking as two values |
21:14 |
PilzAdam |
sapier, this would break compatibility between old dev and new dev build pretty bad |
21:14 |
PilzAdam |
I know we could do it, but in this case its really not needed |
21:14 |
sapier |
you told me it's already crashing isn't it? |
21:15 |
PilzAdam |
its crashing server side when passing a boolean |
21:15 |
sapier |
I don't think many ppl used this feature by now so >if< we wan't to change it we have to do it now or never |
21:16 |
PilzAdam |
ok, Ill change it |
21:16 |
sapier |
wait |
21:17 |
PilzAdam |
would % 360 keep the floating digits? |
21:17 |
sapier |
I think so but I don't know where you wanna use this? |
21:17 |
PilzAdam |
when reading it from Lua |
21:18 |
PilzAdam |
Ill set the default to -1, when reading from Lua Ill do %360 to make sure that mods wont set it to something < 0 |
21:18 |
sapier |
even if it didn't 1° of is hardly noticable |
21:19 |
kahrl |
in C++? use fmod to keep the fractional part |
21:19 |
kahrl |
but the result has the same sign as the first argument |
21:19 |
sapier |
yes but if you use < 0 to disable mods have to be able to set it to -1 |
21:20 |
sapier |
if you don't do it that way I don't se a use for limiting the range |
21:20 |
PilzAdam |
indeed |
21:21 |
sapier |
but I have to go to bed the two variables instead of one are a minor issue if you don't think it'd be worth it don't change it |
21:22 |
sapier |
everything else seems to be fine |
21:22 |
PilzAdam |
ok, Ill leave it with 2 variables then |
21:22 |
PilzAdam |
the code is more clear then |
21:23 |
|
sapier left #minetest-dev |
21:23 |
PilzAdam |
I guess I can merge it then with kahrl agreeing to the idea and sapier agreeing to the code? |
21:24 |
kahrl |
let me have a quick look |
21:25 |
kahrl |
read_object_properties seems a little weird |
21:26 |
kahrl |
can you still disable automatic_face_movement_dir with object:set_properties? |
21:26 |
PilzAdam |
oh |
21:27 |
|
OWNSyouAll_DESKT joined #minetest-dev |
21:30 |
PilzAdam |
https://github.com/PilzAdam/minetest/commit/3b85aa14e2b3c9f3717c7e65360ebc971a7b22af |
21:31 |
PilzAdam |
now its even compatible with current mobf |
21:31 |
kahrl |
neat |
21:32 |
PilzAdam |
https://github.com/PilzAdam/minetest/commit/4feea0ac6845ea025e8784f63f48e567d1d24c22 added to lua-api.txt |
21:32 |
kahrl |
looks good to merge now |
21:36 |
PilzAdam |
https://github.com/minetest/minetest/pull/916 this seems good to me |
21:36 |
PilzAdam |
its not really a bug but IMO it looks better |
21:37 |
kahrl |
are any hud mods broken by the change? |
21:38 |
PilzAdam |
I dont think so, BlockMen made one and I guess he wouldnt break his own mods |
21:38 |
kahrl |
let's merge it then |
21:41 |
PilzAdam |
and we are under 70 pull requests again :-) |
21:46 |
PilzAdam |
whats up with all the doxygen there: https://github.com/minetest/minetest/pull/905/files#L6R87 ß |
21:46 |
PilzAdam |
*? |
21:47 |
proller |
https://github.com/minetest/minetest/pull/897 - small and good ;) |
21:48 |
kahrl |
PilzAdam: to make it fit the code style of guiEngine.h |
21:50 |
PilzAdam |
https://github.com/minetest/minetest/pull/905/files#L5R74 is that normal with Irrlicht? |
21:51 |
kahrl |
not sure if there's a better way |
21:51 |
kahrl |
but there is no removeTexture(string) method |
21:53 |
PilzAdam |
"Texture names must now be escaped in formspec elements image[], background[], image_button[], image_button_exit[]. The patch contains required changes in builtin." so every single mod that uses one of these elements must be changed? |
21:53 |
kahrl |
if they used names that need escaping |
21:53 |
kahrl |
it's mostly relevant in the main menu |
21:54 |
kahrl |
(because the main menu uses absolute paths, but mods use just the basename) |
21:54 |
PilzAdam |
so its not needed to call formspec_escape() for e.g. the furnace? |
21:56 |
kahrl |
I don't think so |
21:56 |
kahrl |
it uses a [ in the texture name but it shouldn't need escaping |
21:58 |
kahrl |
basically everything that worked before should continue to work, but it now supports names that weren't possible before through escaping |
21:58 |
kahrl |
the sole exception being names that contain backslashes as they're used for escaping <-- relevant in the main menu on windows |
22:04 |
PilzAdam |
it works fine in Linux and in wine |
22:04 |
PilzAdam |
and wine uses backslashes for filenames too |
22:05 |
kahrl |
good |
22:05 |
PilzAdam |
I think its good to merge then |
22:06 |
kahrl |
I'll do it |
22:09 |
|
Miner_48er joined #minetest-dev |
22:33 |
|
BlockMen joined #minetest-dev |
22:36 |
|
darkrose joined #minetest-dev |
22:36 |
|
darkrose joined #minetest-dev |
23:03 |
|
tango_ joined #minetest-dev |
23:04 |
|
AWTom joined #minetest-dev |
23:28 |
|
Prestotron562 joined #minetest-dev |
23:44 |
|
Miner_48er joined #minetest-dev |
23:51 |
|
darkrose joined #minetest-dev |