Commit Graph

5399 Commits

Author SHA1 Message Date
Tamás Bálint Misius
b2ddb39b42
Add IDENT to user agent again
The server got fixed.
2022-03-26 18:35:23 +01:00
Tamás Bálint Misius
01e2c2d3f0
Remove new IDENT portion from user agent string
The server isn't prepared for it and fails requests that fiddle with the user session with an 500.
2022-03-26 17:43:48 +01:00
Tamás Bálint Misius
76b89f8da1
Handle SDL_CreateWindow failure slightly better
Might explain weird breakage we experience on chromebooks. Difficult to say as we don't have access to chromebooks.
2022-03-26 17:43:43 +01:00
jacob1
14348437a6
Fix TRON being unable to pathfind to the top and left edges of the screen 2022-03-18 18:13:01 -04:00
Tamás Bálint Misius
6ff385d92d
Fix crash when trying to render an empty stamp
Empty stamps are those whose block width or height is 0. While they are technically valid and certain parts of the game are prepared to handle them, others aren't, so it's safest to just adjust the definition of valid stamps to exclude empty ones.
2022-03-16 06:45:24 +01:00
Andre LaBranche
827bb568de
Fixes: ld: warning: -no_pie ignored for arm64 (#829)
Fixes: ld: warning: -no_pie ignored for arm64
2022-02-26 13:40:01 +01:00
Tamás Bálint Misius
df7bbd3b8e
Prevent SaveRenderer from calling into Lua
Also clear SaveRenderer graphics cache along with the main Renderer's when needed, and revert to built-in element callbacks rather than nothing at all when assigning nil to a callback slot in Lua.
2022-02-23 22:22:10 +01:00
Tamás Bálint Misius
bfe94618c6
Include slightly more future-proof target type in user agent string 2022-02-22 08:10:18 +01:00
Tamás Bálint Misius
1e440d078c
IDENT_PLATFORM can now be MACOSARM 2022-02-22 06:56:41 +01:00
jacob1
477909d00f
Redo code that makes SOAP float on OIL
Rather than hacking velocity, do it directly through can_move. Add a special case to make it slowly float upwards, rather than immediate like most weight differences in TPT.
2022-02-21 23:56:52 -05:00
jacob1
982fdff528
Add safeguard to try_move to ensure we don't write to out of bounds pmap
This is a follow up to this crash fix - 0ed8d0a0be
This may possibly fix other crashes users occasionally experience, especially in the case of high velocity particles with loop edge mode on. Even so, there are other bugs at play, as a crash here can't be triggered if pmap is in a correct state
2022-02-21 23:36:10 -05:00
Tamás Bálint Misius
656ace10c6
Add support for MacOS on ARM
Also build with real -no-pie on ghactions, and fix SDL include directories (it's probably blind luck that they worked correctly on most systems).
2022-02-18 18:56:41 +01:00
Tamás Bálint Misius
6ef505ccca
Fix crash on exit if a Lua component is added to a Lua window
Very similar in nature to the problem fixed by 0fcad65d. Again, it'd be massive help if we didn't destroy the Lua state explicitly in LSI's dtor. But this is not worth refactoring LSI for.
2022-02-11 22:19:42 +01:00
Tamás Bálint Misius
7ab720d847
Fix pipe mirroring (fixes #750 again) 2022-02-04 09:07:02 +01:00
Tamás Bálint Misius
0fcad65d6f
Fix crash on exit if any modern particle callback is registered
All these smart pointers have to be cleared before the Lua state is closed. Ordinarily, we'd have a smart pointer to the Lua state defined earlier in LSI than these smart pointers, which would take care of destruction in the correct order, but tfw technical debt.
2022-01-28 08:03:14 +01:00
Tamás Bálint Misius
622161e563
Fix ToArray duplicating the last byte of its input
Apparently, you have to read() before you check status bits. Who woulda thunk.

This never manifested because all the files we ever embedded this way ended in a newline. I needed a report from someone who uses a text editor that doesn't ensure this.
2022-01-15 15:47:20 +01:00
Nova
f5bc2a5f0d
Fix crash on network activity (#824)
Ignoring broken pipes led to libcurl crashing when connections were dropped, rather than re-attempting. Now, libcurl is not set to ignore broken pipes. Closes #823.
2022-01-07 15:15:09 +01:00
jacob1
eadd381da9
Fix incorrect RNG call in WARP, code cleanup
x velocity was set using .chance instead of .between. This always returned false, meaning vx always was set to .5 giving a rightward bias
2022-01-06 20:29:07 -05:00
Tamás Bálint Misius
95a9e93645
Fix pressure-sensitive particles breaking on load, again
Repurposing the comment I added because I'm lazy: pavg[1] used to be saved as a u16, which PressureInTmp3 elements then treated as an i16. tmp3 is now saved as a u32, or as a u16 if it's small enough. PressureInTmp3 elements will never use the upper 16 bits, and should still treat the lower 16 bits as an i16, so they need sign extension.

The code that was originally responsible for this somehow got lost in the tmp3/tmp4 migration.
2021-12-25 09:44:09 +01:00
Tamás Bálint Misius
286d0d60b9
Fix mingw-on-linux builds 2021-12-24 22:47:57 +01:00
Tamás Bálint Misius
84d6ca6938
Fix -Dhttp=false builds 2021-12-13 15:23:33 +01:00
xphere07
674134588c
Upgrade to C++17 (#819) 2021-12-13 14:41:02 +01:00
Tamás Bálint Misius
ce84e60074
Fix a few warnings
I found these looking at ghactions output.
2021-12-09 09:11:47 +01:00
Tamás Bálint Misius
c0e3818df3
Save higher halves of tmp3 and tmp4 if needed (fixes #822 with dbd971fb) 2021-12-09 08:40:27 +01:00
Tamás Bálint Misius
dbd971fb05
Convert float pavg[2] to int tmp3, tmp4
Also add GameSave::PressureInTmp3 to check for elements with pressure memory and fix TUNG not sampling pressure on creation. This does not in itself fix #822 because tmp3 and tmp4 are still saved in 16 bits each, so full ctypes still don't fit in tmp3.
2021-12-09 07:49:31 +01:00
Tamás Bálint Misius
504fd21909
Ignore ignore/
How has this not been done on master yet? >_> Accidentally committed a valgrind suppression file because of this last commit.
2021-12-08 14:33:28 +01:00
Tamás Bálint Misius
9f75f7e5fc
Port to_array.py to C++
This gets rid of a dependency on Python in $PATH (although Python is likely installed if we're using Meson). Nix people will like this a lot.
2021-12-07 17:20:17 +01:00
Tamás Bálint Misius
b587732d7b
Fix render failing to compile with GCC 11
Due to Client::SetPref not being available for use by AddCustomGol. GCC 7 didn't mind this, weird.
2021-12-07 16:44:48 +01:00
jacob1
c25e35e9ff
Read float bson settings as floats, not ints 2021-11-20 23:56:47 -05:00
Tamás Bálint Misius
cb7665b631
Fix starcatcher-release step (see 8c80dca9) 2021-11-17 20:38:16 +01:00
Tamás Bálint Misius
51b8b0bf38
Fix linker -no-pie flag *again* (broken by b5d17121) 2021-11-13 06:37:54 +01:00
Tamás Bálint Misius
8c80dca91b
Print starcatcher release response to console if it fails
I guess we'll see at the next release whether I did this correctly.
2021-11-08 15:32:05 +01:00
jacob1
858ba7cc93
TPT is no longer compiled using scones. 2021-10-28 22:58:37 -04:00
Tamás Bálint Misius
f07879d165
Fix potential crash when adding a custom GOL type
GOLWindow would try to access a GOLTool that would have been deleted earlier when the menus were rebuilt.
2021-10-27 21:20:58 +02:00
Tamás Bálint Misius
0f2eedd4fb
Make thread_local replacement for MinGW slightly nicer 2021-10-23 10:08:26 +02:00
jacob1
0ed8d0a0be
Fix flood_water movement cancel check
This fixes a crash with water equalization on, with loop mode enabled, when there are high velocity particles near the edges. This can be occasionally reproduced with id:2800901

The water was moved to a new position and pmap updated, but the movement code continued, assuming water was at its old position. pmap for the WATR's old position won't be cleared once it moves, leaving a stale entry. If a particle then looks up the water in that location and tries to swap positions, this can cause a crash at the end of try_move
2021-10-23 00:52:13 -04:00
Tamás Bálint Misius
5582d6881d
Update tpt-libs, add support for compiling with MinGW on Windows 2021-10-22 23:14:54 +02:00
Tamás Bálint Misius
6653080400
Fix cursor placement in textboxes with single-character text
TextWrapper used faulty logic for converting local points to wrapped text indices: a check on curr was skipped if next was end-of-range.
2021-10-17 13:59:35 +02:00
Tamás Bálint Misius
afa9fd3d8f
Remove precompiled headers, fix a few problems they masked 2021-10-15 17:04:04 +02:00
Tamás Bálint Misius
d675d483bd
Leave the original GameSave alone in Simulation::Load 2021-10-13 11:26:48 +02:00
Tamás Bálint Misius
816b9eda3d
Disable text input as startup
We're not handling any keyboard input at that point anyway.
2021-09-05 19:30:55 +02:00
jacob1
1d0e039cec
Fix crash when closing game, while not on the main screen, with lua components active
Also delete unnecessary RemoveComponent call
2021-09-03 23:38:02 -04:00
Tamás Bálint Misius
6cb54b1857
Fix near-RTEMP temperatures being loaded incorrectly in some cases 2021-09-03 08:16:19 +02:00
jacob1
46d7682ed9
Regenerate window when changing sdl settings if "old fullscreen" is enabled 2021-09-03 00:06:15 -04:00
jacob1
50336565b4
Fix missing delete commandInterface, fix gc issue with LuaComponent/LuaWindow
lua_close wasn't being called at all before due to the delete commandInterface being missing. With it there, the lua gc could delete the LuaComponent before the LuaWindow. Make sure if that happens, it tells the parent LuaWindow it's already been gced
2021-09-02 23:31:30 -04:00
jacob1
4f8fc739ac
Version 96.2 (350) 2021-08-29 22:53:12 -04:00
jacob1
323c443d2a
Minor LIGH compat fix
old LIGH with invalid high .tmp2 will spawn a line of LIGH, rather than disappearing
2021-08-29 14:02:21 -04:00
jacob1
4f36ab10c1
Add back "Name already taken" message 2021-08-28 00:02:19 -04:00
jacob1
44590d82e9
Add a few more Lua functions
sim.replaceModeFlags
sim.listCustomGol
sim.addCustomGol
sim.removeCustomGol
tpt.perfectCircleBrush
sim.floodDeco
2021-08-27 23:57:55 -04:00
jacob1
63fe8e46b2
LIGH now lasts longer and expands frame-by-frame, fix LIGH stamping bug 2021-08-26 22:26:55 -04:00