Commit Graph

7332 Commits

Author SHA1 Message Date
Ferenc Arn ceb699f5ec Fix PRNG randomization.
PCG32 doesn't like small seeds, which leads to zero random values (prior to #7532, zero values were handled as special cases).

Use a large default seed, and also add a shift in Math::randomize.

Fixes #8423.
2017-04-17 14:05:02 -05:00
Thomas Herzog 68d79b21c3 Merge pull request #8440 from karroffel/gdnative-new-method
[GDNative] added "new" method and fixed headers
2017-04-17 20:41:32 +02:00
Thomas Herzog a88c20f0ca Merge pull request #8439 from touilleMan/correct_gdnative_signatures
Correct gdnative signatures
2017-04-17 19:55:42 +02:00
Karroffel f4261c8868 [GDNative] added "new" method and fixed headers 2017-04-17 19:52:18 +02:00
Emmanuel Leblond e7134ce283
gdnative: Implement missing function for godot_basis. 2017-04-17 19:05:00 +02:00
Thomas Herzog 6f9ec3acfc Merge pull request #8437 from touilleMan/gdnative-godot_string_unicode_str
Add godot_string_unicode_str to GDnative
2017-04-17 16:51:57 +02:00
Emmanuel Leblond 707eedfa85
gdnative: modify vector2&vector3 functions signature to use value passing instead of ptr. 2017-04-17 16:43:43 +02:00
Emmanuel Leblond 8400de76a7
Add godot_string_unicode_str to GDnative 2017-04-17 15:48:26 +02:00
Andreas Haas 95fe6b5d8c Merge pull request #8433 from neikeq/pr-fix-smth
ScriptEditor: Fixes bug where menu option would be handled twice
2017-04-17 11:55:42 +02:00
Andreas Haas 60886b8055 Merge pull request #8426 from Shockblast/master
[GD 3.0] Fix stretch mode 2d... again
2017-04-17 10:52:54 +02:00
Ignacio Etcheverry 97c385dbb8 ScriptEditor: Fixes bug where menu option would be handled twice 2017-04-17 02:45:56 +02:00
Ignacio Etcheverry 4b8568006d External editor improvements and fixes
Notable changes:

- Now ScriptLanguages have the option to override the global external editor setting.
If `ScriptLanguage::open_in_external_editor()` returns `ERR_UNAVAILABLE` (which it does by default), then the global external editor option will be used.
- Added formatting to the external editor execution arguments. Now it's possible to write something like this: `{project} -g {file}:{line}:{col}`.
- `VisualScript::get_member_line()` now can return the line of functions (well, it returns the id of the _Function_ node of the function). I guess there is nothing else we can get a "line" from.

Fixes:

- Fixes a bug where `ScriptEditor::script_goto_method()` would not work if the script is not already open in the built-in editor.
- Fixes wrong DEFVAL for `cursor_set_column` and `cursor_set_line` in TextEdit.
- `Script::get_member_line()` now returns -1 ("found nothing") by default.
2017-04-17 01:51:30 +02:00
Shockblast 2f76257da4 [GD 3.0] Fix stretch mode 2d... again
Objects on the screen were not displayed when the project was played,
because it looked for the values of width and height of menus with old
names (godot 2.1?) For that reason delivered value (0, 0).
2017-04-16 18:02:22 -03:00
Paulb23 95a2a7e525 Added ability to convert indent type 2017-04-16 17:21:45 +01:00
Andreas Haas c06a2db63a
Use .godot as file extension for project files.
Now project files don't have to be named "godot.cfg" anymore, they can have any name so as long as it ends with *.godot.
Also godot will automatically start the editor now if launched with a project file as an argument.
This allows for double-clicking of projects to open them :)

Code-wise this should be complete, but there's still work to do:

- Make a nice icon for godot projects.
- Work on installers/packaging -> register the extension and icon with godot.
- Update the 2.1 to 3.0 exporter.

Tested on linux and windows so far.
2017-04-16 10:19:07 +02:00
Zaven Muradyan 5b3c0a502c Add the ability to delete bezier path handles. 2017-04-16 01:02:58 -07:00
Andreas Haas 25f843f80e
Editor: decrease blending time for dialog dimming a little.
Feels snappier now.
2017-04-16 09:33:26 +02:00
mbalint12 a3afec588c Added the ability to select files as base when creating scripts 2017-04-15 23:29:09 +02:00
Andreas Haas e55a496f79 Merge pull request #8394 from eska014/fbo-depth-format
Fix FBO depth texture format
2017-04-15 15:52:26 +02:00
L. Krause 3e0f8bb254 Fix FBO depth texture format 2017-04-15 13:56:55 +02:00
gamemanj 0a4dde93d4 Apply is_ceiling/is_wall swap fix to 2D move_and_slide (minus explaination)
As it turns out, is_ceiling would be true when hitting a wall,
 and is_wall would be true momentarily when hitting a ceiling.

This makes a tiny one-line change to fix that.
Without trying to explain the code for anyone else having to
 mess around with it.
2017-04-15 10:24:36 +01:00
Thomas Herzog b7ce1601a3 Merge pull request #8411 from touilleMan/gdnative-vector2-vector3
[GDnative] Implement missing functions in gdnative vector2 and vector3 bindings
2017-04-15 01:38:38 +02:00
Emmanuel Leblond 7013cd984b
Correct indentation in gdnative vector2/3 2017-04-15 01:06:42 +02:00
Emmanuel Leblond e5f7f656d6
Implement missing functions in gdnative vector2 and vector3 bindings 2017-04-15 00:29:43 +02:00
Andreas Haas 065261cceb Merge pull request #8389 from volzhs/inspector-button-margin-master
Make buttons closer in Inspector panel
2017-04-14 17:52:18 +02:00
Andreas Haas 1a8f94edd4 Merge pull request #8370 from volzhs/fix-stylebox-master
Fix editor style box for ToolButton
2017-04-14 17:51:30 +02:00
Andreas Haas 6871ec708f Merge pull request #8393 from hpvb/fix-8081
Correct Variant::hash_compare()
2017-04-14 17:51:05 +02:00
Andreas Haas 4e7c5eb498 Merge pull request #8356 from volzhs/texture-view-master
Prevent to take too much space for long vertical texture
2017-04-14 17:50:29 +02:00
Andreas Haas 58edf26500 Merge pull request #8374 from nunodonato/killimport
Removed the deprecated Import menu from the main editor.
2017-04-14 17:50:16 +02:00
Hein-Pieter van Braam 8ff6e53833 Correct Variant::hash_compare()
There was a logic error in #7815 which made
Variant.hash_compare() == Variant.hash_compare() always true.
In an attempt to short-circuit the NaN check I made an (in hindsight) obvious
error: 10 == 12 || is_nan(10) == is_nan(12)

This will be true for all inputs, except for the NaN, not-NaN case. The macro
has been updated to now generate:

(10 == 12) || (is_nan(10) && is_nan(10))

so:

(10 == 12)   || (is_nan(10)  && is_nan(12))  = false
   False  or (False and False) is False
(10 == 10)   || (is_nan(10)  && is_nan(10))  = true
   True or (False and False) is True
(Nan == 10)  || (is_nan(NaN) && is_nan(10))  = false
   False or (True and False) is False
(Nan == Nan) || (is_nan(NaN) && is_nan(NaN)) = true
   False or (True and True) is True

Which is correct for all cases.

This bug was triggered because the hash function for floating point numbers
can very easily generate collisions for the tested Vector3(). I've also added
an extra hashing step to the float hash function to make this less likely to
occur.

This fixes #8081 and probably many more random weirdness.
2017-04-14 11:31:18 +02:00
Andreas Haas a96e795241 Merge pull request #8402 from neikeq/pr-fix-binds
PackedScene: Fix wrong DEFVAL
2017-04-14 03:14:01 +02:00
Andreas Haas 34a8547722 Merge pull request #8399 from mbrickn/patch-1
Changed a link from http to https
2017-04-14 02:19:38 +02:00
Ignacio Etcheverry 30835f9d37 PackedScene: Fix wrong DEFVAL 2017-04-14 02:18:38 +02:00
Maxwell Paul Brickner 984aeffd79 Changed a link from http to https
This is a really minor change. I just changed the link to the IRC channel login from http to https.

Thank you! ^ _ ^
2017-04-13 17:54:16 -04:00
volzhs 79182ced83 Make buttons closer in Inspector panel 2017-04-14 00:03:54 +09:00
Dobbias 5404e10803 replaced incompatible keywords/function 2017-04-13 16:46:16 +02:00
Ray Koopa 75f684bc17 Respect the expand margin for StyleBoTextures again. 2017-04-13 10:37:22 +02:00
Rémi Verschelde c4d3dd1a48 Merge pull request #8379 from karroffel/obj-import-reenable
re-enabled obj import
2017-04-12 22:27:19 +02:00
Karroffel 3bc09da0b1 re-enabled obj import 2017-04-12 22:22:13 +02:00
Nuno Donato 2025672e7b Removed the deprecated Import menu from the main editor. 2017-04-12 13:32:22 +01:00
volzhs 25a4daa5ce Fix editor style box for ToolButton 2017-04-12 12:40:16 +09:00
Rémi Verschelde e46af1e236 Merge pull request #8362 from bojidar-bg/fix-llvm-marshalls
Fix a pesky bug in marshalls.cpp/encode_variant
2017-04-11 20:07:58 +02:00
Bojidar Marinov c37840c69f
Fix a pesky bug in marshalls.cpp/encode_variant
Fixes #7556 running game from editor on LLVM builds.
2017-04-11 20:17:56 +03:00
volzhs 10608c0993 Show script filename instead of thumbnail 2017-04-12 00:07:35 +09:00
Thomas Herzog faee2fbf62 Merge pull request #8360 from karroffel/gdnative-string-c-functions
[GDNative] made string functions more C-friendly
2017-04-11 15:47:12 +02:00
Karroffel be2ad4f155 [GDNative] made string functions more C-friendly 2017-04-11 14:58:59 +02:00
volzhs c3e6759ca1 Prevent to take too much space for long vertical texture 2017-04-11 20:37:22 +09:00
Thomas Herzog 09ed1113fa Merge pull request #8352 from karroffel/gdnative-misc-fixes
[GDNative] misc fixes
2017-04-11 02:25:18 +02:00
Karroffel 544940c175 [GDNative] C API and generator fixes 2017-04-11 01:45:58 +02:00
Karroffel 7919ec6d89 [GDNative] re-enabled some init options 2017-04-11 01:45:58 +02:00