TheStarport / FLHook

A Server Improvement for Freelancer.
GNU General Public License v3.0
30 stars 15 forks source link

Remove unwanted offsets from CrashCatcher.cpp #385

Closed IrateRedKite closed 8 months ago

IrateRedKite commented 8 months ago

I've removed offsets from CrashCatcher.cpp that relate to NPC spawn distance and maximum scan range. These offsets are often adjusted server-side by mods, and frustratingly, crash catcher removes them. This has caused problems before, both for BMOD and other mods in the past (https://the-starport.com/forums/topic/6165/npc-spawn-distance/2?_=1705854248325).

Changes here link to #327 and should be propagated to 4.1, I would suggest maybe sticking these patches in core with a config option for server owners.

The offset adjustments are made in server.dll and are as follows:

0x86AEC 0x84018 0xD3D6E 0x58F46

IrateRedKite commented 8 months ago

@oliverpechey Would you just be able to confirm this one is alright, as I think this will have much more of a potential impact on vanilla servers than it will modded ones.

oliverpechey commented 8 months ago

Can we not just make them configurable instead of removing them? Don't wanna remove them if they're not in core yet.

IrateRedKite commented 8 months ago

Can we not just make them configurable instead of removing them? Don't wanna remove them if they're not in core yet.

Was afraid you'd say this! I'll look at getting a config for CrashCatcher done this week. keen to get this merged as right now this specific offset causes issues with BMOD and we have to have a divergent plugin for it.

IrateRedKite commented 8 months ago

I've updated the PR with a configuration option for CrashCatcher and these 3 offsets. This needs to be moved to core come 4.1 though!