Raider style did make it attack with scouts a little more (they miss me at the start tho) but building a lab straight away and never building any constructers kind of buggers its chances

Moderators: hoijui, Moderators
Hi Silp,silp wrote:some more replays, you didn't get my mail (..@front.ru) hugh, did you?
http://rapidshare.com/files/1890436/demos.7z.html (1 lost with planes, 1 won using defense buildings only and 1 won trying a non-anti-AI-style except for not building aa).
Hmmm, you're right.AF wrote:Thats caused by notcheckign for error values returned by the engine, its why AAI OTAI and NTai all used to have huge red blips in the top left corner of their matrixes and sent attacks to the top elft corner. If you tried to get the position of a unit whose ID was invalid it would returnt he co-ordinates 0,1,0 or 0,0,0.
Code: Select all
#define ZeroVector float3(0,0,0)
#define UpVector float3(0,1,0)
Code: Select all
float3 position = unitpos;
if(position == UpVector) error!
Ok.In the C++ header files are defined the macros UpVector and ZeroVector
aka
Code:
#define ZeroVector float3(0,0,0)
#define UpVector float3(0,1,0)
And we do a simple check aka
Code:
float3 position = unitpos;
if(position == UpVector) error!
These are implemented in basictypes/AdvancedFloat3.cs and basictypes/Float3Helper.cs It's easier to implement them outside of the interface, to keep the interface stable.You may also want to extend the float3 C# class you use to also have all the features of the C++ version, such as the distance()/distance2D() functions normalize() and the dot product, and the overloads of the +,/,*,-, and == operators.
The Float3 class is in the CSAIInterfaces.dll. Modifying anything in this dll requires a Spring restart.But whats stopping you just putting them in the C# float3 class? Since your AI is totally C# theres nothing stoppign you just writting a convertor in managed C++ and not wrapping around at all, then just converting when you need to pass or retrieve a value from the interface.