Raised This Month: $32 Target: $400
 8% 

Orpheu Hook not getting called? [PM_PlayStepSound]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
heroicpower7613
Member
Join Date: Nov 2016
Old 11-25-2018 , 15:12   Orpheu Hook not getting called? [PM_PlayStepSound]
Reply With Quote #1

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

Last edited by heroicpower7613; 12-09-2018 at 11:58.
heroicpower7613 is offline
heroicpower7613
Member
Join Date: Nov 2016
Old 12-09-2018 , 08:32   Re: Orpheu Hook not getting called? [PM_PlayStepSound]
Reply With Quote #2

so.... nobody knows?
heroicpower7613 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-09-2018 , 09:17   Re: Orpheu Hook not getting called? [PM_PlayStepSound]
Reply With Quote #3

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.
__________________

Last edited by HamletEagle; 12-09-2018 at 09:18.
HamletEagle is offline
heroicpower7613
Member
Join Date: Nov 2016
Old 12-09-2018 , 12:01   Re: Orpheu Hook not getting called? [PM_PlayStepSound]
Reply With Quote #4

is there any way to get it working on linux then?
heroicpower7613 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-09-2018 , 13:20   Re: Orpheu Hook not getting called? [PM_PlayStepSound]
Reply With Quote #5

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.
__________________
HamletEagle is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:00.


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