diff options
| author | George Marques | 2016-06-03 14:59:40 -0300 |
|---|---|---|
| committer | Rémi Verschelde | 2016-06-05 00:00:08 +0200 |
| commit | 47f8da5409eff998627e69ed82ce8db2ad887bfa (patch) | |
| tree | 27c233fd02ab7b44382ffad6529039fe6117eefb /modules/gdscript/gd_functions.cpp | |
| parent | 8ea940e99b3ec46adadac9f2366b1ee0a5a5bf81 (diff) | |
| download | godot-47f8da5409eff998627e69ed82ce8db2ad887bfa.tar.gz godot-47f8da5409eff998627e69ed82ce8db2ad887bfa.tar.zst godot-47f8da5409eff998627e69ed82ce8db2ad887bfa.zip | |
Diffstat (limited to 'modules/gdscript/gd_functions.cpp')
| -rw-r--r-- | modules/gdscript/gd_functions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp index 40dd8a5d9..fb4671501 100644 --- a/modules/gdscript/gd_functions.cpp +++ b/modules/gdscript/gd_functions.cpp @@ -1010,11 +1010,11 @@ void GDFunctions::call(Function p_func,const Variant **p_args,int p_arg_count,Va VALIDATE_ARG_NUM(1); VALIDATE_ARG_NUM(2); - Color color(*p_args[0],*p_args[1],*p_args[2]); + Color color((float)*p_args[0]/255.0f,(float)*p_args[1]/255.0f,(float)*p_args[2]/255.0f); if (p_arg_count==4) { VALIDATE_ARG_NUM(3); - color.a=*p_args[3]; + color.a=(float)*p_args[3]/255.0f; } r_ret=color; |
