Raised This Month: $ Target: $400
 0% 

Module: Orpheu (v2.6.3)


Post New Thread Reply   
 
Thread Tools Display Modes
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 06-15-2010 , 07:32   Re: Module: Orpheu2.3a (Fixed for windows server editions)
Reply With Quote #471

Quote:
Originally Posted by Seta00 View Post
The client predicts when it should play the files based on other information, not a specific message.
Ok and what is this information?

Quote:
Originally Posted by Immortal_BLG View Post
I saw it in client.dll in function, that handles ReloadSound network message.
Code:
signed int __cdecl sub_19517B0(int a1, int a2, int a3, int a4)
{
  __int16 v4; // si@1
  signed int result; // eax@2
  float v6; // ST04_4@2
  float v7; // ST04_4@3

  BEGIN_READ(a4, a3);
  v4 = READ_BYTE();
  if ( (unsigned __int16)READ_BYTE() )
  {
    v6 = (double)v4 * 0.003921568859368563;
    dword_1A21BF8("weapons/generic_reload.wav", LODWORD(v6));
    result = 1;
  }
  else
  {
    v7 = (double)v4 * 0.003921568859368563;
    dword_1A21BF8("weapons/generic_shot_reload.wav", LODWORD(v7));
    result = 1;
  }
  return result;
}
This is client. I want serverside. Thanks anyway!
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Immortal_BLG
Member
Join Date: Feb 2010
Location: RUSSIA
Old 06-15-2010 , 07:37   Re: Module: Orpheu2.3a (Fixed for windows server editions)
Reply With Quote #472

Code:
int __cdecl CBasePlayerWeapon__ReloadSound(int a1)
{
  int result; // eax@1
  int v2; // eax@1
  float v3; // ST74_4@3
  float v4; // ST78_4@3
  float v5; // ST7C_4@3
  unsigned __int8 v6; // cf@4
  char v7; // zf@4
  int v8; // eax@4
  int v9; // edx@4
  signed int v10; // ecx@4
  int v11; // edi@4
  int v12; // esi@4
  int v13; // eax@4
  char v14; // zf@11
  signed int v15; // ecx@11
  int v16; // edi@11
  int v17; // esi@11
  void (__cdecl *v18)(_DWORD); // eax@16
  signed int v19; // [sp-10h] [bp-98h]@16
  int v20; // [sp+34h] [bp-54h]@4
  int i; // [sp+3Ch] [bp-4Ch]@1
  float v22; // [sp+60h] [bp-28h]@3
  float v23; // [sp+70h] [bp-18h]@1
  float v24; // [sp+74h] [bp-14h]@1
  float v25; // [sp+78h] [bp-10h]@1

  v2 = **(_DWORD **)(a1 + 180);
  v23 = *(float *)(v2 + 8);
  v24 = *(float *)(v2 + 12);
  v25 = *(float *)(v2 + 16);
  result = UTIL_FindEntityByClassname(0, "player");
  for ( i = result; result; i = result )
  {
    result = *(_DWORD *)result;
    if ( *(_DWORD *)(result + 420) == -2147483648 )
      break;
    if ( i != *(_DWORD *)(a1 + 180) )
    {
      v3 = v23 - *(float *)(result + 8);
      v4 = v24 - *(float *)(result + 12);
      v5 = v25 - *(float *)(result + 16);
      v22 = sqrt(v4 * v4 + v3 * v3 + v5 * v5);
      if ( v22 <= 512.0 )
      {
        (*(void (__cdecl **)(signed int, int, _DWORD, _DWORD))&g_engfuncs[184])(
          1,
          gmsgReloadSound,
          0,
          *(_DWORD *)(*(_DWORD *)i + 520));
        (*(void (__cdecl **)(_DWORD))&g_engfuncs[192])((unsigned __int8)(signed int)((1.0 - v22 * 0.001953125) * 255.0));
        v11 = (int)"weapon_m3";
        v10 = 10;
        v13 = *(_DWORD *)(gpGlobals + 152);
        v20 = v13;
        v9 = **(_DWORD **)a1;
        v12 = v9 + v13;
        v8 = 0;
        v6 = 0;
        v7 = 1;
        do
        {
          if ( !v10 )
            break;
          v6 = *(_BYTE *)v12 < *(_BYTE *)v11;
          v7 = *(_BYTE *)v12++ == *(_BYTE *)v11++;
          --v10;
        }
        while ( v7 );
        if ( !v7 )
        {
          v8 = -v6;
          LOBYTE(v8) = v8 | 1;
        }
        if ( !v8 )
          goto LABEL_24;
        v17 = v9 + v20;
        v16 = (int)"weapon_xm1014";
        v15 = 14;
        v14 = 1;
        do
        {
          if ( !v15 )
            break;
          v14 = *(_BYTE *)v17++ == *(_BYTE *)v16++;
          --v15;
        }
        while ( v14 );
        if ( !v14 )
        {
          v19 = 1;
          v18 = *(void (__cdecl **)(_DWORD))&g_engfuncs[192];
        }
        else
        {
LABEL_24:
          v19 = 0;
          v18 = *(void (__cdecl **)(_DWORD))&g_engfuncs[192];
        }
        v18(v19);
        (*(void (**)(void))&g_engfuncs[188])();
      }
    }
    result = UTIL_FindEntityByClassname(i, "player");
  }
  return result;
}
And this function called in CBasePlayerWeapon::DefaultReload()
Code:
signed int __cdecl CBasePlayerWeapon__DefaultReload(int a1, int a2, int a3, float a4)
{
  int v4; // edx@1
  signed int result; // eax@2
  int v6; // esi@6
  int v7; // eax@6
  int v8; // ST20_4@6
  long double v9; // fst7@6

  v4 = *(_DWORD *)(4 * *(_DWORD *)(a1 + 212) + *(_DWORD *)(a1 + 180) + 1524);
  if ( v4 > 0 )
  {
    if ( v4 > a2 - *(_DWORD *)(a1 + 220) )
      v4 = a2 - *(_DWORD *)(a1 + 220);
    if ( v4 )
    {
      *(float *)(*(_DWORD *)(a1 + 180) + 352) = UTIL_WeaponTimeBase() + a4;
      CBasePlayerWeapon__ReloadSound(a1);
      v6 = *(_DWORD *)(a1 + 148);
      v7 = (*(int (__cdecl **)(int))(v6 + 380))(a1);
      (*(void (__stdcall **)(int, int, bool, int))(v6 + 348))(a1, a3, v7 != 0, v8);
      *(_DWORD *)(a1 + 232) = 1;
      v9 = UTIL_WeaponTimeBase();
      result = 1;
      *(float *)(a1 + 208) = v9 + a4 + 0.5;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
Immortal_BLG is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 06-15-2010 , 07:38   Re: Module: Orpheu2.3a (Fixed for windows server editions)
Reply With Quote #473

Quote:
Originally Posted by ot_207 View Post
Ok and what is this information?
Weapon's clip running empty...
Seta00 is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 06-15-2010 , 08:28   Re: Module: Orpheu2.3a (Fixed for windows server editions)
Reply With Quote #474

Quote:
Originally Posted by Immortal_BLG View Post
Code:
int __cdecl CBasePlayerWeapon__ReloadSound(int a1)
{
  int result; // eax@1
  int v2; // eax@1
  float v3; // ST74_4@3
  float v4; // ST78_4@3
  float v5; // ST7C_4@3
  unsigned __int8 v6; // cf@4
  char v7; // zf@4
  int v8; // eax@4
  int v9; // edx@4
  signed int v10; // ecx@4
  int v11; // edi@4
  int v12; // esi@4
  int v13; // eax@4
  char v14; // zf@11
  signed int v15; // ecx@11
  int v16; // edi@11
  int v17; // esi@11
  void (__cdecl *v18)(_DWORD); // eax@16
  signed int v19; // [sp-10h] [bp-98h]@16
  int v20; // [sp+34h] [bp-54h]@4
  int i; // [sp+3Ch] [bp-4Ch]@1
  float v22; // [sp+60h] [bp-28h]@3
  float v23; // [sp+70h] [bp-18h]@1
  float v24; // [sp+74h] [bp-14h]@1
  float v25; // [sp+78h] [bp-10h]@1

  v2 = **(_DWORD **)(a1 + 180);
  v23 = *(float *)(v2 + 8);
  v24 = *(float *)(v2 + 12);
  v25 = *(float *)(v2 + 16);
  result = UTIL_FindEntityByClassname(0, "player");
  for ( i = result; result; i = result )
  {
    result = *(_DWORD *)result;
    if ( *(_DWORD *)(result + 420) == -2147483648 )
      break;
    if ( i != *(_DWORD *)(a1 + 180) )
    {
      v3 = v23 - *(float *)(result + 8);
      v4 = v24 - *(float *)(result + 12);
      v5 = v25 - *(float *)(result + 16);
      v22 = sqrt(v4 * v4 + v3 * v3 + v5 * v5);
      if ( v22 <= 512.0 )
      {
        (*(void (__cdecl **)(signed int, int, _DWORD, _DWORD))&g_engfuncs[184])(
          1,
          gmsgReloadSound,
          0,
          *(_DWORD *)(*(_DWORD *)i + 520));
        (*(void (__cdecl **)(_DWORD))&g_engfuncs[192])((unsigned __int8)(signed int)((1.0 - v22 * 0.001953125) * 255.0));
        v11 = (int)"weapon_m3";
        v10 = 10;
        v13 = *(_DWORD *)(gpGlobals + 152);
        v20 = v13;
        v9 = **(_DWORD **)a1;
        v12 = v9 + v13;
        v8 = 0;
        v6 = 0;
        v7 = 1;
        do
        {
          if ( !v10 )
            break;
          v6 = *(_BYTE *)v12 < *(_BYTE *)v11;
          v7 = *(_BYTE *)v12++ == *(_BYTE *)v11++;
          --v10;
        }
        while ( v7 );
        if ( !v7 )
        {
          v8 = -v6;
          LOBYTE(v8) = v8 | 1;
        }
        if ( !v8 )
          goto LABEL_24;
        v17 = v9 + v20;
        v16 = (int)"weapon_xm1014";
        v15 = 14;
        v14 = 1;
        do
        {
          if ( !v15 )
            break;
          v14 = *(_BYTE *)v17++ == *(_BYTE *)v16++;
          --v15;
        }
        while ( v14 );
        if ( !v14 )
        {
          v19 = 1;
          v18 = *(void (__cdecl **)(_DWORD))&g_engfuncs[192];
        }
        else
        {
LABEL_24:
          v19 = 0;
          v18 = *(void (__cdecl **)(_DWORD))&g_engfuncs[192];
        }
        v18(v19);
        (*(void (**)(void))&g_engfuncs[188])();
      }
    }
    result = UTIL_FindEntityByClassname(i, "player");
  }
  return result;
}
And this function called in CBasePlayerWeapon:efaultReload()
Code:
signed int __cdecl CBasePlayerWeapon__DefaultReload(int a1, int a2, int a3, float a4)
{
  int v4; // edx@1
  signed int result; // eax@2
  int v6; // esi@6
  int v7; // eax@6
  int v8; // ST20_4@6
  long double v9; // fst7@6

  v4 = *(_DWORD *)(4 * *(_DWORD *)(a1 + 212) + *(_DWORD *)(a1 + 180) + 1524);
  if ( v4 > 0 )
  {
    if ( v4 > a2 - *(_DWORD *)(a1 + 220) )
      v4 = a2 - *(_DWORD *)(a1 + 220);
    if ( v4 )
    {
      *(float *)(*(_DWORD *)(a1 + 180) + 352) = UTIL_WeaponTimeBase() + a4;
      CBasePlayerWeapon__ReloadSound(a1);
      v6 = *(_DWORD *)(a1 + 148);
      v7 = (*(int (__cdecl **)(int))(v6 + 380))(a1);
      (*(void (__stdcall **)(int, int, bool, int))(v6 + 348))(a1, a3, v7 != 0, v8);
      *(_DWORD *)(a1 + 232) = 1;
      v9 = UTIL_WeaponTimeBase();
      result = 1;
      *(float *)(a1 + 208) = v9 + a4 + 0.5;
    }
    else
    {
      result = 0;
    }
  }
  else
  {
    result = 0;
  }
  return result;
}
Interesting! This is what I needed. The only problem is that I do not know how to make that file that goes in amxmodx/configs. I have read the tutorials but have not seen enough examples to understand them. Can someone help me with this?
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-15-2010 , 08:51   Re: Module: Orpheu2.3a (Fixed for windows server editions)
Reply With Quote #475

What do you want to do exactly ? ( except making a file for these 2 functions )
__________________
Arkshine is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 06-15-2010 , 09:10   Re: Module: Orpheu2.3a (Fixed for windows server editions)
Reply With Quote #476

Quote:
Originally Posted by Arkshine View Post
What do you want to do exactly ? ( except making a file for these 2 functions )
I guess he want to block normal sounds to avoid sound based cheats
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 06-15-2010 , 11:38   Re: Module: Orpheu2.3a (Fixed for windows server editions)
Reply With Quote #477

Quote:
Originally Posted by Arkshine View Post
What do you want to do exactly ? ( except making a file for these 2 functions )
Evil stuff!

Quote:
Originally Posted by joropito View Post
I guess he want to block normal sounds to avoid sound based cheats
Bingo!

So? Can someone give me a hand with the sig files?

Edit:
Ah! And another good question! I do not know how to formulate it as a question but I will explain the situation.

I want something like this:
I check between 2 points if there is a wall with ENGFUNC_TRACELINE. After that I get the wall as in ent 0 that has been hit. Is there a way, of detecting the origin of that wall and the height and width of it? As a plane I mean.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.

Last edited by ot_207; 06-15-2010 at 18:25.
ot_207 is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 06-15-2010 , 19:31   Re: Module: Orpheu2.3a (Fixed for windows server editions)
Reply With Quote #478

Can anyone design a plugin that will block the output of "meta list" and if there are any mods running on it.
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 06-15-2010 , 19:53   Re: Module: Orpheu2.3a (Fixed for windows server editions)
Reply With Quote #479

About the client side stuff, you, ot, should try to hook it anyway. Arkshine or Connor found out that for PM_PlaySound if you block it, it will work client side but only for the player associated with the sound emission. Like, you block the call, server side, of a sound for player 1, he still listens to it, but others don't. So, give it a shot anyway, maybe it will be enough for your purpose.
__________________
joaquimandrade is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 06-16-2010 , 03:13   Re: Module: Orpheu2.3a (Fixed for windows server editions)
Reply With Quote #480

Quote:
Originally Posted by joaquimandrade View Post
About the client side stuff, you, ot, should try to hook it anyway. Arkshine or Connor found out that for PM_PlaySound if you block it, it will work client side but only for the player associated with the sound emission. Like, you block the call, server side, of a sound for player 1, he still listens to it, but others don't. So, give it a shot anyway, maybe it will be enough for your purpose.
I have already tried it. That is why I need the sigs for the functions. The reload sound is the only one that the cheat sees now. The rest are blocked through other functions. (PM_PlaySound, Emitsound, etc.)

And have you read the question about the plane of the walls? Do you think it is possible to get info about a certain plane through Orpheu?

Edit: Here is what I have wrote on the sig file. Is it correct?
And where to place it?

Code:
{
    "name" : "ReloadSound",
    "class" : "CBasePlayerWeapon",
    "library" : "mod",
    "arguments" : 
    [
        {
            "type" : "int"
        }
    ],
    "return" :
    {
        "type" : "int"
    },
    "identifiers" : 
    [
        {
            "os" : "windows",
            "mod" : "cstrike",
            "value" : 0x21BF8
        }
        {
            "os" : "linux",
            "mod" : "cstrike",
            "value" : "ReloadSound__17CBasePlayerWeapon"

        }

    ]
}
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.

Last edited by ot_207; 06-16-2010 at 05:09.
ot_207 is offline
Reply



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 10:38.


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