I guess that worked know it looks better.
float angle = agk::ATanFull (playanden[id2].xLocdata - xloctemp, playanden[id2].yLocdata- yloctemp);
agk::SetSpriteAngle ( ID, angle);
if(playanden[id2].xxc==15)
{
agk::SetSpriteOffset(ID3,25,0);
rotangle=agk::ATanFull(playanden[id2].xLocdata-agk::GetSpriteX(player.playerid),playanden[id2].yLocdata-agk::GetSpriteY(player.playerid));
agk::SetSpriteAngle(ID3,rotangle);
agk::SetSpritePositionByOffset(ID3,playanden[id2].xLocdata,playanden[id2].yLocdata);
}
if(playanden[id2].xxc==17)
{
rotangle++;
if(rotangle==360)
rotangle=0;
agk::SetSpriteAngle(ID3,rotangle);
agk::SetSpritePosition(ID3,playanden[id2].xLocdata,playanden[id2].yLocdata);
}
agk::SetSpriteOffset(ID,25,75);
//agk::SetSpriteAngle ( ID, rotangle+180);
agk::SetSpritePositionByOffset(ID,playanden[id2].xLocdata,playanden[id2].yLocdata);
Go through yourself at a wall.