Core/Battlefield: revert part of previous commit and correctly fix .bf stop crashing
This commit is contained in:
@@ -321,7 +321,7 @@ void BattlefieldWG::UpdateCounterVehicle(bool init)
|
|||||||
void BattlefieldWG::OnBattleEnd(bool endbytimer)
|
void BattlefieldWG::OnBattleEnd(bool endbytimer)
|
||||||
{
|
{
|
||||||
// Remove relic
|
// Remove relic
|
||||||
if (m_relic && m_relic->isSpawned())
|
if (m_relic)
|
||||||
m_relic->RemoveFromWorld();
|
m_relic->RemoveFromWorld();
|
||||||
m_relic = NULL;
|
m_relic = NULL;
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public:
|
|||||||
|
|
||||||
Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(battleid);
|
Battlefield* bf = sBattlefieldMgr->GetBattlefieldByBattleId(battleid);
|
||||||
|
|
||||||
if (!bf)
|
if (!bf || !bf->IsWarTime())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bf->EndBattle(true);
|
bf->EndBattle(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user