Commit graph

900 commits

Author SHA1 Message Date
Rémi Verschelde
d6bcdd18c3 Input: Re-enable input accumulation disabled by error in 3.4
Input accumulation was implemented and enabled by default in 3.1, and
I don't recall major complaints around it (or bugs were fixed).

In 3.4, #42220 added input buffering and apparently toggled input
accumulation off by mistake.

This led to multiple bug reports about degraded performance on Windows,
or simply unexpected behavior change (see linked issues in #55037).

Fixes #55037.
2022-07-07 23:04:51 +02:00
Rémi Verschelde
cc9dd00e1a Revert "Command line arguments '--version' and '--help' return exit code 0 instead of 255"
This reverts commit 9e165a8c2b.
See https://github.com/godotengine/godot/pull/62550#issuecomment-1172745325.
2022-07-02 00:07:14 +02:00
Jan Haller
9e165a8c2b Command line arguments '--version' and '--help' return exit code 0 instead of 255
Allows to detect whether those commands executed successfully, which makes integration with shell scripts/CI/bindings straightforward.

(cherry picked from commit e3a8edf536)
2022-06-30 19:23:01 +02:00
Hugo Locurcio
b853b8d065 Add a property hint for the iOS touch delay project setting
(cherry picked from commit 21da2fbbb0)
2022-06-16 10:20:52 +02:00
Hugo Locurcio
bec892c010 Tweak default crash handler message in exported projects
When an exported project crashes, the crash handler message
shouldn't reference the Godot issue tracker, as not all crashes
are Godot's fault.

Reporting crashes that only occur on exported projects is still allowed,
but it should not be done by people who aren't working on the project
in question.

(cherry picked from commit c850ccb7c0)
2022-06-16 10:16:32 +02:00
FireForge
53c01540d9 Make Input mouse_mode and use_accumulated_input properties
Co-authored-by: Haoyu Qiu <timothyqiu32@gmail.com>
2022-06-10 17:33:12 +08:00
Hugo Locurcio
8d813c4511 Hide the first --print-fps outputs after the engine has started
The first 2 or 3 prints are inaccurate since the engine has just
started at that point.

(cherry picked from commit 2d56dfb746)
2022-05-17 23:28:32 +02:00
kobewi
621cb8c52f Move Display settings higher in the list
(cherry picked from commit 739242dd04)
2022-05-16 17:14:43 +02:00
Fabio Alessandrelli
225e75daba [3.x] [Debugger] Add --debug-server CLI option.
Automatically starts the editor debug server at given <IP>:<PORT>.

E.g.:
 # Run editor and debug server listening on any interface, port 8080
godot3 -e --path proj/proj_empty --debug-server *:8080

 # Run the godot project connecting to that debug server.
godot3 --path proj/proj_empty --remote-debug 127.0.0.1:8080
2022-05-06 14:02:00 +02:00
Rémi Verschelde
c89c21145b Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@b7d126eb71

(cherry picked from commit 30fbb8964d)
2022-05-05 15:02:46 +02:00
lawnjelly
df7fab51a3 Physics Interpolation - Flush transforms after physics tick
Leftover transforms from the physics tick were being flushed during idle, which was causing problems for physics interpolation.

This PR flushes the transforms at the end of the physics tick when physics interpolation is active.
2022-05-04 20:30:46 +01:00
Rémi Verschelde
4b6e5f5da6
Merge pull request #60530 from timothyqiu/theme-validation-3.x 2022-05-02 10:49:27 +02:00
Haoyu Qiu
767134fd8d Fix left aligned integer sign in string formatting 2022-05-01 12:43:03 +08:00
lawnjelly
ad9b2b3794 Physics Interpolation - add helper warnings
When physics interpolation is active on a node, it is essential that transforms are updated during "_physics_process()" rather than "_process()" calls, for the interpolation to give the correct result.

This PR adds optional warnings for instances, cameras and multimeshes which can flag updates being incorrectly called, and thus make these problems much easier to fix.
2022-04-26 13:56:02 +01:00
Haoyu Qiu
76343f4055 Validate theme type/item names 2022-04-26 20:09:18 +08:00
KingCakeTheFruity
198d147f8e Added p_shape check to avoid engine crush
(cherry picked from commit 29a2809d21)
2022-04-14 21:35:32 +02:00
Jason Yundt
6ca73386d1 Improve autoload inheritance error message
Autoloaded scripts should always inherit from Node. When you run a
project that tries to autoload a script which doesn’t inherit from Node,
then Godot gives an error.

Before this change, the error said “Script does not inherit a Node”.
That error message is a little bit misleading. If a class inherits a
Node, then one of its superclasses has a Node. If a class inherits
_from_ Node, then one of its superclasses is Node. This change corrects
that mistake.

Fixes #59884.

(cherry picked from commit 1cc7e7ec33)
2022-04-13 11:43:49 +02:00
snowapril
c77b710035 Fix crash on get index for non-existing string
As _buttons and _axes have both valid string and nullptr.
When iterating over them, if given key exists it will work correctly.
But if given key does not exist, it will end up with
String::operator=(nullptr). As String constructor from nullptr exists, I
use it.
2022-03-17 17:49:12 +09:00
Rémi Verschelde
ee818e1631
Merge pull request #54026 from ConteZero/primary_clipboard_linux_3.x 2022-03-14 18:52:20 +01:00
ConteZero
2ff0735329 Added primary clipboard for Linux 2022-03-14 15:28:36 +01:00
Pedro J. Estébanez
3d7821bf1f Drop mouse focus and over when gui input is globally disabled
Since some porjects may be relying on the former behavior, this is opt-in via a new project setting, disabled by default, but enabled for new projects, since it's the new standard behavior (and the only one in 4.0).
2022-03-14 11:06:26 +01:00
lawnjelly
688dc534e5 Fix get_global_transform_interpolated() with multiple ticks per frame
The previous and current transforms in the interpolation data were not being correctly updated in cases where two or more physics ticks occurred on a frame. This PR introduces a simple mechanism to ensure updates on interpolated spatials.
2022-02-25 11:22:00 +00:00
Yuri Roubinsky
4c2ffa7af3 Fix test_shader_lang (for 3.x) 2022-02-22 15:24:34 +03:00
Rémi Verschelde
c221539207
Merge pull request #58387 from lawnjelly/fti_jitter_fix 2022-02-21 12:18:26 +01:00
lawnjelly
b90f1a3ec0 Disable jitter fix when physics interpolation is enabled. 2022-02-21 10:32:42 +00:00
Rémi Verschelde
0d8fa9baca Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@94b76208bc

(cherry picked from commit e3d89a76f7)
2022-02-21 11:11:36 +01:00
Powerbyte7
52ce161787 [HTML5] Add Stadia controller to database
Add web support for the Stadia controller.

(cherry picked from commit b8a7ea034c)
2022-02-21 11:10:35 +01:00
lawnjelly
522bce1159 Fixed Timestep Interpolation (3D)
Adds fixed timestep interpolation to the visual server.
Switchable on and off with project setting.

This version does not add new API for set_transform etc, when nodes have the interpolated flag set they will always use interpolation.
2022-02-16 09:41:23 +00:00
Rémi Verschelde
7a16bb2ee4
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.

(cherry picked from commit 1bdb82c64e)
2022-02-11 09:50:59 +01:00
Rémi Verschelde
f50c7f7415
Core: Move generated VERSION_HASH to a .cpp file
This lets us have its definition in `core/version.h` and avoid
rebuilding a handful of files every time the commit hash changes.

(cherry picked from commit 90162851a7)
2022-02-10 13:06:56 +01:00
Rémi Verschelde
689f59dca0
Merge pull request #53463 from lawnjelly/vital_redraws
Add editor vital redraws only option
2022-02-04 21:42:49 +01:00
Rémi Verschelde
80306cc88a
EditorProperty: Fix range hint parsing with optional step
This could lead to have a step of 0 when parsing e.g. "1,10,is_greater".
2022-02-03 12:33:37 +01:00
lawnjelly
a0c6d16c90 Add editor vital redraws only option
When editor continuous redraws is switched off, the editor only redraws when a redraw_request was issued by an element in the scene. This works well in most situations, but when scenes have dynamic content they will continuously issue redraw_requests.

This can be fine on high power desktops but can be an annoyance on lower power machines.

This PR splits redraw requests into high and low priority requests, defaulting to high priority. Requests due to e.g. shaders using TIME are assigned low priority.

An extra editor setting is used to record the user preference and an extra option is added to the editor spinner menu, to allow the user to select between 3 modes:

* Continuous
* Update all changes
* Update vital changes
2022-02-02 11:26:45 +00:00
Rémi Verschelde
ed869729ae
Merge pull request #56755 from madmiraal/fix-45592-3.x 2022-01-24 10:06:24 +01:00
Rémi Verschelde
c938104a88
Merge pull request #56630 from Pineapple/replace-find-last 2022-01-18 16:36:52 +01:00
Rémi Verschelde
1ee44b2366
ImageLoader: Remove references to unsupported svgz extension
I don't see any reference to gzip/svgz supported in the nanosvg library,
and the handful of test gzip compressed svgz files I tried failed loading.

Also cleaning a couple missing includes in platform export code.
2022-01-17 10:52:32 +01:00
Marcel Admiraal
949ea2b326 Simplify InputDefault::joy_axis code by using float instead of struct JoyAxis 2022-01-14 15:36:35 +00:00
Rémi Verschelde
a627cdafc5
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
Marcel Admiraal
b7545631de Use mouse event relative motion to calculate mouse speed 2022-01-13 10:29:57 +00:00
bruvzg
6eac65d4fe
Add joystick button index boundary check. Increase max. button number to 128 (max. buttons supported by DirectInput).
(cherry picked from commit 61ea8f8337)
2022-01-12 17:28:07 +01:00
Rémi Verschelde
8a192cd0ab
Merge pull request #55987 from bruvzg/wt🤎3 2022-01-10 16:43:56 +01:00
Bartłomiej T. Listwon
22750b1c03 Replace String::find_last with rfind where possible (backward compatible with old API) 2022-01-08 22:40:44 +01:00
Rémi Verschelde
b197de6f5f
Fix typos with codespell
Using codespell 2.1.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
readded
seeked
statics
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2022-01-07 00:14:54 +01:00
Jake Young
09bc9eb101
Backport NavigationServer with RVO2 to 3.x
Change the entire navigation system.
Remove editor prefix from nav mesh generator class. It is now used for baking
at runtime as well.
Navigation supports obstacle avoidance now with the RVO2 library.
Nav system will also automatically link all nav meshes together to form one
overall complete nav map.
2022-01-05 16:00:56 +01:00
Rémi Verschelde
9bc750da55
Merge pull request #56029 from madmiraal/revert-55997-3.x-fix-switch-controller-event-spam 2021-12-21 09:45:21 +01:00
Hugo Locurcio
20f76f2298
Print requested V-Sync mode when Print Fps is enabled
This can be used to diagnose why the printed FPS is locked to the
monitor refresh rate.
2021-12-20 21:28:06 +01:00
bruvzg
59085d5051
[Windows] Improve console handling and execute.
Always build with the GUI subsystem.
Redirect stdout and stderr output to the parent process console.
Use CreateProcessW for blocking `execute` calls with piped stdout and stderr (prevent console windows for popping up when used with the GUI subsystem build, and have more consistent behavior with non-blocking calls).
Add `open_console` argument to the `execute` to open a new console window (for both blocking and non-blocking calls).
Remove `interface/editor/hide_console_window` editor setting.
Remove `Toggle System Console` menu option.
Remove `set_console_visible` and `is_console_visible` functions.
2021-12-18 10:13:27 +02:00
Marcel Admiraal
9f250e8370
Revert "[3.x] Fixed event spam when using the Nintendo Switch controller" 2021-12-17 17:20:43 +00:00
Rémi Verschelde
ab10fa0439
Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@265b43b789.

(cherry picked from commit ed395c6b99)
2021-12-17 00:14:54 +01:00
Rémi Verschelde
b61a93d86f
Merge pull request #55997 from slouken/3.x-fix-switch-controller-event-spam
[3.x] Fixed event spam when using the Nintendo Switch controller
2021-12-16 19:51:19 +01:00