formation.c, formation.h, formationdef.h.
Reading it time after time i menaged to get some clues about how it works, but, unfortunately, i did not menage to find where all these functions are used. I added two new formations (echelon left and echelon right), but they arent used because the only function (that is, the only function i saw using formations) wich calls formationnew is hardcoded to call FT_LINE...
On the other hand the current formation code is very weak (no offense intended), as it tries to create a kind of flocking mechanism but using some kind of complex model using linked lists, etc... very confused code (or very confused programmer
I need some help to rewrite this formation bit from scratch, i plan to use a steering model for flocking (when units are not organized by the player but just happens to be walking towards the same general area) and for real military formations (selected by the user).
If the current code calculate damage based on the hit angle, formation is a good way to keep the best angle toward the expected enemy position and to keep turrets covering the possible angles of contact...
For more info about droid walking formations look at this site :
http://www.red3d.com/cwr/steer/gdc99/
There is a better flocking model without using the complex "formation list" model currently used by warzone.
But i am not able to scratch the current code cause i dont know where it is used (or if it is really used at all).
To implement what i am foreseeing i will need to rewrite the formation system completely, and plug the new model into the source tree (theres where i need help).
Thanks in advance.



