PHP Code:
//#CLIENTSIDE
function onActionProjectile(Attacker, Damage) // or however era has it setup
{
if (player.dir == getdir(player.x - Attacker.x, player.y - Attacker.y) {
//block
}
}
it doesnt really need to detect what angle the bullet is traveling in, since its pretty rare that an enemy can run completely around you before the bullet hits you. Era's current bullet detection system does attach the attackers account to the bullet all you have to do is check the players direction against the getdir function.