View Single Post
Re: Hi I'm new and have some question !
Old
  (#5)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Hi I'm new and have some question ! - 10-03-2004

Yes, those values (player stats) belong to the player entities' private data ; and the HL engine does not free the player's private data for not needing to reallocate it later. It's normally up to the client, when he inheritates of this player structure, to tell the engine to zap all the contents of the private data, but since bots are not real clients, we have to empty this private data somehow. Calling FREE_PRIVATE() will force the engine to reallocate a new block of data, and to zero it out. Actually the point is not to make it free or release this data, the point is to tell it to zero it out.

I have never seen this code fail on every bot where I put it to work, be it metamod or not.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote