diff --git a/include/core.h b/include/core.h index b894c55..02c7688 100644 --- a/include/core.h +++ b/include/core.h @@ -1380,11 +1380,11 @@ private: Bot *m_bot; int m_state; int m_message; - int m_registerdMessages[NETMSG_BOTVOICE + 1]; + int m_registerdMessages[NETMSG_RESETHUD + 1]; public: NetworkMsg (void); - ~NetworkMsg (void) { }; + ~NetworkMsg (void) { }; void Execute (void *p); inline void Reset (void) { m_message = NETMSG_UNDEFINED; m_state = 0; m_bot = NULL; }; diff --git a/source/basecode.cpp b/source/basecode.cpp index 622f1e9..a85e4f4 100644 --- a/source/basecode.cpp +++ b/source/basecode.cpp @@ -3098,34 +3098,10 @@ void Bot::Think (void) if (yb_tkpunish.GetInt () != 2 || IsValidBot (EntityOfIndex (m_voteKickIndex))) return; - entvars_t *killer = VARS (EntityOfIndex (m_lastVoteKick)); + edict_t *killer = EntityOfIndex (m_lastVoteKick); - MESSAGE_BEGIN (MSG_PAS, SVC_TEMPENTITY, killer->origin); - WRITE_BYTE (TE_TAREXPLOSION); - WRITE_COORD (killer->origin.x); - WRITE_COORD (killer->origin.y); - WRITE_COORD (killer->origin.z); - MESSAGE_END (); - - MESSAGE_BEGIN (MSG_PVS, SVC_TEMPENTITY, killer->origin); - WRITE_BYTE (TE_LAVASPLASH); - WRITE_COORD (killer->origin.x); - WRITE_COORD (killer->origin.y); - WRITE_COORD (killer->origin.z); - MESSAGE_END (); - - MESSAGE_BEGIN (MSG_ONE, g_netMsg->GetId (NETMSG_SCREENFADE), NULL, ENT (killer)); - WRITE_SHORT (1 << 15); - WRITE_SHORT (1 << 10); - WRITE_SHORT (1 << 1); - WRITE_BYTE (100); - WRITE_BYTE (0); - WRITE_BYTE (0); - WRITE_BYTE (255); - MESSAGE_END (); - - killer->frags++; - MDLL_ClientKill (ENT (killer)); + killer->v.frags++; + MDLL_ClientKill (killer); } else if (m_voteMap != 0) // host wants the bots to vote for a map? { diff --git a/source/interface.cpp b/source/interface.cpp index 1c6cf3a..0936148 100644 --- a/source/interface.cpp +++ b/source/interface.cpp @@ -2702,7 +2702,7 @@ int pfnRegUserMsg (const char *name, int size) else if (strcmp (name, "BotVoice") == 0) g_netMsg->SetId (NETMSG_BOTVOICE, message); else if (strcmp (name, "ResetHUD") == 0) - g_netMsg->SetId (NETMSG_BOTVOICE, message); + g_netMsg->SetId (NETMSG_RESETHUD, message); return message; } @@ -3116,6 +3116,8 @@ DLL_GIVEFNPTRSTODLL GiveFnptrsToDll (enginefuncs_t *functionTable, globalvars_t if (!g_funcPointers || !g_entityAPI) TerminateOnMalloc (); + + GetEngineFunctions (functionTable, NULL); // give the engine functions to the other DLL... (*g_funcPointers) (functionTable, pGlobals);