Batch 4-b: verify combat on the port route
The fake server spawns a stray dog outside the village's BANPK safe disc and answers CG_TARGET/CG_ATTACK with GC_TARGET/GC_DAMAGE_INFO/GC_DEAD. port.login_flow and python_game_render_test hold the left button on it (MBF_SMART -> __OnPressActor) until it dies. Adds the host/test helper PythonBoot::Evaluate / Metin2PythonHost.evaluate. python_3d_surface: emission is now multiplied by the texture, like D3D's emissive-then-MODULATE, which removes the grey click-glow quad and the grey wash on characters. Damage numbers wait on CPythonSystem (4-g). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6ea0fa9889
commit
85e176bdd5
@@ -554,6 +554,25 @@ bool RunLine(const char* source, std::string* error)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Evaluate(const char* expression, std::string* result, std::string* error)
|
||||
{
|
||||
// A host/test helper with no 40250 counterpart: RunLine stores str(expression) in __main__, read back here.
|
||||
if (!RunLine(("__mt_evaluate = str(" + std::string(expression ? expression : "None") + ")").c_str(), error))
|
||||
return false;
|
||||
PyObject* main = PyImport_AddModule("__main__");
|
||||
PyObject* value = main ? PyObject_GetAttrString(main, "__mt_evaluate") : nullptr;
|
||||
if (!value || !PyString_Check(value))
|
||||
{
|
||||
Py_XDECREF(value);
|
||||
PyErr_Clear();
|
||||
return fail(error, "evaluate: no result");
|
||||
}
|
||||
result->assign(PyString_AsString(value));
|
||||
Py_DECREF(value);
|
||||
PyObject_DelAttrString(main, "__mt_evaluate");
|
||||
return true;
|
||||
}
|
||||
|
||||
void Stop()
|
||||
{
|
||||
if (!g_launcher)
|
||||
|
||||
Reference in New Issue
Block a user