the bmap for th sprite is also a skin, so you have to use bmap_for_entity to get the bmap pointer to the texture and then you can replace it