5444 Commits

Author SHA1 Message Date
UnknownShadow200
abfad91560 minor code tidy up 2020-12-13 14:51:11 +11:00
UnknownShadow200
0d3a1dda46 Unify auto rotate group finding code 2020-12-13 11:43:53 +11:00
UnknownShadow200
f8e1df2e21 avoid 64 bit integer division in Stopwatch_ElapsedMilliseconds, ~200 lines less in webclient 2020-12-13 08:41:43 +11:00
UnknownShadow200
10c958eed9 Webclient: Make /client res [width] [height] actually wok properly 2020-12-12 20:56:25 +11:00
UnknownShadow200
2fd1e0538a Webclient: Include a variable in try {} catch {} for locking escape key, fixes 'expected ( to start a catch target' (Thanks SteveHB) 2020-12-12 20:14:25 +11:00
UnknownShadow200
c027c96208 Release 1.2.3 1.2.3 2020-12-12 11:36:24 +11:00
UnknownShadow200
2e3a2ed08c Fix stack overflow happening when the game fails to create the logs directory (Thanks Fantasy)
This was particularly annoying, because the game would immediately just close without showing the usual crash message box
2020-12-12 11:29:43 +11:00
UnknownShadow200
de98806ead Release 1.2.2 1.2.2 2020-12-12 08:51:22 +11:00
UnknownShadow200
22e767fad3 Treat 0 byte memory allocations as 1 byte, don't crash game if allocating lighting heightmap fails (Thanks MrK) 2020-12-11 18:40:39 +11:00
Goodlyay
fc22220232 Remove unused variables 2020-12-09 23:19:35 -08:00
Goodlyay
9c4ce31386 New behavior for pick block:
If you are holding air and the block you're picking exists in your hotbar, your selector moves there instead of the block being brought to the air spot.
If auto rotate is on, when you pick an autorotate block, if a block from the same group already existed in your hotbar, it goes to that spot and replaces the old rotation variant with the new one you picked
2020-12-09 23:11:17 -08:00
UnknownShadow200
52032a5a21
Merge pull request #759 from UnknownShadow200/UploadingStuff
Add upload support for maps/texture packs to webclient
2020-12-10 08:35:08 +11:00
UnknownShadow200
df5e41ebf9 Fix error recreating D3D9 context crash. A big thank you to SpicyCombo for running a debug version of the game for an extended period of time to allow me to track down the cause.
The circumstances that cause this to happen are quite rare, which is why I had great difficulty getting it to occur myself. Approximate steps to cause this error are:
1) Do something that causes the Direct3D9 context to be lost for a long period of time, like running a fullscreen Direct3D9 game
2) Get the texture pack changed in ClassiCube while it's still running in the background (e.g. someone summons you to another map)
3) Now come back to this game
4) Gfx_RecreateContext gets called, triggering each subscriber to the ContextRecreated event
5) One of the first subscribers is the TexturePack component, which reload the texture pack (because of step 2). Sometimes this causes default.png to be changed, which will then cause the Gui to call OnContextRecreated on all the current screens/menus
6) One of the last subscribers is the Gui component, which causes the Gui to call OnContextRecreated on all of the current screens/menus
The problem is that step 5) and 6) means OnContextRecreated is called twice in a row without an OnContextLost, causing some D3D9 resources allocated in step 5) to get leaked, and hence crashing the game later with D3DERR_INVALIDCALL. So the solution is to change Screen_CreateVb to always try deleting the existing vb first before replacing, so that way it doesn't leak
2020-12-09 23:51:21 +11:00
UnknownShadow200
fb9757252b Visual Studio: Always treat warnings 4716 (Function doesn't return a value) and 4013 (implicit function declaration) as errors
Easy to do by accident and is a mistake 99.5% of the time
2020-12-09 23:12:31 +11:00
Goodlyay
a5f6150b45 Fix for webclient again
C from 1999
2020-12-09 03:55:46 -08:00
Goodlyay
ac8ad72e63 Fix for webclient 2020-12-09 03:44:46 -08:00
Goodlyay
37e42233e7 If auto rotate is on, only pick one block variant out of the set when using pick block 2020-12-09 03:34:01 -08:00
UnknownShadow200
6cfc0091ea Make desktop version still compile 2020-12-08 21:20:20 +11:00
UnknownShadow200
fb5938c3c2 Webclient: Add support for uploading texture packs 2020-12-07 22:32:30 +11:00
UnknownShadow200
3811e25314 Webclient: Fix not being able to upload more than once, fix crashing if you try to upload a non .cw map 2020-12-07 21:29:45 +11:00
UnknownShadow200
25dceff4f1 Initial support for uploading .cw maps to webclient 2020-12-07 21:29:44 +11:00
UnknownShadow200
e57fe2a1e9 Remove Platform_ConvertString from public API and rename to Platform_EncodeString
This function was dangerous for use by plugins, because it always assumed UNICODE was defined and so always encoded strings as utf16. However, a dll plugin might not have UNICODE defined and so would be expecting ascii instead of utf16 strings, which would complety fail
2020-12-07 21:29:42 +11:00
UnknownShadow200
dabcb2b284 WIP on adding upload button to load level menu 2020-12-07 21:28:32 +11:00
UnknownShadow200
18b98c8236 Combine multiple similar Drawer2D_MakeFont calls 2020-12-07 21:20:15 +11:00
UnknownShadow200
23f9194b27 Disable the padding at end of bitmapped drawn text by default 2020-12-07 20:37:51 +11:00
UnknownShadow200
f6c3b6e582 Windows: Try to fix cursor very rarely getting stuck visible/hidden 2020-12-07 19:02:16 +11:00
UnknownShadow200
72b354b16a Fix accidentally reintroducing clipping problems with high FOV (Thanks Cheesse) 2020-12-07 06:48:29 +11:00
UnknownShadow200
15dcbaf353 X11: Attempt to fallback to raw keycode conversion if can't use regular raw keycode --> keysym --> internal keycode conversion (Thanks greenchai) 2020-12-06 09:49:38 +11:00
UnknownShadow200
98c8d459e4 D3D9: Don't reduce zNear at default 70 FOV, reduces z-fighting with far away stuff 2020-12-05 23:48:25 +11:00
UnknownShadow200
9535e8866d forgot to save changes oops 2020-12-05 22:55:42 +11:00
UnknownShadow200
c70c38442d some minor changes 2020-12-05 22:51:04 +11:00
UnknownShadow200
4f013cc61e
Merge pull request #751 from Cheesse/master
Use reversed z depth for D3D backend
2020-12-05 22:30:16 +11:00
UnknownShadow200
223e4f342a Fix linux build not compiling 2020-12-05 08:51:04 +11:00
UnknownShadow200
d7b7a14056 Tidy up X11 keyboard handling a little bit, and also log 'unknown key' for cocoa 2020-12-05 08:39:58 +11:00
UnknownShadow200
09bc610bc5 Webclient: Try to stop Escape immediately exiting fullscreen in singleplayer
Note that this only works when the webpage is served over https, so it doesn't work in multiplayer at all. Additionally, at the time this commit was pushed, only chromium based browsers support the API. (Chrome / Modern Edge / Modern Opera)
2020-12-04 13:49:43 +11:00
Cheesse
e83d66a7a6 Change frustum culling calculation for D3D 2020-12-03 17:23:01 -05:00
UnknownShadow200
461d8bf252 Webclient: Space should always have its default action prevented unless text input keyboard is 'open'
This change is necessary because Safari scrolls the page when you press space and the default action is not prevented. However, we also can't just always prevent the default action, because then the key press event for ' ' would never get raised for text input. So this seems like a reasonable compromise.
2020-12-03 14:53:26 +11:00
UnknownShadow200
a5c6fbbea2 Improve 'unknown key' on X11 to also log raw keycode 2020-12-03 08:14:43 +11:00
UnknownShadow200
63ca5c844b Fix buffer overflow with extremely large skin sizes 2020-12-02 20:06:03 +11:00
UnknownShadow200
7d58c5c241 Webclient: Download is no longer a WIP
The temp map file is now properly written to the in-memory filesystem instead of default filesystem, meaning an error is no longer printed to console about a missing file.
2020-11-29 14:36:25 +11:00
UnknownShadow200
bfd9c01e89 Webclient: Read default texture pack in less hacky way 2020-11-29 14:23:32 +11:00
UnknownShadow200
dbbf0cbc66 Webclient: Fix downloading map still leaving behind file in IndexedDB
Prints an error message to console now. Not ideal but better than before.
2020-11-29 13:31:35 +11:00
UnknownShadow200
12b6752f62 Fix characters in special input widget not having enough padding
Temp fix for now, need to do proper fix later
1.2.1
2020-11-29 10:11:52 +11:00
UnknownShadow200
80dd93f522 Release 1.2.1 2020-11-29 09:24:36 +11:00
UnknownShadow200
21939b12ba Try not intercepting any touch events when keyboard is open 2020-11-28 21:46:35 +11:00
UnknownShadow200
9de0b309fd Mobile webclient: Attempt to fix not being able to tap to move text input caret
Not sure why it works on my local testing version but who really knows
2020-11-28 21:27:56 +11:00
UnknownShadow200
fde9fe58bf Combine title and page number for load level/change texture/font list menus 2020-11-28 16:55:19 +11:00
UnknownShadow200
8e56cb92fd Mobile: Add third person on screen control 2020-11-28 16:37:51 +11:00
UnknownShadow200
c6ac0c14b0 Mobile: Add second page into onscreen controls
Actually implementing more onscreens buttons will come next
2020-11-28 16:13:31 +11:00
UnknownShadow200
43b2242e85 Webclient: If webpage is served over https, automatically change all download urls to always use https://
Otherwise trying to download from a url with http:// just fails
2020-11-27 19:30:46 +11:00