Quote:
Originally Posted by KliPPy
No, that's EngFunc_CreateEntity.
@OP, debug every line of your code and check runtime errors. You may be having issues with weapon_glock like in one of your previous topics IIRC.
But I'm on my phone atm so I can't check the code thoroughly, just guessing.
|
Thanks, I always forget that it should be weapon_glock18, also that should fix the 2nd problem too, since there's nothing wrong with the method I'm using to retrieve the data from array. I'll let you know when I test.
Quote:
Originally Posted by Ghosted
Code:
WeaponEntity = create_entity( eData[ Weapon_Name ] );
if( pev_valid( WeaponEntity ) != 2 )
{
remove_entity( WeaponBoxEntity );
}
ExecuteHamB( Ham_Spawn, WeaponEntity );
|
I don't think that's safe. You have to call m_pfnThink on weaponbox entities to properly remove them, remove_entity creates a memory leak.
Furthermore, HamletEagle didn't remove the weaponbox
here and that surely has a reason behind.
__________________