Added client_kill() forward.
Added i586 glibc2.3 engine module.
This commit is contained in:
parent
238cbbd0fb
commit
ef64f83917
|
@ -54,6 +54,7 @@ struct AmxCall {
|
||||||
|
|
||||||
std::vector<AmxCall> vTouchCallList;
|
std::vector<AmxCall> vTouchCallList;
|
||||||
std::vector<AmxCall> vServerFrameCallList;
|
std::vector<AmxCall> vServerFrameCallList;
|
||||||
|
std::vector<AmxCall> vCliKillList;
|
||||||
|
|
||||||
//This was originally by VexD
|
//This was originally by VexD
|
||||||
//Thank you for an excellent piece of work, VexD!
|
//Thank you for an excellent piece of work, VexD!
|
||||||
|
@ -2555,6 +2556,17 @@ void Touch(edict_t *pToucher, edict_t *pTouched) {
|
||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Added by BAILOPAN. ClientKill() forward.
|
||||||
|
void ClientKill(edict_t *pEntity)
|
||||||
|
{
|
||||||
|
for(std::vector<AmxCall>::iterator i = vCliKillList.begin(); i != vCliKillList.end(); i++) {
|
||||||
|
cell iRetVal = 0;
|
||||||
|
AMX_EXEC(&i->pPlugin->amx, &iRetVal, i->iFunctionIdx, 1, ENTINDEX(pEntity));
|
||||||
|
}
|
||||||
|
|
||||||
|
RETURN_META(MRES_IGNORED);
|
||||||
|
}
|
||||||
|
|
||||||
// ClientDisconnect. Reinitialize the PlayerInfo struct for that player.
|
// ClientDisconnect. Reinitialize the PlayerInfo struct for that player.
|
||||||
void ClientDisconnect(edict_t *pEntity) {
|
void ClientDisconnect(edict_t *pEntity) {
|
||||||
memset(PlInfo[ENTINDEX(pEntity)].szModel, 0x0, sizeof(PlInfo[ENTINDEX(pEntity)].szModel));
|
memset(PlInfo[ENTINDEX(pEntity)].szModel, 0x0, sizeof(PlInfo[ENTINDEX(pEntity)].szModel));
|
||||||
|
@ -2612,8 +2624,9 @@ void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax) {
|
||||||
plugin_t *pCurrent = FIND_PLUGIN_BY_INDEX(0, 0);
|
plugin_t *pCurrent = FIND_PLUGIN_BY_INDEX(0, 0);
|
||||||
int iFunctionIndex = 0;
|
int iFunctionIndex = 0;
|
||||||
|
|
||||||
// Search for plugins that have my forward functions.
|
// Search for plugins that have the forward functions.
|
||||||
while(pCurrent){ //Iterate Plugin List
|
while(pCurrent){ //Iterate Plugin List
|
||||||
|
//THIS IS FOR BACKWARD COMPATIBILITY
|
||||||
if(AMX_FINDPUBLIC(&pCurrent->amx, "vexd_pfntouch", &iFunctionIndex) == AMX_ERR_NONE) {
|
if(AMX_FINDPUBLIC(&pCurrent->amx, "vexd_pfntouch", &iFunctionIndex) == AMX_ERR_NONE) {
|
||||||
AmxCall sNewCall;
|
AmxCall sNewCall;
|
||||||
sNewCall.pPlugin = pCurrent;
|
sNewCall.pPlugin = pCurrent;
|
||||||
|
@ -2621,6 +2634,15 @@ void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax) {
|
||||||
vTouchCallList.push_back(sNewCall);
|
vTouchCallList.push_back(sNewCall);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iFunctionIndex = 0;
|
||||||
|
|
||||||
|
if(AMX_FINDPUBLIC(&pCurrent->amx, "pfntouch", &iFunctionIndex) == AMX_ERR_NONE) {
|
||||||
|
AmxCall sNewCall;
|
||||||
|
sNewCall.pPlugin = pCurrent;
|
||||||
|
sNewCall.iFunctionIdx = iFunctionIndex;
|
||||||
|
vTouchCallList.push_back(sNewCall);
|
||||||
|
}
|
||||||
|
|
||||||
iFunctionIndex = 0;
|
iFunctionIndex = 0;
|
||||||
|
|
||||||
if(AMX_FINDPUBLIC(&pCurrent->amx, "ServerFrame", &iFunctionIndex) == AMX_ERR_NONE) {
|
if(AMX_FINDPUBLIC(&pCurrent->amx, "ServerFrame", &iFunctionIndex) == AMX_ERR_NONE) {
|
||||||
|
@ -2630,6 +2652,15 @@ void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax) {
|
||||||
vServerFrameCallList.push_back(sNewCall);
|
vServerFrameCallList.push_back(sNewCall);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iFunctionIndex = 0;
|
||||||
|
|
||||||
|
if (AMX_FINDPUBLIC(&pCurrent->amx, "client_kill", &iFunctionIndex) == AMX_ERR_NONE) {
|
||||||
|
AmxCall sNewCall;
|
||||||
|
sNewCall.pPlugin = pCurrent;
|
||||||
|
sNewCall.iFunctionIdx = iFunctionIndex;
|
||||||
|
vCliKillList.push_back(sNewCall);
|
||||||
|
}
|
||||||
|
|
||||||
iFunctionIndex = 0;
|
iFunctionIndex = 0;
|
||||||
pCurrent = pCurrent->next;
|
pCurrent = pCurrent->next;
|
||||||
}
|
}
|
||||||
|
@ -2645,6 +2676,7 @@ void ServerDeactivate(void) {
|
||||||
// from map-to-map.
|
// from map-to-map.
|
||||||
vTouchCallList.clear();
|
vTouchCallList.clear();
|
||||||
vServerFrameCallList.clear();
|
vServerFrameCallList.clear();
|
||||||
|
vCliKillList.clear();
|
||||||
|
|
||||||
// Reset Lights.
|
// Reset Lights.
|
||||||
memset(GlInfo.szLastLights, 0x0, 128);
|
memset(GlInfo.szLastLights, 0x0, 128);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user