AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Orpheu Hook not getting called? [PM_PlayStepSound] (https://forums.alliedmods.net/showthread.php?t=312298)

heroicpower7613 11-25-2018 15:12

Orpheu Hook not getting called? [PM_PlayStepSound]
 
hey what's going on jake paulers?

anyway I'm having a little complication here, basically OnPM_PlayStepSound doesn't get called ever in my public server.
I tested it with 2 public linux servers, they are from different hosts as well and it doesn't work in either of them.

however it gets called fine in my listen server? what the heck?
the orpheu and amxx versions are exactly the same:
Spoiler


I tried removing all plugins except this one in my public server and it still doesn't get called so its not anything with other plugins.

there is no errors with anything and the plugin is also running fine but this hook just doesn't get called.

so the situation is that it works in my listenserver but not in any public server.
what's going on? is there a fix for this?

here's the code
PHP Code:

#include <amxmodx>
#include <orpheu_stocks>

#define PLUGIN             "Jump Sound Blocker"
#define VERSION         "1.0.2"
#define AUTHOR             "hornet"

new OrpheuStruct:g_ppmove;

public 
plugin_init() 
{
    
register_pluginPLUGINVERSIONAUTHOR );
    
    
OrpheuRegisterHookOrpheuGetDLLFunction("pfnPM_Move""PM_Move"), "OnPM_Move" );
    
OrpheuRegisterHookOrpheuGetFunction("PM_PlayStepSound"), "OnPM_PlayStepSound" );
}

public 
OrpheuHookReturn:OnPM_Move(OrpheuStruct:ppmoveserver)
{
    
g_ppmove ppmove;
}

public 
OrpheuHookReturn:OnPM_PlayStepSound(iStepFloat:flVol)
{
        
//this doesn't get called
    
new iPlayer OrpheuGetStructMember(g_ppmove"player_index") + 1;

    
client_print(0print_chat"onstepsounds");
    
client_print(iPlayerprint_chat"onstepsounds");
    
    return 
OrpheuIgnored;


edit: here's the signature
https://forums.alliedmods.net/showthread.php?t=185220

edit again: both of the public servers are actually linux and my listenserver is windows

heroicpower7613 12-09-2018 08:32

Re: Orpheu Hook not getting called? [PM_PlayStepSound]
 
so.... nobody knows?

HamletEagle 12-09-2018 09:17

Re: Orpheu Hook not getting called? [PM_PlayStepSound]
 
I messed a bit with that function some months ago, and from what I recall my observations match yours: works on windows, not on linux. Likely the function got inlined due to optimizations.

heroicpower7613 12-09-2018 12:01

Re: Orpheu Hook not getting called? [PM_PlayStepSound]
 
is there any way to get it working on linux then?

HamletEagle 12-09-2018 13:20

Re: Orpheu Hook not getting called? [PM_PlayStepSound]
 
Yes, it is, you need to go back to the function that calls PM_PlayStepSound and hook that instead. Then you may need to redo some code from that function in order to get the information that would be available in PM_PlayStepSound.
It's not hard if you are familiar with reading code from regamedll.


All times are GMT -4. The time now is 07:37.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.