- Joined
- Aug 13, 2008
- Messages
- 185
- Reaction score
- 0
- Points
- 31
- Location
- Chicago
- Website
- www.frogisis.com
I'm currently working again on my second add-on, a funky take on the "realistic interplanetary spaceship" shape we're all familiar with, to teach myself C++, something I've never used before.
Some beacons, I thought, would really set off the design and make it more interesting to look at, so I scoured the internet and after a reading a lot of tutorials and posts on this and other forums, I finally figured out some beacon code that compiles:
BEACONLIGHTSPEC winglight;
static VECTOR3 winglightpos = {0,10,0};
static VECTOR3 winglightcol = {1,0.5,0.5};
winglight.shape = BEACONSHAPE_DIFFUSE;
winglight.pos = &winglightpos;
winglight.col = &winglightcol;
winglight.size = 2;
winglight.falloff = 0.4;
winglight.period = 0;
winglight.active = true;
AddBeacon (&winglight);
(this is just a test to get the beacon to actually appear in the sim, not the final beacon I want.)
The only problem is that when I load up my new ship in my (clean installation!) of Orbiter, I get a CTD immediately, but if I prune out this code, and this code alone, everything works fine again. I did another little search for this problem, but didn't find anything and I think this is beyond my current skill level to solve on my own.
The added wrinkle is that the Orbiter log does not show anything particularly suspicious: It spools along fine and simply ends with:
Finished initialising world
Module Lodestone.dll [API v.060425] (the ship)
Finished initialising status
Finished initialising camera
Finished initialising panels
Finished setting up render state
....And then a CTD. Can anyone point out to me what I'm missing or not doing correctly here? The .ccp file for the ship is the only thing I've modified, but I read somewhere that for beacons I would have to add something to the .h file, but the post was incredibly vague about it and the example it gave was something specific to that other person's project, so I thought it wasn't relevant (and I wanted to let sleeping .h files lie.)
If someone could help me out with this, I think I'd consider the project done. I made some cargo containers to attach to the ship, and maybe I'll give coding that system a try, but if it turns out to be too hard I'll just go with the ol' Universal Cargo Deck. Thanks for taking the time to read.
Some beacons, I thought, would really set off the design and make it more interesting to look at, so I scoured the internet and after a reading a lot of tutorials and posts on this and other forums, I finally figured out some beacon code that compiles:
BEACONLIGHTSPEC winglight;
static VECTOR3 winglightpos = {0,10,0};
static VECTOR3 winglightcol = {1,0.5,0.5};
winglight.shape = BEACONSHAPE_DIFFUSE;
winglight.pos = &winglightpos;
winglight.col = &winglightcol;
winglight.size = 2;
winglight.falloff = 0.4;
winglight.period = 0;
winglight.active = true;
AddBeacon (&winglight);
(this is just a test to get the beacon to actually appear in the sim, not the final beacon I want.)
The only problem is that when I load up my new ship in my (clean installation!) of Orbiter, I get a CTD immediately, but if I prune out this code, and this code alone, everything works fine again. I did another little search for this problem, but didn't find anything and I think this is beyond my current skill level to solve on my own.
The added wrinkle is that the Orbiter log does not show anything particularly suspicious: It spools along fine and simply ends with:
Finished initialising world
Module Lodestone.dll [API v.060425] (the ship)
Finished initialising status
Finished initialising camera
Finished initialising panels
Finished setting up render state
....And then a CTD. Can anyone point out to me what I'm missing or not doing correctly here? The .ccp file for the ship is the only thing I've modified, but I read somewhere that for beacons I would have to add something to the .h file, but the post was incredibly vague about it and the example it gave was something specific to that other person's project, so I thought it wasn't relevant (and I wanted to let sleeping .h files lie.)
If someone could help me out with this, I think I'd consider the project done. I made some cargo containers to attach to the ship, and maybe I'll give coding that system a try, but if it turns out to be too hard I'll just go with the ol' Universal Cargo Deck. Thanks for taking the time to read.