Well UTIL_GetPlayerConnectionInfo wouldn't work because there's no entity so 
player is null.  But engine->GetPlayerNetInfo might have worked as a hack.  
Good idea, but too late I already solved it manually. :)

At 2006/04/01 11:06 PM, Aaron Schiff wrote:
>--
>[ Picked text/plain from multipart/alternative ]
>Try this: call UTIL_GetPlayerConnectionInfo on the player...if both ping and
>packetloss are 0, then the user isn't connected...(this *may *not be the
>case for localhost users)
>
>On 4/1/06, Physical Mayhem Bug <[EMAIL PROTECTED]> wrote:
>>
>> Incidentally you can't simply keep a counter of connections and
>> disconnections to get this number.  I found this out the hard way when a
>> client "reconnect" caused 2 disconnections in a row, followed by a
>> connection.  I've been unable to reproduce a "reconnect".  If you do the
>> "retry" command, you re-connect quickly, but that's not the same thing.
>>
>> Oh well, I hacked around it with a std::set of connected edict
>> pointers.  I'd post a patch, but all the code went in my custom mod class,
>> and it's trivial anyway.
>>
>> At 2006/03/26 01:38 PM, Physical Mayhem Bug wrote:
>> >Background: there's a bug or missing feature that doesn't allow a mod to
>> tell how many player slots are really in use by clients.  The mod can only
>> tell how many slots have clients that have spawned into the server.  So I
>> think I have a hack in place involving counting connections and
>> disconnections.
>> >
>> >This would be a lot easier if I made a FL_EDICT_IS_CONNECTED flag for
>> m_fStateFlags but that's shared by the engine, so doing so seems
>> questionable.  Anyone know if adding new edict flags is allowed by the API?
>> >
>> >_______________________________________________
>> >To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> >http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>
>
>
>--
>ts2do
>--
>
>_______________________________________________
>To unsubscribe, edit your list preferences, or view the list archives, please 
>visit:
>http://list.valvesoftware.com/mailman/listinfo/hlcoders

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to