diff --git a/src/botlib.cpp b/src/botlib.cpp index 02dc84c..4fe3a14 100644 --- a/src/botlib.cpp +++ b/src/botlib.cpp @@ -2977,7 +2977,7 @@ void Bot::update () { if (cv_tkpunish.int_ () != 2 || util.isFakeClient (game.entityOfIndex (m_voteKickIndex))) { return; } - edict_t *killer = game.entityOfIndex (m_lastVoteKick); + auto killer = game.entityOfIndex (m_lastVoteKick); ++killer->v.frags; MDLL_ClientKill (killer); diff --git a/src/manager.cpp b/src/manager.cpp index 3d9abcf..6f6a918 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -91,6 +91,7 @@ void BotManager::createKillerEntity () { void BotManager::destroyKillerEntity () { if (!game.isNullEntity (m_killerEntity)) { engfuncs.pfnRemoveEntity (m_killerEntity); + m_killerEntity = nullptr; } }