Time |
Nick |
Message |
00:31 |
|
adfeno left #minetest-dev |
03:16 |
|
absurb joined #minetest-dev |
05:00 |
|
MTDiscord joined #minetest-dev |
05:44 |
|
Edgy1 joined #minetest-dev |
06:51 |
|
YuGiOhJCJ joined #minetest-dev |
07:15 |
|
calcul0n joined #minetest-dev |
08:00 |
|
ShadowNinja joined #minetest-dev |
08:24 |
|
mizux joined #minetest-dev |
08:54 |
|
T4im joined #minetest-dev |
09:35 |
|
T4im joined #minetest-dev |
09:36 |
|
T4im joined #minetest-dev |
09:39 |
|
T4im joined #minetest-dev |
10:11 |
|
NetherEran joined #minetest-dev |
11:24 |
|
Fixer joined #minetest-dev |
11:35 |
|
Fractalis joined #minetest-dev |
12:00 |
|
troller joined #minetest-dev |
13:41 |
|
adfeno joined #minetest-dev |
13:41 |
adfeno |
Hi there :) |
13:49 |
|
lisac joined #minetest-dev |
16:07 |
|
Fractalis joined #minetest-dev |
16:45 |
|
Taoki joined #minetest-dev |
17:07 |
|
Fractalis joined #minetest-dev |
17:16 |
|
specing joined #minetest-dev |
17:17 |
specing |
Why does localplayer:get_wield_index return a 0-indexed number? Wouldn't it make more sense to make CSM developer lives easier by making the number be 1-index? |
17:21 |
sfan5 |
probably |
17:21 |
MTDiscord |
<Lone_Wolf> C++ programmer was involved in that probably |
17:23 |
specing |
I wonder if I should change it to return 1-indexed or add a get_hotbar_index instead |
17:23 |
specing |
probably the latter. |
17:23 |
MTDiscord |
<exe_virus> Honestly I didn't know that I even could start lua tables at one until I saw it. Now I cannot wait to start using it everywhere. Starting at zero is so important for writing performant code with loops, because otherwise you end up having to subtract one a bunch of times |
17:24 |
specing |
In the language that I otherwise use, you can start and end arrays at any index you want |
17:25 |
specing |
it's most performant if you can tell the compiler what you mean and let it do the optimisation |
17:28 |
MTDiscord |
<Lone_Wolf> In what case would you have to subtract by 1? |
17:28 |
MTDiscord |
<Lone_Wolf> Guess this might be better in #programming or somewhere similar though |
17:31 |
specing |
Hmm? In my CSM I switch hotbar indices, e.g. to auto-eat |
17:49 |
|
adfeno joined #minetest-dev |
18:48 |
|
absurb joined #minetest-dev |
20:52 |
|
indiana joined #minetest-dev |
20:58 |
|
Andrey01 joined #minetest-dev |
22:05 |
|
Fractalis joined #minetest-dev |
22:51 |
|
Fractalis joined #minetest-dev |