This commit is contained in:
Johnny Bergström 2004-03-29 14:49:50 +00:00
parent ffae6da15e
commit 75c3cd90e0
3 changed files with 32 additions and 6 deletions

View File

@ -11,7 +11,9 @@
CCstrikePlayer::CCstrikePlayer()
{
Initialize();
modelled = false;
inspectModel = false;
online = false;
}
bool CCstrikePlayer::GetModelled()

View File

@ -123,7 +123,7 @@ static cell AMX_NATIVE_CALL cs_get_user_money(AMX *amx, cell *params) // cs_get_
}
// Return money
return (int)*((int *)pPlayer->pvPrivateData + OFFSET_CSMONEY);
return *((int *)pPlayer->pvPrivateData + OFFSET_CSMONEY);
}
static cell AMX_NATIVE_CALL cs_get_user_deaths(AMX *amx, cell *params) // cs_get_user_deaths(index); = 1 param
@ -1329,8 +1329,6 @@ void ClientDisconnect(edict_t *pEntity) {
void ClientUserInfoChanged(edict_t *pEntity, char *infobuffer) {
int index = ENTINDEX(pEntity);
if (!g_players[index].GetOnline())
g_players[index].SetOnline(true);
if(g_players[index].GetModelled() && pEntity->v.deadflag == DEAD_NO) {
RETURN_META(MRES_SUPERCEDE);
@ -1362,6 +1360,27 @@ C_DLLEXPORT int GetEntityAPI2(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersi
return(TRUE);
}
/****GetEntityAPI2_Post**********************************************************/
void ClientUserInfoChanged_Post( edict_t *pEntity, char *infobuffer ) {
int index = ENTINDEX(pEntity);
if (!g_players[index].GetOnline())
g_players[index].SetOnline(true);
RETURN_META(MRES_IGNORED);
}
DLL_FUNCTIONS gFunctionTable_Post;
C_DLLEXPORT int GetEntityAPI2_Post( DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion ) {
gFunctionTable_Post.pfnClientUserInfoChanged = ClientUserInfoChanged_Post;
if(*interfaceVersion!=INTERFACE_VERSION) {
LOG_ERROR(PLID, "GetEntityAPI2_Post version mismatch; requested=%d ours=%d", *interfaceVersion, INTERFACE_VERSION);
*interfaceVersion = INTERFACE_VERSION;
return(FALSE);
}
memcpy( pFunctionTable, &gFunctionTable_Post, sizeof( DLL_FUNCTIONS ) );
return(TRUE);
}
/******************************************************************************************/
C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_t *pMetaUtilFuncs) {
*pPlugInfo = &Plugin_info;
@ -1384,6 +1403,7 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, m
}
gMetaFunctionTable.pfnGetEntityAPI2 = GetEntityAPI2;
gMetaFunctionTable.pfnGetEntityAPI2_Post = GetEntityAPI2_Post;
gMetaFunctionTable.pfnGetEngineFunctions = GetEngineFunctions;
memcpy(pFunctionTable, &gMetaFunctionTable, sizeof(META_FUNCTIONS));

View File

@ -56,7 +56,7 @@ LINK32=link.exe
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Cmds=echo Copying dll... copy Release\cstrike.dll K:\S\cstrike\addons\amxx\modules\cstrike_amx.dll echo Copying inc... copy ..\plugins\include\cstrike.inc K:\S\cstrike\addons\amxx\scripting\include\
PostBuild_Cmds=echo Copying dll... copy Release\cstrike.dll K:\S\cstrike\addons\amxx\modules\cstrike_amx.dll echo Copying inc... copy ..\plugins\include\cstrike.inc K:\S\cstrike\addons\amxx\scripting\include\
# End Special Build Tool
!ELSEIF "$(CFG)" == "cstrike - Win32 Debug"
@ -83,7 +83,11 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"Debug/cstrike_amx_debug.dll" /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"Debug/cstrike_amx.dll" /pdbtype:sept
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Cmds=copy Debug/cstrike_amx.dll k:\s\cstrike\addons\amxx\modules\ copy ..\plugins\include\cstrike.inc k:\s\cstrike\addons\amxx\scripting\include\
# End Special Build Tool
!ENDIF