szapp / GothicFreeAim

Free aiming for the video game series Gothic
https://gfa.szapp.de
MIT License
36 stars 4 forks source link

Provide projectile pointer to config function #197

Closed szapp closed 4 years ago

szapp commented 4 years ago

Since the projectile is not accessible from the config functions as far, provide its pointer temporarily in a global variable. This way the function signatures remain untouched and backward compatibility to previous GFA versions is ensured.

Features that will benefit from this:

szapp commented 4 years ago

Config functions concerning draw force, accuracy, and recoil are excluded, because the projectile has not left the shooter. It's properties (like position or instance) are thus trivial to infer.

The config function dealing with initial base damage is the only shooting related function where the projectile pointer is provided The other config functions mentioned above can be called from this function. This offers - for example - to attach an effect to the projectile depending on the accuracy.