Or make a bitwise operator or Boolean value on the player for that effect, which would be thousands of times faster than scrolling through a linked list every time the entity thinks.
- voogru. -----Original Message----- From: Minh [mailto:[EMAIL PROTECTED] Sent: Thursday, February 08, 2007 4:59 PM To: [email protected] Subject: Re: [hlcoders] Remove stacking on area damage >From reading your post, I understand that you do not want a player to be affected by more than 1 instance of that area-effect weapon. What I would do to solve this problem is to have a global link list of CBasePlayers.. As soon as the weapon starts to damage a player, you add that player to the global link list of CBasePlayers. If another instance of that same weapon tries to do damage to that player, you do a check to see if that player is already in the global link list of CBasePlayers. If he is already in there, then abort, or else, go ahead and take the damage and add him to the link list. There is a really useful class in the Source SDK called CUtlVector. It is basically a link list where you can add and delete and sort elements of any type. It's very useful. You can read more about it here http://www.hl2coding.com/article.php?article=3 ----- Original Message ----- From: "Niclas" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, February 08, 2007 1:10 PM Subject: [hlcoders] Remove stacking on area damage > -- > [ Picked text/plain from multipart/alternative ] > I hope its ok that I send a link to the HL2 Coding forum. > The forums is not very well visited as the mailing list :P > > http://www.hl2coding.com/forums/viewtopic.php?t=2116 > > > > Niclas > -- > > _______________________________________________ > 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 _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

