-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework position commands #341
base: master
Are you sure you want to change the base?
Conversation
Added new macro that gets positionAGL for an object
Replaces getPos with the new POSITIONAGL macro, which is faster and more accurate
Added new macro to set object to AGL position
Replaces setPos with the new SETPOSITIONAGL macro, which should be more accurate
Nice PR. @diwako |
I like this solution. It seems to run significantly faster in most situations, with the odd exceptions of terrain objects gathered from nearestTerrainObjects, which is used in some hiding and fleeing functions. |
The function failed to pack weapons in some cases. Now it always packs. Relies on #341
Improves cover selection accuracy. Enhances many instances where the AI would pick wide open places to find cover. Relies on #341
Adds Vehicle smoke usage when dropping off troops, or Jinking/dodging danger Adds road checks to Assault, Flank and VehicleJink (to improve manoeuvrability) Adds pseudo-fire team based bounds to infantry flanking together with Vehicles. Relies on #341
@diwako |
* Fixes doGroupStaticPack The function failed to pack weapons in some cases. Now it always packs. Relies on #341 * Update fnc_doGroupStaticPack.sqf Reverted macro change
* Update fnc_tacticsFlank.sqf Improves cover selection accuracy. Enhances many instances where the AI would pick wide open places to find cover. Relies on #341 * Update fnc_tacticsFlank.sqf Revert macro change
* Improve vehicle maneuverability and defenses Adds Vehicle smoke usage when dropping off troops, or Jinking/dodging danger Adds road checks to Assault, Flank and VehicleJink (to improve manoeuvrability) Adds pseudo-fire team based bounds to infantry flanking together with Vehicles. Relies on #341 * Update fnc_tacticsAssault.sqf Reverted Macro changes * Removed macro references * Stop linter shouting - all hail HEMTT overlords
Allright. Review completed. Only to half a year. We like the concept and appreciate the thought that has gone into it. However we are suspect about the maintainability (see review time) and would like instead to implement non-macroed version in key positions. :) |
The way I see it, partially implementing this PR w/o macros is the less maintainable version. That way you'll end up with various position commands across the codebase, whereas with this PR you get universal getters / setters for the most common position format with singular definitions. |
Yeah, hard to argue against the complexity that those macros are simplifying. |
When merged this pull request will:
Replace all instances of
getPos
with the appropriate position command, usuallyASLtoAGL getPosASL
. This is becausegetPos
is not a suitable command for getting an objects 3D position due to inconsistent behaviour and slow execution.In my tests, the new macro is almost always faster than getPos. On open terrain execution time stays the same, but indoors the new method is 3 to 4 times faster.
Edit: Also added a macro alternative to
setPos
. This will set objects to AGL positions which is much more consistent.getPos
setPos
POSITIONAGL(object)
getPos
in favour of the new macroSETPOSITIONAGL(object,position)
setPos
in favour of the new macro