BSDocking for the plugin
-
basicly when you undock it position you next to the docking ship insted of the base when you undock
its only used when the docking ship is in the same system as the player undockingtry docking on the docking ship jump a few systems then undock
it isent used then HkBeamInSys is used insted -
thats what it dose simple all ready explained
basicly pub::SpaceObj::GetLocation(iTargetShip, g_Vlaunch, g_Mlaunch);
gets the docking ships coords
which i tested its geting the correct coords
then once it got them when you undock it usesnamespace HkIEngine { EXPORT bool __stdcall LaunchPosHook(uint iSpaceID, struct CEqObj &p1, Vector &p2, Matrix &p3, int iDock) { if(g_bInPlayerLaunch) { p2 = g_Vlaunch; p3 = g_Mlaunch; } p1.launch_pos(p2,p3,iDock); returncode = SKIPPLUGINS_NOFUNCTIONCALL; // we handled the command, return immediatly } }
p2 and p3 is the position in space when you undock
but for some reason it aint geting called
g_Vlaunch and g_Mlaunch defo have the correct position
i tested that to make sure you can test that doing this
PrintUserCmdText(iClientID, L"x %f",g_Vlaunch.x);
PrintUserCmdText(iClientID, L"y %f",g_Vlaunch.y);
PrintUserCmdText(iClientID, L"z %f",g_Vlaunch.z); -
PrintUserCmdText(iClientID, L"x %f",g_Vlaunch.x);
PrintUserCmdText(iClientID, L"y %f",g_Vlaunch.y);
PrintUserCmdText(iClientID, L"z %f",g_Vlaunch.z);I don’t really understand how that code would work, seeing as it relies on iClientID which LaunchPosHook does not tell you?
-
//carrier not docked
look for thatPrintUserCmdText(iClientID, L"x %f",g_Vlaunch.x);
PrintUserCmdText(iClientID, L"y %f",g_Vlaunch.y);
PrintUserCmdText(iClientID, L"z %f",g_Vlaunch.z);
Server.PlayerLaunch(iShip, iClientID);that is calling the launch process and g_Vlaunch
at that point is loaded with the coords
it should then call LaunchPosHook
basicly it should be called auto in the Server.PlayerLaunch(iShip, iClientID);basicly on load up wee need to replace the original with owers
like i say it aint geting called so its failing -
namespace HkIEngine { EXPORT bool __stdcall LaunchPosHook(uint iSpaceID, struct CEqObj &p1, Vector &p2, Matrix &p3, int iDock) { if(g_bInPlayerLaunch) { p2 = g_Vlaunch; p3 = g_Mlaunch; } p1.launch_pos(p2,p3,iDock); returncode = SKIPPLUGINS_NOFUNCTIONCALL; // we handled the command, return immediatly } } ```Sorry, but I could not find it.
-