Sun May 27, 2007 5:04 pm by Dev
Alright, I'm still missing something here. From what I've gathered, CEqObj is a struct that provides a bunch of information about a particular object in space. My problem is that I can't call CEqObj::launch_pos() directly (the game crashes), so I'm guessing that I need to get a CEqObj pointer to the base in question and then call launch_pos of that:
--- originally I tried this:
Vector v; Matrix m;
launch_pos(v, m, baseID);
--- but I think I need something like this:
CEqObj *ptr = some_function(baseID, other_parameters);
Vector v; Matrix m;
ptr->launch_pos(v, m, int);
Am I correct in thinking this? And if so, what shoud some_function be? While I'm at it, I'm kind of a noob at importing dll functions. I tried duplicating the same style used elsewhere in common.h:
struct IMPORT CEqObj
{
public:
virtual bool launch_pos(class Vector &, class Matrix &, int) const;
}
but it doesn't want to cooperate. Maybe it's not a struct at all (a class?), or maybe I'm missing something else? I'm at a loss on this one, so any guidance would be most appreciated.
Another question, what on earth is the third argument of launch_pos? In common.dll t's listed as an integer, so originally I figured it would be the hash of either the base or the station. However, since that doesn't seem to work I'm no longer sure.
Also, launch_pos is listed as a const in common.dll; if this is true, I'm not sure why using the function would change anything (though it obviously must, since I've seen it in action).
One final question for now, where you do call launch_pos? I figured it would go in either BaseExit or PlayerLaunch (most likely the latter), but since you have the answer already I might as well ask. Thanks for everything, by the way; this is really amazing stuff.