remove death tracer upon disconnect

location is still stored until the client is closed or it's being overwritten by game.cpp when the player dies again
master
chmodsayshello 2022-09-18 12:20:10 +02:00 committed by GitHub
parent 67ebfcf2a5
commit a31d2b42c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "util/string.h"
#include "settings.h"
#include "profiler.h"
#include "client/render/core.h"
namespace con
{
@ -538,11 +539,13 @@ ConnectionCommandPtr ConnectionCommand::connect(Address address)
ConnectionCommandPtr ConnectionCommand::disconnect()
{
died = false;
return create(CONNCMD_DISCONNECT);
}
ConnectionCommandPtr ConnectionCommand::disconnect_peer(session_t peer_id)
{
died = false;
auto c = create(CONNCMD_DISCONNECT_PEER);
c->peer_id = peer_id;
return c;
@ -1415,6 +1418,7 @@ bool Connection::Connected()
void Connection::Disconnect()
{
died = false;
putCommand(ConnectionCommand::disconnect());
}