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

Module: Orpheu (v2.6.3)


Post New Thread Reply   
 
Thread Tools Display Modes
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 01-26-2010 , 11:35   Re: Module: Orpheu2
Reply With Quote #31

Quote:
Originally Posted by Arkshine View Post
It attaches the entity on the weapon attachment 1 I guess, something like. But you can do that probably because it a custom entity (FL_CUSTOMENTITY).

I remember you can use too the weapon attachment with the player id and TE_BEAMENTS for example. ( eg : id | 0x2000 )

Anyway I'm going to do some research on it, long time i wanted to do this weapon.

[edit] Btw, you can do it without orpheu.
Yeah, i know about that, http://forums.alliedmods.net/showthread.php?t=53989

I'm going to test the SetEndAttachment func
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 01-27-2010 , 12:14   Re: Module: Orpheu2
Reply With Quote #32

This probably isn't the best place to post this, so somebody tell me other wise. But I'm new to reverse engineering and stuff, but I read BAILOPAN's blog about sigscanning, and the articles on the SourceMM wiki.

I'm using IDA to get the memory location, my goal is to hook the function "CTSEmitter:InitThink" in The Specialist. Which is found here: http://img210.**************/img210/3631/sadfu.jpg

Can anyone enlighten me on how to take this information I've got, and turn it into something Orpheu can use? Sorry if this is asking for alot.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-27-2010 , 12:20   Re: Module: Orpheu2
Reply With Quote #33

It looks like it would be this for the Windows support of the Orpheu module:
?InitThink@CTSEmitter@@QAEXXZ

You would have to do a different thing for Linux.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 01-27-2010 , 12:28   Re: Module: Orpheu2
Reply With Quote #34

Quote:
Originally Posted by Drak View Post
This probably isn't the best place to post this, so somebody tell me other wise. But I'm new to reverse engineering and stuff, but I read BAILOPAN's blog about sigscanning, and the articles on the SourceMM wiki.

I'm using IDA to get the memory location, my goal is to hook the function "CTSEmitter:InitThink" in The Specialist. Which is found here: http://img210.**************/img210/3631/sadfu.jpg

Can anyone enlighten me on how to take this information I've got, and turn it into something Orpheu can use? Sorry if this is asking for alot.
For that function you don't even need signature scanning because it is exported. Click with the right button on it and choose edit name, copy it and make a file for it. (As exolent said)

Create a folder named "CTSEmitter" on the functions folder and create a file on it named "InitThink".

The file should look like:

Code:
{
    "name" : "InitThink",
    "class" : "CTSEmitter",
    "library" : "mod",
    "identifiers" : 
    [
        {
            "os" : "windows",
            "mods" : ["ts"],
            "value" : "?InitThink@CTSEmitter@@QAEXXZ"
        }
    ]
}
Then you would go to the folder "typeAliases" and edit the file CBaseEntity to have "CTSEmitter *" as an alias.

Look, me and Arkshine are updating the module to support virtual functions including support for derivates of CHalfLifeMultiplay and also to support easy adding of new aliases without editing files. If you don't manage to make it work or if it doesn't work (because the type CBaseEntity was not tested in your mod) just wait some time for the new version that will work for sure on your mod because it will use the hamsandwich way of handling CBaseEntity.

Last edited by joaquimandrade; 01-27-2010 at 12:33.
joaquimandrade is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-27-2010 , 12:30   Re: Module: Orpheu2
Reply With Quote #35

linux, it seems to be : InitThink__10CTSEmitter
__________________
Arkshine is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 01-29-2010 , 01:14   Re: Module: Orpheu2
Reply With Quote #36

Updated to version 2.1 that includes virtual functions and memory hacking.

Credits to hamsandwich for the concept and the handling of the class CBaseEntity and to memhack.

Me and or Arkshine will provide more examples and code later. Cheers.

The module should work now without any problem in any mod.

The only change that affects old files for function definition is the change of the field "mods" that supported an array of mods, to "mod" that support a string with one.

Last edited by joaquimandrade; 01-29-2010 at 01:20.
joaquimandrade is offline
Old 01-29-2010, 01:56
Kiske
This message has been deleted by Kiske.
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 01-29-2010 , 07:40   Re: Module: Orpheu2.1 (added memory hacking and virtual functions support)
Reply With Quote #37

I will have a fun day of memory-crashes
01101101 is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 01-29-2010 , 08:13   Re: Module: Orpheu2.1 (added memory hacking and virtual functions support)
Reply With Quote #38

I wonder if someone could do something with orpheu and this call

(this is the prototype on CS:S but this call exists on engine dll/so so I guess it's the same)
PHP Code:
SV_FindEmptySlot (netadr_t *adrint *pslotclient_t **ppClient

This is called from SV_ConnectClient and returns the next available slot allowing the user connect to the server...
Of course it's necessary to allocate more slots/memory before.

Yes, my point is to make a 32+ slots


I also found this

PHP Code:
/*
 ================
 SV_FindEmptySlot 
 Get slot # and set client_t pointer for player, if possible
 We don't do this search on a "reconnect, we just reuse the slot
 ================
 */
int SV_FindEmptySlotnetadr_t *adrint *pslotclient_t **ppClient )
{
    
client_t *client=0;
    
int slot;
    
int                     clients;

    
clients 0;

    
SV_CountPlayers( &clients );

    for ( 
slot slot svs.maxclients slot++ )
    {
        
client = &svs.clients[slot];
        if ( !
client->active && !client->spawned && !client->connected )
            break;
    }

    if ( 
slot >= svs.maxclients )
    {
        
SV_RejectConnectionadr"Server is full.\n" );
            return 
0;
    }

    *
pslot slot;
    *
ppClient client;
    
// Success
    
return 1;

__________________

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.

Last edited by joropito; 01-29-2010 at 08:15.
joropito is offline
Send a message via MSN to joropito
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 01-29-2010 , 08:18   Re: Module: Orpheu2.1 (added memory hacking and virtual functions support)
Reply With Quote #39

Let me see if I can find something, I'm still noob in this lol

PD: I remember one time they made this stuff of 32+ players, but it was laggy like hell and buggy, anyway I'm interested in trying lol.
01101101 is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 01-29-2010 , 08:31   Re: Module: Orpheu2.1 (added memory hacking and virtual functions support)
Reply With Quote #40

Maybe hooking this will be better

PHP Code:
// FROM CS:S (in CS16 it's SV_SetMaxclients)
void SV_SetMaxClientsvoid )
{
    
// Determine absolute limit
    
svs.maxclientslimit MAX_CLIENTS;

    
// Assume default
    
svs.maxclients isDedicated DEFAULT_SERVER_CLIENTS 1;

    
// Check for command line override
    
int nMaxPlayers CommandLine()->ParmValue"-maxplayers", -);
    if ( 
nMaxPlayers >= )
    {
        
svs.maxclients nMaxPlayers;
    }

    
svs.maxclients max1svs.maxclients );
    
svs.maxclients minMAX_CLIENTSsvs.maxclients );

    
// sanity check
    
svs.maxclients minsvs.maxclientssvs.maxclientslimit );

Look the comments about "sanity check" !!!!

The problem is MAX_CLIENTS is a constant and it's used along the program... damn!!
__________________

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
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:28.


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