mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 16:19:19 +02:00
ai order list size increase, random overcast value, minor bug fixes
This commit is contained in:
2
Driver.h
2
Driver.h
@@ -167,7 +167,7 @@ static const bool Aggressive = true;
|
|||||||
static const bool Easyman = false;
|
static const bool Easyman = false;
|
||||||
static const bool AIdriver = true;
|
static const bool AIdriver = true;
|
||||||
static const bool Humandriver = false;
|
static const bool Humandriver = false;
|
||||||
static const int maxorders = 32; // ilość rozkazów w tabelce
|
static const int maxorders = 64; // ilość rozkazów w tabelce
|
||||||
static const int maxdriverfails = 4; // ile błędów może zrobić AI zanim zmieni nastawienie
|
static const int maxdriverfails = 4; // ile błędów może zrobić AI zanim zmieni nastawienie
|
||||||
extern bool WriteLogFlag; // logowanie parametrów fizycznych
|
extern bool WriteLogFlag; // logowanie parametrów fizycznych
|
||||||
static const int BrakeAccTableSize = 20;
|
static const int BrakeAccTableSize = 20;
|
||||||
|
|||||||
@@ -187,14 +187,14 @@ auto python_taskqueue::fetch_renderer( std::string const Renderer ) ->PyObject *
|
|||||||
auto const path { substr_path( Renderer ) };
|
auto const path { substr_path( Renderer ) };
|
||||||
auto const file { Renderer.substr( path.size() ) };
|
auto const file { Renderer.substr( path.size() ) };
|
||||||
PyObject *renderer { nullptr };
|
PyObject *renderer { nullptr };
|
||||||
|
PyObject *rendererarguments { nullptr };
|
||||||
|
PyEval_AcquireLock();
|
||||||
|
{
|
||||||
if( m_main == nullptr ) {
|
if( m_main == nullptr ) {
|
||||||
ErrorLog( "Python Renderer: __main__ module is missing" );
|
ErrorLog( "Python Renderer: __main__ module is missing" );
|
||||||
goto cache_and_return;
|
goto cache_and_return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PyEval_AcquireLock();
|
|
||||||
{
|
|
||||||
PyObject *rendererarguments{ nullptr };
|
|
||||||
if( false == run_file( file, path ) ) {
|
if( false == run_file( file, path ) ) {
|
||||||
goto cache_and_return;
|
goto cache_and_return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,7 +162,15 @@ state_serializer::deserialize_atmo( cParser &Input, scene::scratch_data &Scratch
|
|||||||
std::string token { Input.getToken<std::string>() };
|
std::string token { Input.getToken<std::string>() };
|
||||||
if( token != "endatmo" ) {
|
if( token != "endatmo" ) {
|
||||||
// optional overcast parameter
|
// optional overcast parameter
|
||||||
Global.Overcast = clamp( std::stof( token ), 0.f, 2.f );
|
Global.Overcast = std::stof( token );
|
||||||
|
if( Global.Overcast < 0.f ) {
|
||||||
|
// negative overcast means random value in range 0-abs(specified range)
|
||||||
|
Global.Overcast =
|
||||||
|
Random(
|
||||||
|
clamp(
|
||||||
|
std::abs( Global.Overcast ),
|
||||||
|
0.f, 2.f ) );
|
||||||
|
}
|
||||||
// overcast drives weather so do a calculation here
|
// overcast drives weather so do a calculation here
|
||||||
// NOTE: ugly, clean it up when we're done with world refactoring
|
// NOTE: ugly, clean it up when we're done with world refactoring
|
||||||
simulation::Environment.compute_weather();
|
simulation::Environment.compute_weather();
|
||||||
|
|||||||
Reference in New Issue
Block a user