Raised This Month: $51 Target: $400
 12% 

[EXTENSION] MemPatch


Post New Thread Reply   
 
Thread Tools Display Modes
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 12-03-2012 , 03:09   Re: [EXTENSION] MemPatch
Reply With Quote #11

it does nothing without a plugin
Despirator is offline
Gonzofred
Junior Member
Join Date: Nov 2012
Old 12-03-2012 , 20:34   Re: [EXTENSION] MemPatch
Reply With Quote #12

I have the extension for L4D2 in use but the game description reads "Cookiez". Do I have to manually change?

Last edited by Gonzofred; 12-03-2012 at 20:35.
Gonzofred is offline
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 12-03-2012 , 23:18   Re: [EXTENSION] MemPatch
Reply With Quote #13

you have to change it in the source of the test plugin
Despirator is offline
chuj
Member
Join Date: Jan 2012
Location: Kraków, Poland
Old 03-04-2013 , 08:02   Re: [EXTENSION] MemPatch
Reply With Quote #14

CSS:

] sm_rcon sm exts load mempatch.ext.so
]
[SM] Extension mempatch.ext.so failed to load: libvstdlib.so: cannot open shared object file: No such file or directory

Last edited by chuj; 03-04-2013 at 08:04.
chuj is offline
dr leks
Junior Member
Join Date: Jul 2013
Old 07-06-2013 , 14:35   Re: [EXTENSION] MemPatch
Reply With Quote #15

Does not work on linux left 4 dead 2
Quote:
L 07/06/2013 - 21:06:45: [SM] Unable to load extension "mempatch.ext": /lib/i686/cmov/libm.so.6: version `GLIBC_2.15' not found (required by bin/libvstdlib.so)
dr leks is offline
disawar1
AlliedModders Donor
Join Date: Aug 2011
Location: Russian
Old 07-15-2013 , 12:18   Re: [EXTENSION] MemPatch
Reply With Quote #16

Latest [L4D2] Ammo Pickup gamedata is here.
Attached Files
File Type: so mempatch.ext.2.l4d2.so (41.6 KB, 356 views)
File Type: dll mempatch.ext.2.l4d2.dll (104.0 KB, 234 views)
__________________

Last edited by disawar1; 07-15-2013 at 12:20.
disawar1 is offline
Nikkii
Member
Join Date: Feb 2012
Old 07-24-2013 , 04:22   Re: [EXTENSION] MemPatch
Reply With Quote #17

Would it be possible to get a version which allows you to specify bytes to patch from the plugin instead of in a gamedata file? I already added it into a local version, but if there's no objections to adding it (possibly due to security or ease of updating? idk) that'd be great (in the posted extension), or if you don't wish to add it yourself I could simply post my version

It's useful mainly when there's a value in the plugin which might not change, such as the huntsman extension
__________________
Owner of ProbablyAServer, a server without game changing mods and donation benefits

RCON Helper | [TF2] LogUpload | CCC Donator Tags | PHP Steam API Wrapper

Last edited by Nikkii; 07-24-2013 at 06:00.
Nikkii is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 07-26-2013 , 12:45   Re: [EXTENSION] MemPatch
Reply With Quote #18

This is pretty much obsolete at this point as sourcemods address functions allow patching. http://forums.alliedmods.net/showpos...54&postcount=1 as an example, however gamedata should be used anyway as you need to find the function anyway and makes it a lot easier to update.
Dr!fter is offline
Nikkii
Member
Join Date: Feb 2012
Old 07-26-2013 , 19:58   Re: [EXTENSION] MemPatch
Reply With Quote #19

Ah, I didn't know that, thanks for the example
__________________
Owner of ProbablyAServer, a server without game changing mods and donation benefits

RCON Helper | [TF2] LogUpload | CCC Donator Tags | PHP Steam API Wrapper
Nikkii is offline
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 08-12-2013 , 10:47   Re: [EXTENSION] MemPatch
Reply With Quote #20

Hello!

I have a question.

I am found this function, and the corresponding signature

Code:
int __cdecl SetupMaxPlayers(int a1)
{
  signed int v1; // eax@1
  int v2; // edx@2
  int v3; // ebx@9
  int v4; // edx@13
  int v5; // ecx@13
  signed int v6; // esi@16
  int v8; // eax@25
  char arg[4]; // [sp+10h] [bp-38h]@1
  int v10; // [sp+20h] [bp-28h]@1
  int v11; // [sp+30h] [bp-18h]@1

  v1 = 255;
  *(_DWORD *)arg = 1;
  v10 = 255;
  v11 = 1;
  if ( serverGameClients )
  {
    (**(void (__cdecl ***)(int, char *, int *, int *))serverGameClients)(serverGameClients, arg, &v10, &v11);
    v2 = *(_DWORD *)arg;
    if ( *(_DWORD *)arg <= 0 )
    {
      Sys_Error("GetPlayerLimits:  min maxplayers must be >= 1 (%i)", arg[0]);
      v2 = *(_DWORD *)arg;
    }
    else
    {
      if ( v11 <= 0 )
      {
        Sys_Error("GetPlayerLimits:  default maxplayers must be >= 1 (%i)", arg[0]);
        v2 = *(_DWORD *)arg;
      }
    }
    v1 = v10;
    if ( v10 < v2 || v10 < v11 )
    {
      Sys_Error("GetPlayerLimits:  min maxplayers %i > max %i", v2);
      v1 = v10;
    }
    if ( v1 > 255 )
    {
      Sys_Error("GetPlayerLimits:  max players limited to %i", -1);
      v1 = v10;
    }
  }
  *(_DWORD *)&sv[428] = v1;
  v3 = v11;
  if ( a1 > 0 )
  {
    v3 = a1;
    if ( v1 <= a1 )
      v3 = v1;
    *(_DWORD *)&sv[428] = v3;
  }
  if ( (unsigned __int8)Replay_IsSupportedModAndPlatform() )
  {
    v8 = CommandLine_Tier0(v5, v4);
    if ( (*(int (__cdecl **)(int, _DWORD, _DWORD))(*(_DWORD *)v8 + 12))(v8, "-replay", 0) )
    {
      ++*(_DWORD *)&sv[428];
      ++v3;
    }
  }
  if ( *(_DWORD *)(*(_DWORD *)&tv_enable[28] + 48) )
  {
    ++*(_DWORD *)&sv[428];
    ++v3;
  }
  v6 = *(_DWORD *)arg;
  if ( *(_DWORD *)arg <= v3 )
  {
    v6 = *(_DWORD *)&sv[428];
    if ( v3 <= *(_DWORD *)&sv[428] )
      v6 = v3;
  }
  if ( (unsigned __int8)CL_IsHL2Demo() || (unsigned __int8)CL_IsPortalDemo() )
  {
    if ( !sv[300] )
    {
      *(_DWORD *)&sv[428] = 1;
      v6 = 1;
    }
  }
  return CGameServer__SetMaxClients((int)sv, v6);
}
Signature:
PHP Code:
"linux"        "@_Z15SetupMaxPlayersi" 
How did it go?

SetupMaxPlayers -> @_Z15SetupMaxPlayersi

This is the result that came out?

Thanks



Up: I realized
__________________

Last edited by kiki33hun; 08-12-2013 at 11:03. Reason: I realized
kiki33hun 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 04:27.


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