Having an odd issue with entity disappearing on seemingly random, but consistent parts of the map depending on where the observer is. Not sure what's causing it as I haven't worked with entities in this game that much. I've tried a few different methods of creating the entity, different rendermodes and perhaps other things. All seems to have this same effect.
In some maps like dust2 and nuke the entity doesn't actually appear at all.
On a bigger map it does appear but disappears once the observer walks into seemingly random parts of the map, so clearly something is not right.
Here's the function where entity in question is being created:
Spoiler
PHP Code:
stock createThink()
{
/* createThink()
- parameters : ( )
- description : creates an entity that runs recorded paths back and forth, called on mapstart
- return : -
*/
// new ent = create_entity("info_player_deathmatch");
new ent = engfunc( EngFunc_CreateNamedEntity,engfunc( EngFunc_AllocString, "info_target") );
if(!ent) {
log_amx("Failed to create think entity");
return;
}
entity_set_model(ent, BOT_MODEL);
new Float:maxs[3] = {16.0, 16.0, 36.0};
new Float:mins[3] = {-16.0, -16.0, -36.0};