Skip to content

Commit

Permalink
avoid sending LEAVEBATTLE twice when closing own battle
Browse files Browse the repository at this point in the history
  • Loading branch information
silentwings authored and silentwings committed Feb 20, 2019
1 parent 8b218eb commit f73b094
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/battle.cpp
Expand Up @@ -55,7 +55,6 @@ Battle::~Battle()
{
wxDELETE(m_timer);
wxDELETE(m_autohost_manager);
Leave();
if (m_is_self_in) {
GlobalEventManager::Instance()->UnSubscribe(this, GlobalEventManager::OnUnitsyncReloaded);
m_is_self_in = false;
Expand Down
2 changes: 1 addition & 1 deletion src/tasserver.cpp
Expand Up @@ -1393,7 +1393,7 @@ void TASServer::FinalizeJoinBattle()
}


void TASServer::LeaveBattle(const int& /*unused*/)
void TASServer::LeaveBattle(const int& /*battle_id*/)
{
//LEAVEBATTLE
slLogDebugFunc("");
Expand Down

0 comments on commit f73b094

Please sign in to comment.