NScumm.Sword1.Logic.fnFace C# (CSharp) Method

fnFace() private method

private fnFace ( SwordObject cpt, int id, int targetId, int b, int c, int d, int a, int z ) : int
cpt SwordObject
id int
targetId int
b int
c int
d int
a int
z int
return int
        private int fnFace(SwordObject cpt, int id, int targetId, int b, int c, int d, int a, int z)
        {
            SwordObject target = _objMan.FetchObject((uint)targetId);
            int x, y;
            if ((target.type == Screen.TYPE_MEGA) || (target.type == Screen.TYPE_PLAYER))
            {
                x = target.xcoord;
                y = target.ycoord;
            }
            else
            {
                x = (target.mouse_x1 + target.mouse_x2) / 2;
                y = target.mouse_y2;
            }
            int megaTarDir = WhatTarget(cpt.xcoord, cpt.ycoord, x, y);
            fnTurn(cpt, id, megaTarDir, 0, 0, 0, 0, 0);
            return SCRIPT_STOP;
        }