Freelancer has a check at file offset 131D2B in FL.exe that checks if the lightsources should be activated for the player. However, the function always returns false because the GetPlayerIObjRW function returns a nullptr at this point. Turns out there exists a check that would work correctly in this case. It works by comparing the simple ID, see usage here: 0x5289FE.
Fix by writing "lea ecx, [ebx + 0x8]". In funtion hook call [iObjRw_vftable + 0x20] and compare result to *(00673378) (csimple id), but check if result is 0 first.
Freelancer has a check at file offset
131D2Bin FL.exe that checks if the lightsources should be activated for the player. However, the function always returns false because theGetPlayerIObjRWfunction returns a nullptr at this point. Turns out there exists a check that would work correctly in this case. It works by comparing the simple ID, see usage here:0x5289FE.