Fix uninitialized variables in Line2D, JSONParseResult and TileMap
This commit is contained in:
parent
26f99beac3
commit
850a54a2a5
6 changed files with 8 additions and 3 deletions
|
@ -805,6 +805,9 @@ public:
|
||||||
|
|
||||||
void set_result(const Variant &p_result);
|
void set_result(const Variant &p_result);
|
||||||
Variant get_result() const;
|
Variant get_result() const;
|
||||||
|
|
||||||
|
JSONParseResult() :
|
||||||
|
error_line(-1) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class _JSON : public Object {
|
class _JSON : public Object {
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<member name="error" type="int" setter="set_error" getter="get_error" enum="Error">
|
<member name="error" type="int" setter="set_error" getter="get_error" enum="Error">
|
||||||
The error type if the JSON source was not successfully parsed. See the [@GlobalScope] [code]ERR_*[/code] constants.
|
The error type if the JSON source was not successfully parsed. See the [@GlobalScope] [code]ERR_*[/code] constants.
|
||||||
</member>
|
</member>
|
||||||
<member name="error_line" type="int" setter="set_error_line" getter="get_error_line" default="116547728">
|
<member name="error_line" type="int" setter="set_error_line" getter="get_error_line" default="-1">
|
||||||
The line number where the error occurred if JSON source was not successfully parsed.
|
The line number where the error occurred if JSON source was not successfully parsed.
|
||||||
</member>
|
</member>
|
||||||
<member name="error_string" type="String" setter="set_error_string" getter="get_error_string" default="""">
|
<member name="error_string" type="String" setter="set_error_string" getter="get_error_string" default="""">
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
<member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null">
|
<member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null">
|
||||||
The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style.
|
The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style.
|
||||||
</member>
|
</member>
|
||||||
<member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode" default="1101004800">
|
<member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode" default="0">
|
||||||
The style to render the [code]texture[/code] on the line. Use [code]LINE_TEXTURE_*[/code] constants.
|
The style to render the [code]texture[/code] on the line. Use [code]LINE_TEXTURE_*[/code] constants.
|
||||||
</member>
|
</member>
|
||||||
<member name="width" type="float" setter="set_width" getter="get_width" default="10.0">
|
<member name="width" type="float" setter="set_width" getter="get_width" default="10.0">
|
||||||
|
|
|
@ -286,7 +286,7 @@
|
||||||
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
|
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
|
||||||
The collision mask(s) for all colliders in the TileMap.
|
The collision mask(s) for all colliders in the TileMap.
|
||||||
</member>
|
</member>
|
||||||
<member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic" default="true">
|
<member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic" default="false">
|
||||||
If [code]true[/code], TileMap collisions will be handled as a kinematic body. If [code]false[/code], collisions will be handled as static body.
|
If [code]true[/code], TileMap collisions will be handled as a kinematic body. If [code]false[/code], collisions will be handled as static body.
|
||||||
</member>
|
</member>
|
||||||
<member name="collision_use_parent" type="bool" setter="set_collision_use_parent" getter="get_collision_use_parent" default="false">
|
<member name="collision_use_parent" type="bool" setter="set_collision_use_parent" getter="get_collision_use_parent" default="false">
|
||||||
|
|
|
@ -44,6 +44,7 @@ Line2D::Line2D() {
|
||||||
_end_cap_mode = LINE_CAP_NONE;
|
_end_cap_mode = LINE_CAP_NONE;
|
||||||
_width = 10;
|
_width = 10;
|
||||||
_default_color = Color(0.4, 0.5, 1);
|
_default_color = Color(0.4, 0.5, 1);
|
||||||
|
_texture_mode = LINE_TEXTURE_NONE;
|
||||||
_sharp_limit = 2.f;
|
_sharp_limit = 2.f;
|
||||||
_round_precision = 8;
|
_round_precision = 8;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1829,6 +1829,7 @@ TileMap::TileMap() {
|
||||||
half_offset = HALF_OFFSET_DISABLED;
|
half_offset = HALF_OFFSET_DISABLED;
|
||||||
use_parent = false;
|
use_parent = false;
|
||||||
collision_parent = NULL;
|
collision_parent = NULL;
|
||||||
|
use_kinematic = false;
|
||||||
navigation = NULL;
|
navigation = NULL;
|
||||||
y_sort_mode = false;
|
y_sort_mode = false;
|
||||||
occluder_light_mask = 1;
|
occluder_light_mask = 1;
|
||||||
|
|
Loading…
Reference in a new issue