mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added a limit on path nodes for NPCs to NumPathNodes option
This commit is contained in:
@@ -250,10 +250,15 @@ long __fastcall Tilemap::make_path_func(fo::GameObject* srcObject, long sourceTi
|
||||
auto& dadData = m_dadData.begin();
|
||||
size_t pathCounter = 1;
|
||||
sfChild childData;
|
||||
|
||||
long node = 0;
|
||||
|
||||
if (maxNodes > maxPathNodes) maxNodes = maxPathNodes;
|
||||
|
||||
// Tweak for NumPathNodes option
|
||||
if (maxNodes > 10000 && srcObject != fo::var::obj_dude && maxNodes == maxPathNodes) {
|
||||
maxNodes = 10000; // limit for NPCs (maybe need less)
|
||||
}
|
||||
|
||||
// search path tiles
|
||||
while (true) {
|
||||
auto& pathData = m_pathData.begin();
|
||||
|
||||
@@ -1215,7 +1215,12 @@ void Graphics::init() {
|
||||
}
|
||||
if (Graphics::mode == 5 || Graphics::mode == 2) WinProc::SetMoveKeys();
|
||||
|
||||
if (HRP::Setting::IsEnabled()) HRP::MoviesScreen::SetDrawMode(Graphics::mode < 4);
|
||||
if (HRP::Setting::IsEnabled()) {
|
||||
HRP::MoviesScreen::SetDrawMode(Graphics::mode < 4);
|
||||
|
||||
// Reassign the function to avoid an unnecessary jump from the engine code
|
||||
LoadGameHook::OnBeforeGameInit() += []() { WinProc::SetWindowProc(); };
|
||||
}
|
||||
|
||||
WindowRender::init();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user