Commit graph

939 commits

Author SHA1 Message Date
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
Marcel Admiraal
3d96d7d9fb Fix mouse speed not changing fast enough
- Uses all accumulated movements when calculating speed
- Discards old accumulated movements
- Sets last mouse speed to zero when there is no movement
2022-01-13 18:52:08 +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
Sam Lantinga
e5b0f86260 Fixed event spam when using the Nintendo Switch controller
There is no filtering on the Nintendo Switch Pro controller thumbstick, so there will frequently be events with very slight change. These are turned into "not pressed" events, which cancel "pressed" events from keys and buttons.

This change filters out up to 5% jitter, but it might be worth revisiting whether "not pressed" events should cancel "pressed" events.
2021-12-16 09:09:06 -08:00
Haoyu Qiu
c11b1850c4 Make --doctool locale aware
* Adds `indent(prefix)` to `String`
* Moves the loading of tool/doc translation into
  `editor/editor_translation.{h,cpp}`
* Makes use of doc translation when generating XML class references, and
  setup the translation locale based on `-l LOCALE` CLI parameter.

The XML class reference won't be translated if `-l LOCALE` parameter is
not given, or when it's `-l en`.
2021-12-16 18:27:32 +08:00
Rémi Verschelde
2025648d6d
Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@348cfa347f.

(cherry picked from commit 03e105f677)
2021-12-10 11:08:30 +01:00
lawnjelly
3d981b8265 Add option to use handles to RID
Adds an option to compile an alternative implementation for RIDs, which allows checks for erroneous usage patterns as well as providing leak tests.
2021-12-06 14:43:34 +00:00
Rémi Verschelde
d5b22e614e
Merge pull request #55484 from pycbouh/theme-load-and-order-3.x 2021-12-02 17:20:31 +01:00
Rémi Verschelde
f9bafe4ba4
Remove editor splash screen with sponsors logo
The Godot Project Leadership Committe has decided to update the sponsoring
tiers so that the Platinum Sponsorship no longer includes a logo on the
editor splash screen.

This lets us reclaim the editor splash screen space for community-related
content instead of sponsors (e.g. a different community-designed splash
screen for each stable branch?).

Also removes two Platinum Sponsors whose sponsorship has expired earlier this
year.

(cherry picked from commit c283fce698)
2021-12-01 14:18:29 +01:00
Yuri Sizov
33fb44223f Make default/project theme wait for modules before initializing 2021-11-30 18:59:32 +03:00
Aaron Franke
035a84fe92
[3.x] Add a Time singleton 2021-11-29 11:00:06 -06:00
kobewi
420c351592
Ignore override.cfg when in editor
(cherry picked from commit 7dc97d6558)
2021-11-25 22:48:20 +01:00
bruvzg
2ef2879d7b
Add Input.is_physical_key_pressed method.
(cherry picked from commit 9877d91c4a)
2021-11-25 22:19:33 +01:00
Hugo Locurcio
e5593212e2
Add a project setting to disable the boot splash image
This allows disabling the boot splash image while keeping the
background color.
2021-11-23 19:06:54 +01:00
lawnjelly
211dc8cd2d BVH - add option for expanded AABBs in leaves
This PR adds a define BVH_EXPAND_LEAF_AABBS which is set, which stores expanded AABBs in the tree instead of exact AABBs.

This makes the logic less error prone when considering reciprocal collisions in the pairing, as all collision detect is now taking place between expanded AABB against expanded AABB, rather than expanded AABB against exact AABB.

The flip side of this is that the intersection tests will now be less exact when expanded margins are set.

All margins are now user customizable via project settings, and take account of collision pairing density to adjust the margin dynamically.
2021-11-20 06:45:12 +00:00
Marcel Admiraal
4d3690eba5 Remove unimplemented methods 2021-11-18 12:47:36 +00:00
Rémi Verschelde
5752457854
Merge pull request #54911 from akien-mga/3.x-modules-check-enabled 2021-11-12 14:49:39 +01:00
Rémi Verschelde
6f4858f184
Modules: Make sure to include modules_enabled.gen.h where needed
Fixes #51677.

Co-authored-by: Arkadiusz Marcin Kołek <aksoftware91@gmail.com>
2021-11-12 13:45:33 +01:00
Hugo Locurcio
4c88a82f50
Move Mono unhandled exception setting to be located within a subsection
Settings that aren't within a subsection are difficult to reach when
other settings do have a subsection.

This also adds documentation for the project setting.
2021-11-10 20:57:35 +01:00
Hugo Locurcio
b31f6f78a3
Display 2 decimals instead of 1 in editor frametime labels
When comparing different graphics settings or optimizations,
this makes precise measurements and frametime comparisons easier.

This also makes the editor FPS display use `pad_decimals()`
for consistency with the implementation in `master`.
2021-11-09 17:20:59 +01:00
Pedro J. Estébanez
4c710780d4 Implement async shader compilation plus caching for GL ES 3
Async. compilation via ubershader is currently available in the scene and particles shaders only.

Bonus:
- Use `#if defined()` syntax for not true conditionals, so they don't unnecessarily take a bit in the version flagset.
- Remove unused `ENABLE_CLIP_ALPHA` from scene shader.
- Remove unused `PARTICLES_COPY` from the particles shader.
- Remove unused uniform related code.
- Shader language/compiler: use ordered hash maps for deterministic code generation (needed for caching).
2021-11-09 12:19:12 +01:00
Rémi Verschelde
7afb784269
Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@322aac4bb7.

Also improve parser errors to allow identifying the problematic mappings.

(cherry picked from commit 4b247e7ffa)
2021-11-03 21:32:53 +01:00
Rémi Verschelde
42d385b312
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 13:23:38 +02:00
Pawel Lampe
cc0479a17e
Fix exit code for --script --check-only, fixes #54087
this commit makes godot executable to return zero exit code
once a valid script is passed via --script during --check-only

(cherry picked from commit 75ae3164a4)
2021-10-23 12:00:28 +02:00
Rémi Verschelde
c743649c0b
Merge pull request #53742 from DmitriySalnikov/exposed_sensor_setters 2021-10-18 23:01:07 +02:00
Rémi Verschelde
a5093d64ac
SCons: List .gen.cpp sources explicitly to avoid globbing errors
Whenever we change the name (or remove) generated cpp files with the `.gen.cpp`
extension, users run into build issues when switching between branches (i.e.
switching before and after the name change/removal). This is because we glob
`*.cpp` so if a now-obsolete file from a previous build is present, we'll
include it too, potentially leading to bugs or compilation failure (due to
missing headers or invalid code).

So globbing patterns in `add_source_files` will now skip files ending with
`.gen.cpp`, which should instead be passed explicitly where they're used.

(cherry picked from commit c133480531)
2021-10-16 10:59:14 +02:00
Дмитрий Сальников
5cf898b897 Exposed setters for sensor values in Input class 2021-10-12 23:09:30 +03:00
Yuri Sizov
b02c61ddb1 Ignore OS specific values (constants, project settings, properties)
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2021-10-10 23:40:32 +03:00
Rémi Verschelde
77f52bdf99
Merge pull request #52137 from Ansraer/3.x-2d-scale-factor 2021-10-05 19:12:19 +02:00
Ansraer
d44aa61735 implement better ui scaling 2021-10-05 14:30:38 +02:00
Rémi Verschelde
7c9e06f936
Merge pull request #48686 from bruvzg/bundle_icon_3 2021-09-30 14:55:41 +02:00
Manuel Moos
f8e62424c5 Fix negative delta arguments
Three attack points, all after the regular calculations:
1. Prevent negative physics timestep counts. They could occur if
   physics_jtter_fix is changed at runtime.
2. idle_step is not allowed to go below 1/8th of the input step.
   That could happen on physics_jitter_fix changes or heavily
   fluctuating performance.
3. Prevent that the idle_step modification breaks the promise
   that Engine.get_physics_interpolation_fraction() is between
   0 and 1 by doing more physics steps than the base system wants.

Fixes #26887

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Cherry-Pick from 6be702bace.
2021-09-22 21:09:38 +02:00
jmb462
e7dac5da41
Adding InputMap action error suggestion for Input singleton
(cherry picked from commit a3b9842616)
2021-09-21 17:14:58 +02:00
Hugo Locurcio
b63016c571
Display an alert when attempting to run a project with no main scene
This gives visual feedback when not starting Godot from a terminal.
This could lead to confusion when placing a Godot binary within a
project folder that has no main scene defined.

(cherry picked from commit 87fb9297e3)
2021-09-21 17:14:58 +02:00
tommyZZM
f2a3af47e4 [3.x] Backport Accept global classes for MainLoop type in project settings
https://github.com/godotengine/godot/pull/41190
2021-09-06 23:18:06 +08:00
Hugo Locurcio
59f24d8867
Define a default minimum window size to workaround rendering issues
The minimum window size can still be set to `Vector2(0, 0)` in a script
if needed.
2021-08-23 04:10:24 +02:00
Rémi Verschelde
ffc372b002
Merge pull request #42220 from RandomShaper/agile_input_3.2
[3.x] Improve responsiveness on underpowered Android devices
2021-08-12 22:46:17 +02:00
lawnjelly
3025b6d299 Delta smoothing - fix overflow for long frames
Extremely long frames caused by suspending and resuming the machine could result in an overflow in the delta smoothing because it uses 32 bit math on delta values measured in nanoseconds.

This PR puts a cap of a second as the maximum frame delta that will be processed by the smoothing, otherwise it returns the frame delta 64 bit value unaltered. It also converts internal math to explicitly use 64 bit integers.
2021-08-11 09:47:23 +01:00
Pedro J. Estébanez
31a0ca2cac Add project setting for agile input event flushing
If enabled, key/touch/joystick events will be flushed just before every idle and physics frame.

Enabling this can greatly improve the responsiveness to input, specially in devices that need to run multiple physics frames per each idle frame, because of not being powerful enough to run at the target frame rate.

This will only work for platforms using input buffering (regardless event accumulation). Currenly, only Android does so, but could be implemented for iOS in an upcoming PR.
2021-08-08 12:37:55 +02:00
Pedro J. Estébanez
7be9c26e20 Add input buffering framework
Input buffering is implicitly used by event accumulation, but this commit makes it more generic so it can be enabled for other uses.

For desktop OSs it's currently not feasible given main and UI threads are the same).
2021-08-08 12:37:55 +02:00
Pedro J. Estébanez
58a54f534e Improve input event accumulation
- API has been simplified: all events now go through `parse_input_event()`. Whether they are accumulated or not depends on the `use_accumulated_input` flag.
- Event accumulation is now thread-safe (it was not needed so far, but it prepares the ground for the following changes).
- Touch drag events now support accumulation.
2021-08-08 12:37:55 +02:00
lawnjelly
37f20e1d78 Fix Transform::xform(Plane) functions, add Transform unit tests
The Transform::xform and xform_inv are made safe for Planes when using non-uniform scaling.

Basic unit tests for Transform.

Optimization of calling sites to prevent loss of performance from the changes to xform(Plane).
2021-08-07 08:05:39 +01:00
Hugo Locurcio
21a68d1c44
Print a warning when the engine is started as root/superuser
This is a security risk (especially when hosting a game server)
and can make audio non-functional on Linux.

(cherry picked from commit 9c34db6cb4)
2021-08-03 10:20:18 +02:00
lawnjelly
98a39aade9 Profiling - fix frame_time measurement
When the `sync_after_draw` feature was on it was possible for the profiler's frame_time measurement to be incorrect. This fixes this problem by storing the raw measured time for use by the profiler.
2021-08-01 10:05:43 +01:00
EricEzaM
0e5c6e0d55 Allow checking for exact matches with Action events.
Added additional param to action related methods to test for exactness.
If "p_exact_match" is true, then the action will only be "matched" if the provided input event *exactly* matches with the action event.

Before:
* Action Event = KEY_S
* Input Event = KEY_CONTROL + KEY_S
* Is Action Pressed = True

Now:
You can still do the above, however you can optionally check that the input is exactly what the action event is:
* Action Event = KEY_S
* Input Event = KEY_CONTROL + KEY_S
* p_exact_match = True
* Is Action Pressed = False
* If the Input Event was only KEY_S, then the result would be true.

Usage:

```gdscript
Input.is_action_pressed(action_name: String, exact_match: bool)
Input.is_action_pressed("my_action", true)

InputMap.event_is_action(p_event, "my_action", true)

func _input(event: InputEvent):
  event.is_action_pressed("my_action", false, true) # false = "allow_echo", true = "exact_match"
  event.is_action("my_action", true)
```

Co-authored-by: Eric M <itsjusteza@gmail.com>
2021-07-30 15:35:39 +02:00
Aaron Franke
69fb14256b
[3.x] Allow getting Input axis/vector values from multiple actions
For get_vector, use raw values and handle deadzones appropriately
2021-07-23 19:17:55 -04:00
Aaron Franke
afa89c9eea
[3.x] Add raw strength value for internal use 2021-07-23 19:09:53 -04:00
lawnjelly
93557927e4 Add option to sync frame delta after draw
Investigations have showed that a lot of the random variation in frame deltas causing glitches may be due to sampling the time at the wrong place in the game loop.

Although sampling at the start of Main::Iteration makes logical sense, the most consistent deltas may be better measured after the location likely to block at vsync - either the OpenGL draw commands or the SwapBuffers.

Here we add an experimental setting to allow syncing after the OpenGL draw section of Main::Iteration.
2021-07-22 12:04:22 +01:00
Rémi Verschelde
d3f500cf33
Merge pull request #48390 from lawnjelly/delta_smooth
Add frame delta smoothing option
2021-07-22 12:43:39 +02:00
Rémi Verschelde
801205b2c1
Merge pull request #48892 from lawnjelly/bvh_robust
BVH - thread safety option
2021-07-22 12:41:42 +02:00
Rémi Verschelde
fde7c2c5b8
Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@241fed0a44.

(cherry picked from commit a98677181b)
2021-07-20 13:20:40 +02:00
Fabio Alessandrelli
6d546692fe
[HTML5] Add 2 controllers to the godot database.
Sony PlayStation DualShock 4 (054c:05c4 first gen).
Unofficial Switch controller.

(cherry picked from commit 5717118bcc)
2021-07-20 13:05:10 +02:00
Rémi Verschelde
875045adde
Use modules_enabled.gen.h to improve inter dependency checks
- Fix build with gdscript module disabled. Fixes #31011.
- Remove unused `gdscript` compile option.
- Fix build with regex module disabled.
- Fix ImageLoaderSVG to forward declare thirdparty structs.

(cherry picked from commit f3726ee994)
2021-07-14 23:36:38 +02:00
lawnjelly
eb6f98ec55 Portal occlusion culling
Adds support for occlusion culling via rooms and portals.
2021-07-14 11:43:23 +01:00
lawnjelly
6914d7c6e0 Add frame delta smoothing option
Frame deltas are currently measured by querying the OS timer each frame. This is subject to random error. Frame delta smoothing instead filters the delta read from the OS by replacing it with the refresh rate delta wherever possible.

This PR also contains code to estimate the refresh rate based on the input deltas, without reading the refresh rate from the host OS.
2021-07-14 08:44:31 +01:00
Hugo Locurcio
6d60d92b87
Tweak the physics FPS property hint to only allow reasonable values
Physics FPS above 1000 cause the whole project to slow down
and are not very practical in the first place (since no CPU currently
available can keep up).

(cherry picked from commit 8f4ac7bc4a)
2021-06-17 12:47:53 +02:00
Marcel Admiraal
5a58516231 Remove duplicate ERR_PRINTS macro 2021-06-16 11:56:25 +01:00
Marcel Admiraal
18825ad4ff Fix game controllers ignoring the last listed button 2021-06-03 15:45:05 +01:00
Henry Conklin
a28beb3048
Add support for numeric XML entities to XMLParser
* Add support for decimal numeric entities to String::xml_unescape
* Add more error checks to String::xml_unescape
* Refactor XMLParser to use String::xml_unescape instead of an internal
implementation
2021-06-03 11:44:47 +02:00
lawnjelly
14ce176f10 BVH - thread safety option
Added optional thread safe version through template argument and runtime switch, that wraps access with a mutex.
2021-05-25 10:47:32 +01:00
Rémi Verschelde
ac3417005d
Merge pull request #48533 from mortarroad/3.x-convex-hull-ported
[3.x] Port Bullet's convex hull computer to replace of QuickHull
2021-05-22 23:23:15 +02:00
Morris Tabor
ba396caefc Replace QuickHull with Bullet's convex hull computer.
The code is based on the current version of thirdparty/vhacd and modified to use Godot's types and code style.

Additional changes:
- backported and extended PagedAllocator to allow leaked objects
- applied patch from https://github.com/bulletphysics/bullet3/pull/3037
2021-05-22 08:16:43 +02:00
Will Whitty
3f606263d5 Backport HMac crypto to 3.x
Fix headers

Fix docs formatting

Changes for PR

Fix tests
2021-05-20 13:29:38 +03:00
Rémi Verschelde
330ddc37b6
Merge pull request #48075 from lyuma/varying_fragment_to_light_3.4 2021-05-18 10:53:34 +02:00