diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-03-12 18:54:02 +0100 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2016-03-12 18:54:02 +0100 |
commit | be4d58e1203ae35dab97b14f08098f50998d4201 (patch) | |
tree | 98848bed6e08ecfeff2d90b0a234fbba2f29ac00 /servers/visual | |
parent | 801221d01b705103cac27e7a50e87312cedb8f18 (diff) | |
parent | 24bc7d8db7744589672b0b16b269e99160b64e32 (diff) |
Merge pull request #3956 from SaracenOne/receive_shadow_flag_fix
Fix 'FLAG_RECEIVE_SHADOWS' flag for GeometryInstances.
Diffstat (limited to 'servers/visual')
-rw-r--r-- | servers/visual/rasterizer.h | 1 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.cpp | 4 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.h | 3 |
3 files changed, 4 insertions, 4 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h index 276758ea95..194df9596a 100644 --- a/servers/visual/rasterizer.h +++ b/servers/visual/rasterizer.h @@ -546,6 +546,7 @@ public: bool depth_scale :8; bool billboard :8; bool billboard_y :8; + bool receive_shadows : 8; }; diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index 2ce0c9a360..6d293f0ce8 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -2734,7 +2734,7 @@ void VisualServerRaster::instance_geometry_set_flag(RID p_instance,InstanceFlags } break; case INSTANCE_FLAG_RECEIVE_SHADOWS: { - instance->receive_shadows=p_enabled; + instance->data.receive_shadows=p_enabled; } break; case INSTANCE_FLAG_DEPH_SCALE: { @@ -2786,7 +2786,7 @@ bool VisualServerRaster::instance_geometry_get_flag(RID p_instance,InstanceFlags } break; case INSTANCE_FLAG_RECEIVE_SHADOWS: { - return instance->receive_shadows; + return instance->data.receive_shadows; } break; case INSTANCE_FLAG_DEPH_SCALE: { diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index 77d5780c5f..06501d1b81 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -169,7 +169,6 @@ class VisualServerRaster : public VisualServer { AABB transformed_aabb; uint32_t object_ID; bool visible; - bool receive_shadows; bool visible_in_all_rooms; uint32_t layer_mask; float draw_range_begin; @@ -300,7 +299,7 @@ class VisualServerRaster : public VisualServer { update=false; visible=true; data.cast_shadows=SHADOW_CASTING_SETTING_ON; - receive_shadows=true; + data.receive_shadows=true; data.depth_scale=false; data.billboard=false; data.billboard_y=false; |