This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch upstream/latest
in repository colobot.

commit 0ee86c3d15a2faedb0b586e889be2d670beae4f5
Author: krzys-h <[email protected]>
Date:   Thu Jan 8 19:21:02 2015 +0100

    Fixed loading scripts in produce() (#418)
---
 src/script/scriptfunc.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp
index 4942069..666539b 100644
--- a/src/script/scriptfunc.cpp
+++ b/src/script/scriptfunc.cpp
@@ -1702,7 +1702,9 @@ bool CScriptFunctions::rProduce(CBotVar* var, CBotVar* 
result, int& exception, v
     
     if (name[0] != 0)
     {
-        object->ReadProgram(0, static_cast<const char*>(name));
+        //TODO: Add %lvl% support
+        std::string name2 = std::string("ai/")+name;
+        object->ReadProgram(0, name2.c_str());
         object->RunProgram(0);
     }
     

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to