Author Topic: Coding Question  (Read 969 times)

0 Members and 1 Guest are viewing this topic.

Offline r0nin

  • 24
I've got a problem, and I'm not sure exactly what will solve it.

I have coded a function similar to the:

 void do_subobj_destroyed_stuff( ship *ship_p, ship_subsys *subsys, vector* hitpos )

function found in code/ship/shiphit.cpp.  Originally, I called the function from a sexp in Fred, so Fred filled in the ship and subsystem pointers.  Unfortunately, I now need to call this function for the player's ship and I have to do it from the base code.

What I need to know is how to find and pass the player ship's pointer and the subsystem's pointer to the new function (the vector info is NULL, so it is not an issue).  I think player_ship is an external varialbe that contains the information I need, but other than a &player_ship for the first passed value, I'm stumped.  Any help on the format of the ship and susbsystem object would be great...
« Last Edit: June 01, 2002, 08:36:24 pm by 769 »
"Have code, will travail..."
Member of the Robotech FS2 Mod.