Skip to content

Commit

Permalink
Use double for destiny m_targetDistance instead of uint32 (#295)
Browse files Browse the repository at this point in the history
* use double for destiny m_targetDistance instead of uint32; leverage halting after warp stop for slightly better stability

* add a warp sysbubble at each tick during warp; various formatting and logging improvements and fixes

* code cleanup/add comments
  • Loading branch information
charles-m-knox authored Oct 5, 2024
1 parent 3d61603 commit 0f2461e
Show file tree
Hide file tree
Showing 5 changed files with 461 additions and 172 deletions.
33 changes: 27 additions & 6 deletions src/eve-server/admin/SystemCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -930,21 +930,42 @@ PyResult Command_update(Client *pClient, CommandDB *db, EVEServiceManager &servi
}

PyResult Command_sendstate(Client *pClient, CommandDB *db, EVEServiceManager &services, const Seperator &args) {
if (!pClient->IsInSpace())
_log(COMMAND__MESSAGE, "SystemCommands::SendState() - checking if in space");
if (!pClient->IsInSpace()) {
throw CustomError ("You're not in space.");
if (pClient->GetShipSE()->DestinyMgr() == nullptr)
}

_log(COMMAND__MESSAGE, "SystemCommands::SendState() - checking if destiny manager is null");
if (pClient->GetShipSE()->DestinyMgr() == nullptr) {
_log(COMMAND__MESSAGE, "SystemCommands::SendState() - destiny manager is null, setting to null origin");
pClient->SetDestiny(NULL_ORIGIN);
if (pClient->GetShipSE()->SysBubble() == nullptr)
}

_log(COMMAND__MESSAGE, "SystemCommands::SendState() - checking if bubble is null");
if (pClient->GetShipSE()->SysBubble() == nullptr) {
_log(COMMAND__MESSAGE, "SystemCommands::SendState() - bubble is null, setting system id");
pClient->EnterSystem(pClient->GetSystemID());
}

_log(COMMAND__MESSAGE, "SystemCommands::SendState() - checking if session is changing");
if (pClient->IsSessionChange()) {
pClient->SendInfoModalMsg("Session Change Active. Wait %u seconds before issuing another command.",
pClient->GetSessionChangeTime());
return new PyString("SessionChange Active. Request Denied.");
pClient->SendInfoModalMsg(
"Session Change Active. Wait %u seconds before issuing another command.",
pClient->GetSessionChangeTime()
);

return new PyString("SessionChange Active. Request Denied.");
}

_log(COMMAND__MESSAGE, "SystemCommands::SendState() - setting state sent to false");
pClient->SetStateSent(false);

_log(COMMAND__MESSAGE, "SystemCommands::SendState() - sending SetState");
pClient->GetShipSE()->DestinyMgr()->SendSetState();

_log(COMMAND__MESSAGE, "SystemCommands::SendState() - setting session timer");
pClient->SetSessionTimer();

return new PyString("Update sent.");
}

Expand Down
Loading

0 comments on commit 0f2461e

Please sign in to comment.