Skip to content

Enable lightsource_cone only for the player #27

@BC46

Description

@BC46

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions