aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods/give_initial_stuff/mod.conf
diff options
context:
space:
mode:
authorJean-Patrick Guerrero <jeanpatrick.guerrero@gmail.com>2021-01-01 17:03:34 +0100
committersfan5 <sfan5@live.de>2021-01-01 17:03:34 +0100
commitff921f6989cc6e8e0be6bf9ac196e90331bb3eb4 (patch)
tree53e69ea7d08cbb86efffe5ec35ae062b98ee174b /games/devtest/mods/give_initial_stuff/mod.conf
parent9250b5205a6c627dfa18b7870b454d74f8d9dae6 (diff)
downloadminetest-ff921f6989cc6e8e0be6bf9ac196e90331bb3eb4.tar.gz
minetest-ff921f6989cc6e8e0be6bf9ac196e90331bb3eb4.tar.bz2
minetest-ff921f6989cc6e8e0be6bf9ac196e90331bb3eb4.zip
Formspecs: Fix broken texture escaping with model[]
Diffstat (limited to 'games/devtest/mods/give_initial_stuff/mod.conf')
0 files changed, 0 insertions, 0 deletions
span>f) t -= ((int)(t) / 24000) * 24000.0f; if (t > 12000.0f) t = 24000.0f - t; const float values[9][2] = { {4250.0f + 125.0f, 175.0f}, {4500.0f + 125.0f, 175.0f}, {4750.0f + 125.0f, 250.0f}, {5000.0f + 125.0f, 350.0f}, {5250.0f + 125.0f, 500.0f}, {5500.0f + 125.0f, 675.0f}, {5750.0f + 125.0f, 875.0f}, {6000.0f + 125.0f, 1000.0f}, {6250.0f + 125.0f, 1000.0f}, }; if (!smooth) { float lastt = values[0][0]; for (u32 i = 1; i < 9; i++) { float t0 = values[i][0]; float switch_t = (t0 + lastt) / 2.0f; lastt = t0; if (switch_t <= t) continue; return values[i][1]; } return 1000; } if (t <= 4625.0f) // 4500 + 125 return values[0][1]; else if (t >= 6125.0f) // 6000 + 125 return 1000; for (u32 i = 0; i < 9; i++) { if (values[i][0] <= t) continue; float td0 = values[i][0] - values[i - 1][0]; float f = (t - values[i - 1][0]) / td0; return f * values[i][1] + (1.0f - f) * values[i - 1][1]; } return 1000; }