Ticket #2426: fix-trac-2426_v2.patch
File fix-trac-2426_v2.patch, 1.7 KB (added by , 10 years ago) |
---|
-
source/network/tests/test_Net.h
40 40 g_VFS = CreateVfs(20 * MiB); 41 41 TS_ASSERT_OK(g_VFS->Mount(L"", DataDir()/"mods"/"public", VFS_MOUNT_MUST_EXIST)); 42 42 TS_ASSERT_OK(g_VFS->Mount(L"cache", DataDir()/"_testcache")); 43 g_ScriptRuntime = ScriptInterface::CreateRuntime(128*MiB); 43 44 CXeromyces::Startup(); 44 45 45 46 // Need some stuff for terrain movement costs: … … 148 149 CNetServer server; 149 150 150 151 CScriptValRooted attrs; 151 scriptInterface.Eval("({mapType:'scenario',map:' _default',thing:'example'})", attrs);152 scriptInterface.Eval("({mapType:'scenario',map:'maps/scenarios/Saharan Oases',mapPath:'maps/scenarios/',thing:'example'})", attrs); 152 153 server.UpdateGameAttributes(attrs.get(), scriptInterface); 153 154 154 155 CNetClient client1(&client1Game); … … 210 211 CNetServer server; 211 212 212 213 CScriptValRooted attrs; 213 scriptInterface.Eval("({mapType:'scenario',map:' _default',thing:'example'})", attrs);214 scriptInterface.Eval("({mapType:'scenario',map:'maps/scenarios/Saharan Oases',mapPath:'maps/scenarios/',thing:'example'})", attrs); 214 215 server.UpdateGameAttributes(attrs.get(), scriptInterface); 215 216 216 217 CNetClient client1(&client1Game); -
source/scriptinterface/ScriptInterface.cpp
478 478 m_runtime(runtime) 479 479 { 480 480 JSBool ok; 481 482 ENSURE(m_runtime); 481 483 482 484 m_cx = JS_NewContext(m_runtime->m_rt, STACK_CHUNK_SIZE); 483 485 ENSURE(m_cx);