mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
added to register_message
This commit is contained in:
parent
f8f553d485
commit
f51ca46646
@ -986,10 +986,12 @@ public:
|
||||
return argcount;
|
||||
}
|
||||
|
||||
int msg_dest;
|
||||
int target;
|
||||
|
||||
private:
|
||||
int argcount;
|
||||
int msgID;
|
||||
int msg_dest;
|
||||
const float *pOrigin;
|
||||
edict_t *v;
|
||||
argStack *CHeadArg;
|
||||
|
@ -25,7 +25,7 @@
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;ENGINE_EXPORTS"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Release/engine.pch"
|
||||
@ -88,7 +88,7 @@
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;ENGINE_EXPORTS"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Debug/engine.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
@ -172,10 +172,10 @@
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
<File
|
||||
RelativePath="engine_amx.def">
|
||||
RelativePath="engine.inc">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="engine.inc">
|
||||
RelativePath="engine_amx.def">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
|
@ -3163,6 +3163,7 @@ void MessageBegin(int msg_dest, int msg_type, const float *pOrigin, edict_t *ed)
|
||||
if (isMsgHooked[msg_type] && !inHookProcess) {
|
||||
inHookProcess = msg_type;
|
||||
msgd = new MessageInfo(msg_dest, msg_type, pOrigin, ed);
|
||||
msgd->target = ENTINDEX(ed);
|
||||
RETURN_META(MRES_SUPERCEDE);
|
||||
}
|
||||
}
|
||||
@ -3183,7 +3184,7 @@ void MessageEnd(void) {
|
||||
|
||||
if (inHookProcess) {
|
||||
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) {
|
||||
RETURN_META(MRES_SUPERCEDE);
|
||||
} else if (iResult & 1) {
|
||||
@ -3374,6 +3375,7 @@ void ServerDeactivate() {
|
||||
preThink.clear();
|
||||
clientKill.clear();
|
||||
Msgs.clear();
|
||||
clientImpulse.clear();
|
||||
|
||||
int i;
|
||||
// Reset message blocks.
|
||||
|
Loading…
Reference in New Issue
Block a user