Provide projectile pointer to config function
szapp opened this issue · 1 comments
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:
- Custom collisions
- Reusable projectiles
- Critical hits
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.