[bf1942] Zombie players?

Forrest Thiessen thiessen at alum.mit.edu
Thu Aug 4 18:21:40 EDT 2005


No, they are created and managed completely in Python. There's no need
for the game engine to do anything with them.  You can see in the Python
code where they are created (when a player who doesn't already have a
score object connects) and where they are reset (at the beginning of
each round).  As far as I can tell, they work just fine that way.

I think the point is that having your scores remembered when you
disconnect and reconnect is the behavior that DICE designed into the
Python programming--it's not a malfunction, that's what it's supposed to
do, and it's normally quite nice that it works that way.

On the other hand, I don't think this has anything to do with the
"zombie" behavior--these extra data that's kept around in case the user
reconnects exists in Python, not in the game engine, so it shouldn't
have any visible impact on the game--for example, I don't see how it
could result in a "zombie" body being visible in-game).

--Forrest


Giel van Schijndel wrote:

> My guess is that the game-engine destroys/resets them rather than a
> python script
>
> Mortis
> European Tactical Battlefield Forces <http://etbf.kicks-ass.net>
>
>
> Forrest Thiessen schreef:
>
>>Yes, getting your points back is a feature: it's in the Python code in
>>Battlefield 2/python/bf2/stats/stats/py (look for the onPlayerConnect
>>function); it keeps a copy of all players' bf2.PlayerManager.PlayerScore
>>objects, even disconnected players. When new players connect, it tries
>>to match their profile ID against the profile IDs of any of the
>>"disconnected" PlayerScore objects it has.  If it finds a match
>>(presumably because you were disconnected from the game and are now
>>rejoining) it copies your old PlayerScore object into your new Player
>>object, and you're back, good as new. If you come back in the same round
>>you left, you pick up just where you left off, score-wise.
>>
>>Looking through the code, I don't see anywhere where these saved copies
>>of PlayerScore objects *ever* get erased. The scores within for
>>connected players get reset at the beginning of each round, but the
>>datastructures look like they stay there intact until the server is
>>restarted.
>>
>>--Forrest (aka "Woody")
>>
>>Brian Hughes wrote:
>>
>>  
>>
>>>The unranked server DOES remember scores etc when u reconnect during the
>>>same round. Have observed this on our server on numerous occasions
>>>
>>>Brian
>>>
>>>
>>> 
>>>
>>>    
>>>
>>>>-----Original Message-----
>>>>From: "Einar S. Idsø" [mailto:esi at itk.ntnu.no]
>>>>Sent: 04 August 2005 14:54
>>>>To: bf1942 at icculus.org
>>>>Subject: Re: [bf1942] Zombie players?
>>>>
>>>>Jani Partanen wrote:
>>>>   
>>>>
>>>>      
>>>>
>>>>>On Thu, 4 Aug 2005, "Einar S. Idsø" wrote:
>>>>>
>>>>>     
>>>>>
>>>>>        
>>>>>
>>>>>>Well, yes. The game does indeed reattach you to your stats after a
>>>>>>disconnect if you reenter during the same round (which is also the
>>>>>>reason why we have no bans lasting less than the time until the round
>>>>>>runs out).
>>>>>>       
>>>>>>
>>>>>>          
>>>>>>
>>>>>Is this a ranked server feature or both?
>>>>>     
>>>>>
>>>>>        
>>>>>
>>>>You mean the reattaching to your disconnected playerobject? I don't
>>>>know, but definitely for ranked servers. Guess it's not as important for
>>>>unranked servers, but it may still be enabled on those. Anyone tried
>>>>this on an unranked server?
>>>>
>>>>Einar
>>>>   
>>>>
>>>>      
>>>>
>>>
>>> 
>>>
>>>    
>>>
>>
>>
>>  
>>



More information about the Bf1942 mailing list