- Joined
- Jan 13, 2008
- Messages
- 2,303
- Reaction score
- 6
- Points
- 38
- Location
- Atlanta, GA, USA, North America
Tonight, I was working on my first .dll craft and came across an odd problem when using the first implementation of AddExhaust where you don't have to define the exhaust positions and direction:
For whatever reason, the compiler didn't like it when I did this:
So I changed the 0 to 1. (thanks to Hielor, I've since learned not to include that argument when it has an = 0 or whatever) But when I did, the thrusters all appeared to be located about one or so meters along the dir axis from where they were defined. I got rid of the last argument altogether and the thrusters were thrusting at the correct points. I guess this is also a warning to newer programmers [like me] who may not know not to include that last argument.
Code:
//From the API Reference
UINT AddExhaust (
THRUSTER_HANDLE th,
double lscale,
double wscale,
SURFHANDLE tex = 0) const
tex texture handle for custom exhaust flames
To use a custom exhaust texture, set tex to a surface handle returned by
oapiRegisterExhaustTexture. If tex == 0, the default texture is used.
For whatever reason, the compiler didn't like it when I did this:
Code:
AddExhaust (th_rcs[0], rcsl, rcsw, 0);
So I changed the 0 to 1. (thanks to Hielor, I've since learned not to include that argument when it has an = 0 or whatever) But when I did, the thrusters all appeared to be located about one or so meters along the dir axis from where they were defined. I got rid of the last argument altogether and the thrusters were thrusting at the correct points. I guess this is also a warning to newer programmers [like me] who may not know not to include that last argument.