added to register_message

This commit is contained in:
David Anderson 2004-04-21 21:18:42 +00:00
parent f8f553d485
commit f51ca46646
3 changed files with 10 additions and 6 deletions

View File

@ -986,10 +986,12 @@ public:
return argcount; return argcount;
} }
int msg_dest;
int target;
private: private:
int argcount; int argcount;
int msgID; int msgID;
int msg_dest;
const float *pOrigin; const float *pOrigin;
edict_t *v; edict_t *v;
argStack *CHeadArg; argStack *CHeadArg;

View File

@ -25,7 +25,7 @@
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;ENGINE_EXPORTS" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;ENGINE_EXPORTS"
StringPooling="TRUE" StringPooling="TRUE"
RuntimeLibrary="0" RuntimeLibrary="4"
EnableFunctionLevelLinking="TRUE" EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Release/engine.pch" PrecompiledHeaderFile=".\Release/engine.pch"
@ -88,7 +88,7 @@
Optimization="0" Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;ENGINE_EXPORTS" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;ENGINE_EXPORTS"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="5"
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Debug/engine.pch" PrecompiledHeaderFile=".\Debug/engine.pch"
AssemblerListingLocation=".\Debug/" AssemblerListingLocation=".\Debug/"
@ -172,10 +172,10 @@
Name="Resource Files" Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
<File <File
RelativePath="engine_amx.def"> RelativePath="engine.inc">
</File> </File>
<File <File
RelativePath="engine.inc"> RelativePath="engine_amx.def">
</File> </File>
</Filter> </Filter>
<Filter <Filter

View File

@ -3163,6 +3163,7 @@ void MessageBegin(int msg_dest, int msg_type, const float *pOrigin, edict_t *ed)
if (isMsgHooked[msg_type] && !inHookProcess) { if (isMsgHooked[msg_type] && !inHookProcess) {
inHookProcess = msg_type; inHookProcess = msg_type;
msgd = new MessageInfo(msg_dest, msg_type, pOrigin, ed); msgd = new MessageInfo(msg_dest, msg_type, pOrigin, ed);
msgd->target = ENTINDEX(ed);
RETURN_META(MRES_SUPERCEDE); RETURN_META(MRES_SUPERCEDE);
} }
} }
@ -3183,7 +3184,7 @@ void MessageEnd(void) {
if (inHookProcess) { if (inHookProcess) {
for (AmxCallList::AmxCall* i = Msgs.head; i; i = i->next) { for (AmxCallList::AmxCall* i = Msgs.head; i; i = i->next) {
AMX_EXEC(i->amx, &iResult, i->iFunctionIdx, 1, msg_type); AMX_EXEC(i->amx, &iResult, i->iFunctionIdx, 3, msg_type, msgd->msg_dest, msgd->target);
if (iResult & 2) { if (iResult & 2) {
RETURN_META(MRES_SUPERCEDE); RETURN_META(MRES_SUPERCEDE);
} else if (iResult & 1) { } else if (iResult & 1) {
@ -3374,6 +3375,7 @@ void ServerDeactivate() {
preThink.clear(); preThink.clear();
clientKill.clear(); clientKill.clear();
Msgs.clear(); Msgs.clear();
clientImpulse.clear();
int i; int i;
// Reset message blocks. // Reset message blocks.