Comments (3)
Fix #43 #47 #42 outsource accuracy and draw force
from gothicfreeaim.
/* Retrieve draw force scaled between 0 and 100 (percent). Modify this function to alter the draw force calculation */
func int freeAimGetDrawForce() {
// Scale draw time between 0 and 100
var int drawForce; drawForce = MEM_Timer.totalTime - bowDrawOnset; // Check for how long the bow was drawn
if (drawForce > FREEAIM_DRAWTIME_MAX) { drawForce = 100; } // Fully drawn
else if (drawForce < FREEAIM_DRAWTIME_MIN) { drawForce = 0; } // No negative numbers
else { // Calculate the percentage [0, 100]
var int numerator; numerator = mkf(100 * (drawForce - FREEAIM_DRAWTIME_MIN));
var int denominator; denominator = mkf(FREEAIM_DRAWTIME_MAX - FREEAIM_DRAWTIME_MIN);
drawForce = roundf(divf(numerator, denominator));
};
// Possibly incorporate more factors like e.g. a quick-draw talent, weapon-specific stats, ...
// If adding more factors, keep in mind that the final drawForce must be in [0, 100]. This line could ensure that:
// if (drawForce > 100) { drawForce = 100; } else if (drawForce < 0) { drawForce = 0; };
return drawForce;
};
/* ... */
var int drawForce; drawForce = mulf(fracf(freeAimGetDrawForce(), 100), mkf(FREEAIM_TRAJECTORY_ARC_MAX));
FF_ApplyOnceExtData(dropProjectile, roundf(drawForce), 1, rBody);
bowDrawOnset = MEM_Timer.totalTime; // Reset draw timer
from gothicfreeaim.
The time of gravity activation should be outsourced into its own function, that can be easily modified and adjusted to talent and weapon.
from gothicfreeaim.
Related Issues (20)
- Crash when initializing GFA_SPELLS without GFA_STRAFING
- Focus mode is wrong when loading game in fight mode HOT 1
- Display reticle in virtual coordinates HOT 1
- Move "no focus no aim" to INI
- [Returning 2.0] Game crashes after intros while using Ninja GFA patch HOT 2
- Provide projectile pointer to config function HOT 1
- Add safety checks for common fixes HOT 1
- ITEM_FOCUS HOT 1
- New idea - free hiting
- [Gothic Multiplayer] AimRay intersection with player's camera bbox HOT 4
- [Singleplayer] FPS Drops / [Multiplayer] Not able to connect HOT 5
- Missing arrow after strafing or jump
- Spell/projectile does not fly towards reticle when behind obstacle
- Error when projectile collides with portal
- Error when NPC dies before projectile collides
- Implement alternative hit probability by camera shaking
- Implement gothic 2 controls for gothic 1
- Screen flickers while aiming or mouse movement
- Crash during Raven fight in Atariar Edition
- Reduce volume or remove sound of break projectiles shot by NPCs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gothicfreeaim.