szapp / FreeAiming

Free aiming patch for Gothic, Gothic Sequel, Gothic 2 and Gothic 2 NotR based on GothicFreeAim
https://gfa.szapp.de/docs/Free-Aiming-Patch
Other
0 stars 0 forks source link

Do not hard code the values dependency constants #3

Open szapp opened 1 month ago

szapp commented 1 month ago

The assumption that the dependencies would always have the same values seems to fail for heavily modified projects.

Use the variable-overwrite trick (see bottom of linked file) and an initialization function to check the type of the symbols to assess whether they have been defined as constants before. If not, check the type of the symbol and set their content to the expected value.

Whether this is possible for the focus instances has to be researched: If an existing instance is re-defined as variable, what happens.