Skip to content

Commit 0f2461e

Browse files
Use double for destiny m_targetDistance instead of uint32 (#295)
* 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
1 parent 3d61603 commit 0f2461e

File tree

5 files changed

+461
-172
lines changed

5 files changed

+461
-172
lines changed

src/eve-server/admin/SystemCommands.cpp

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -930,21 +930,42 @@ PyResult Command_update(Client *pClient, CommandDB *db, EVEServiceManager &servi
930930
}
931931

932932
PyResult Command_sendstate(Client *pClient, CommandDB *db, EVEServiceManager &services, const Seperator &args) {
933-
if (!pClient->IsInSpace())
933+
_log(COMMAND__MESSAGE, "SystemCommands::SendState() - checking if in space");
934+
if (!pClient->IsInSpace()) {
934935
throw CustomError ("You're not in space.");
935-
if (pClient->GetShipSE()->DestinyMgr() == nullptr)
936+
}
937+
938+
_log(COMMAND__MESSAGE, "SystemCommands::SendState() - checking if destiny manager is null");
939+
if (pClient->GetShipSE()->DestinyMgr() == nullptr) {
940+
_log(COMMAND__MESSAGE, "SystemCommands::SendState() - destiny manager is null, setting to null origin");
936941
pClient->SetDestiny(NULL_ORIGIN);
937-
if (pClient->GetShipSE()->SysBubble() == nullptr)
942+
}
943+
944+
_log(COMMAND__MESSAGE, "SystemCommands::SendState() - checking if bubble is null");
945+
if (pClient->GetShipSE()->SysBubble() == nullptr) {
946+
_log(COMMAND__MESSAGE, "SystemCommands::SendState() - bubble is null, setting system id");
938947
pClient->EnterSystem(pClient->GetSystemID());
948+
}
949+
950+
_log(COMMAND__MESSAGE, "SystemCommands::SendState() - checking if session is changing");
939951
if (pClient->IsSessionChange()) {
940-
pClient->SendInfoModalMsg("Session Change Active. Wait %u seconds before issuing another command.",
941-
pClient->GetSessionChangeTime());
942-
return new PyString("SessionChange Active. Request Denied.");
952+
pClient->SendInfoModalMsg(
953+
"Session Change Active. Wait %u seconds before issuing another command.",
954+
pClient->GetSessionChangeTime()
955+
);
956+
957+
return new PyString("SessionChange Active. Request Denied.");
943958
}
944959

960+
_log(COMMAND__MESSAGE, "SystemCommands::SendState() - setting state sent to false");
945961
pClient->SetStateSent(false);
962+
963+
_log(COMMAND__MESSAGE, "SystemCommands::SendState() - sending SetState");
946964
pClient->GetShipSE()->DestinyMgr()->SendSetState();
965+
966+
_log(COMMAND__MESSAGE, "SystemCommands::SendState() - setting session timer");
947967
pClient->SetSessionTimer();
968+
948969
return new PyString("Update sent.");
949970
}
950971

0 commit comments

Comments
 (0)