fixed stupid mistake, non-metamod mode works ok now

This commit is contained in:
jeefo 2015-06-20 12:56:22 +03:00
commit be7780949f
3 changed files with 8 additions and 30 deletions

View file

@ -1380,11 +1380,11 @@ private:
Bot *m_bot; Bot *m_bot;
int m_state; int m_state;
int m_message; int m_message;
int m_registerdMessages[NETMSG_BOTVOICE + 1]; int m_registerdMessages[NETMSG_RESETHUD + 1];
public: public:
NetworkMsg (void); NetworkMsg (void);
~NetworkMsg (void) { }; ~NetworkMsg (void) { };
void Execute (void *p); void Execute (void *p);
inline void Reset (void) { m_message = NETMSG_UNDEFINED; m_state = 0; m_bot = NULL; }; inline void Reset (void) { m_message = NETMSG_UNDEFINED; m_state = 0; m_bot = NULL; };

View file

@ -3098,34 +3098,10 @@ void Bot::Think (void)
if (yb_tkpunish.GetInt () != 2 || IsValidBot (EntityOfIndex (m_voteKickIndex))) if (yb_tkpunish.GetInt () != 2 || IsValidBot (EntityOfIndex (m_voteKickIndex)))
return; return;
entvars_t *killer = VARS (EntityOfIndex (m_lastVoteKick)); edict_t *killer = EntityOfIndex (m_lastVoteKick);
MESSAGE_BEGIN (MSG_PAS, SVC_TEMPENTITY, killer->origin); killer->v.frags++;
WRITE_BYTE (TE_TAREXPLOSION); MDLL_ClientKill (killer);
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));
} }
else if (m_voteMap != 0) // host wants the bots to vote for a map? else if (m_voteMap != 0) // host wants the bots to vote for a map?
{ {

View file

@ -2702,7 +2702,7 @@ int pfnRegUserMsg (const char *name, int size)
else if (strcmp (name, "BotVoice") == 0) else if (strcmp (name, "BotVoice") == 0)
g_netMsg->SetId (NETMSG_BOTVOICE, message); g_netMsg->SetId (NETMSG_BOTVOICE, message);
else if (strcmp (name, "ResetHUD") == 0) else if (strcmp (name, "ResetHUD") == 0)
g_netMsg->SetId (NETMSG_BOTVOICE, message); g_netMsg->SetId (NETMSG_RESETHUD, message);
return message; return message;
} }
@ -3116,6 +3116,8 @@ DLL_GIVEFNPTRSTODLL GiveFnptrsToDll (enginefuncs_t *functionTable, globalvars_t
if (!g_funcPointers || !g_entityAPI) if (!g_funcPointers || !g_entityAPI)
TerminateOnMalloc (); TerminateOnMalloc ();
GetEngineFunctions (functionTable, NULL);
// give the engine functions to the other DLL... // give the engine functions to the other DLL...
(*g_funcPointers) (functionTable, pGlobals); (*g_funcPointers) (functionTable, pGlobals);