From aa75a143fc51dfef32036464b929e061d2acb603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Bergstr=C3=B6m?= Date: Sun, 7 Aug 2005 13:38:34 +0000 Subject: [PATCH] This should fix the problem where bots can't hit players using weapons other than the knife. --- dlls/fun/fun.cpp | 6 +++++- dlls/fun/moduleconfig.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/fun/fun.cpp b/dlls/fun/fun.cpp index 941385ff..0fac9290 100755 --- a/dlls/fun/fun.cpp +++ b/dlls/fun/fun.cpp @@ -61,6 +61,7 @@ // ######## Utils: void FUNUTIL_ResetPlayer(int index) { + //MF_PrintSrvConsole("Resetting player index %d! maxclients: %d\n", index, gpGlobals->maxClients); for (int i = 1; i <= gpGlobals->maxClients; i++) { g_bodyhits[index][i] = (1<maxClients wasn't +// initialized to its proper value until some time after OnAmxxAttach(). In OnAmxxAttach() it always showed 0. /JGHG +void OnPluginsLoaded() { // Reset stuff - hopefully this should for (int i = 1; i <= gpGlobals->maxClients; i++) { // Reset all hitzones FUNUTIL_ResetPlayer(i); } } - /* void ClientConnectFakeBot(int index) { diff --git a/dlls/fun/moduleconfig.h b/dlls/fun/moduleconfig.h index d054c6b5..fa6965d3 100755 --- a/dlls/fun/moduleconfig.h +++ b/dlls/fun/moduleconfig.h @@ -32,7 +32,7 @@ //#define FN_AMXX_DETTACH OnAmxxDettach // All plugins loaded // Do forward functions init here (MF_RegisterForward) -// #define FN_AMXX_PLUGINSLOADED OnPluginsLoaded +#define FN_AMXX_PLUGINSLOADED OnPluginsLoaded /**** METAMOD ****/ // If your module doesn't use metamod, you may close the file now :)