I have an enemy that teleports around the player and shoots a bullet at you using angle(x1,y1,x2,y2). However, I want to limit the angle to -80 and +80 of the enemy's current angle so it's always shooting outwards / the bullet never overlaps the enemy itself, which I'm using clamp() for. This causes some problems because of the way angles work...i.e. if the enemy's angle is 270 (upwards) and the player is to the bottom left of it, it'll actually shoot as far to the right as it can instead of the left.
Any idea what to do about that? I remember MMF having an extension for this very thing...