Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Plugins/Public/bountyscan/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ struct USERCMD

USERCMD UserCmds[] =
{
{ L"/bountyscan", UserCmd_BountyScan, L"Usage: /bountyscan" },
{ L"/bountyscan", UserCmd_BountyScan, L"Usage: /bountyscan or /bs" },
{ L"/bs", UserCmd_BountyScan, L"Usage: /bountyscan or /bs" },
};

bool UserCmd_Process(uint iClientID, const wstring &wscCmd)
Expand Down
12 changes: 9 additions & 3 deletions Plugins/Public/mobiledocking_plugin/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ JettisonResult RemoveShipFromLists(const wstring& dockedShipName, bool forcedLau
PrintUserCmdText(dockedClientID, L"You've been forcefully jettisoned by the carrier.");
PrintUserCmdText(dockedClientID, L"Current home base: %ls", newBaseInfo.c_str());
}
Players[dockedClientID].iLastBaseID = idToDockedInfoMap[dockedClientID]->lastDockedSolar;
idToDockedInfoMap.erase(dockedClientID);

wstring& carrierName = nameToDockedInfoMap[dockedShipName].carrierName;
Expand Down Expand Up @@ -737,7 +736,14 @@ void __stdcall PlayerLaunch_AFTER(unsigned int ship, unsigned int client)

if (jettisonedShipsQueue.count(client))
{
HkBeamById(client, jettisonedShipsQueue.at(client));
CUSTOM_BASE_BEAM_STRUCT info;
info.iClientID = client;
info.iTargetBaseID = jettisonedShipsQueue.at(client);
Plugin_Communication(CUSTOM_BASE_BEAM, &info);
if (!info.bBeamed)
{
HkBeamById(client, jettisonedShipsQueue.at(client));
}
jettisonedShipsQueue.erase(client);
return;
}
Expand Down Expand Up @@ -1221,7 +1227,7 @@ void Plugin_Communication_CallBack(PLUGIN_MESSAGE msg, void* data)
if (msg == CUSTOM_MOBILE_DOCK_CHECK)
{
CUSTOM_MOBILE_DOCK_CHECK_STRUCT* mobileDockCheck = reinterpret_cast<CUSTOM_MOBILE_DOCK_CHECK_STRUCT*>(data);
if (idToDockedInfoMap.count(mobileDockCheck->iClientID))
if (idToDockedInfoMap.count(mobileDockCheck->iClientID) || jettisonedShipsQueue.count(mobileDockCheck->iClientID))
{
mobileDockCheck->isMobileDocked = true;
}
Expand Down
3 changes: 2 additions & 1 deletion Plugins/Public/munitioncntl/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ void ProcessGuided(FLPACKET_CREATEGUIDED& createGuidedPacket)
{
case NOTRACK_NOALERT:
{
const auto& projectile = reinterpret_cast<CGuided*>(CObject::Find(createGuidedPacket.iProjectileId, CObject::CGUIDED_OBJECT));
CGuided* projectile = reinterpret_cast<CGuided*>(CObject::Find(createGuidedPacket.iProjectileId, CObject::CGUIDED_OBJECT));
projectile->Release();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be after we call set_target to ensure we're not about to try to interact with free'd memory?

projectile->set_target(nullptr); //disable tracking, switch fallthrough to also disable alert
}
case TRACK_NOALERT:
Expand Down