View Single Post
GordonFreeman (RU)
Veteran Member
Join Date: Jan 2010
Location: Uzbekistan
Old 05-03-2016 , 03:39   Re: [HL] Weapon Spawn Effects
Reply With Quote #8

Updated.
Quote:
Originally Posted by HamletEagle View Post
fw_Think I don't see that you checked if entity is valid.
There is already check for remove_entity in fw_Think and i don't think is_valid_ent needed for TrieGetCell.
Code:
public fw_Think(ent){     new dnum[5],ghost     num_to_str(ent,dnum,charsmax(dnum))         TrieGetCell(g_owners,dnum,ghost)         if(ghost)     {         TrieDeleteKey(g_owners,dnum)                 if(is_valid_ent(ghost))         {             remove_entity(ghost)         }     } }
__________________
The functional way is the right way

Last edited by GordonFreeman (RU); 05-03-2016 at 03:44.
GordonFreeman (RU) is offline