mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-20 07:59:18 +02:00
python task queue texture binding tweak, python task queue crash fix
This commit is contained in:
@@ -29,6 +29,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "mtable.h"
|
||||
#include "Console.h"
|
||||
#include "application.h"
|
||||
#include "renderer.h"
|
||||
|
||||
namespace input {
|
||||
|
||||
@@ -449,9 +450,9 @@ PyObject *TTrain::GetTrainState() {
|
||||
auto const *mover = DynamicObject->MoverParameters;
|
||||
PyEval_AcquireLock();
|
||||
auto *dict = PyDict_New();
|
||||
PyEval_ReleaseLock();
|
||||
if( ( dict == nullptr )
|
||||
|| ( mover == nullptr ) ) {
|
||||
PyEval_ReleaseLock();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -581,6 +582,7 @@ PyObject *TTrain::GetTrainState() {
|
||||
PyDict_SetItemString( dict, "seconds", PyGetInt( simulation::Time.second() ) );
|
||||
PyDict_SetItemString( dict, "air_temperature", PyGetInt( Global.AirTemperature ) );
|
||||
|
||||
PyEval_ReleaseLock();
|
||||
return dict;
|
||||
}
|
||||
|
||||
@@ -6792,7 +6794,7 @@ bool TTrain::InitializeCab(int NewCabNo, std::string const &asFileName)
|
||||
( substr_path(renderername).empty() ? // supply vehicle folder as path if none is provided
|
||||
DynamicObject->asBaseDir + renderername :
|
||||
renderername ),
|
||||
material );
|
||||
GfxRenderer.Material( material ).texture1 );
|
||||
}
|
||||
// btLampkaUnknown.Init("unknown",mdKabina,false);
|
||||
} while (token != "");
|
||||
|
||||
Reference in New Issue
Block a user