Raised This Month: $ Target: $400
 0% 

Model disappears by distance on separate map areas


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 02-11-2024 , 15:12   Re: Model disappears by distance on separate map areas
Reply With Quote #4

Is it normally create ent in SetThink() via static ?)
PHP Code:
SetThink(entity"Corpse_Sprite_Think");
set_entvar(entityvar_nextthinkget_gametime() + 0.1); // entity - it's a weaponbox
// ...

public Corpse_Sprite_Think(const iEnt)
{
  static 
iEntSprite NULLENT;
  if ((
get_entvar(iEntvar_flags) & FL_ONGROUND)) {
    if (!
is_entity(iEntSprite)) {
      
iEntSprite rg_create_entity("info_target"false);
      
engfunc(EngFunc_SetModeliEntSpriteMODEL_GUNDROP);
      
// then I set couple of entvars
    
} else {
      
// fixes ents' origin, because SetThink called from rg_CBasePlayerDropPlayerItemPost (in this case weaponbox can still moving somethime)
    
}
  }
}


// This's my plugins logics :\ 

Last edited by ZASTRELIS; 02-11-2024 at 15:21.
ZASTRELIS is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:47.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode