View Single Post
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