Subversion Repositories eduke32

Rev

Rev 8685 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8685 Rev 8798
Line 1095... Line 1095...
1095
    USERp u = User[SpriteNum];
1095
    USERp u = User[SpriteNum];
1096
    SPRITEp psp = User[SpriteNum]->tgt_sp;
1096
    SPRITEp psp = User[SpriteNum]->tgt_sp;
1097
    int CanSeePlayer(short SpriteNum);
1097
    int CanSeePlayer(short SpriteNum);
1098
    short tang;
1098
    short tang;
1099
1099
1100
#define RANDOM_NEG(x) (RANDOM_P2((x)<<1) - (x))
-
 
1101
-
 
1102
    tang = getangle(psp->x - sp->x, psp->y - sp->y);
1100
    tang = getangle(psp->x - sp->x, psp->y - sp->y);
1103
1101
1104
    // Always jump at player if mad.
1102
    // Always jump at player if mad.
1105
    //if(u->speed < FAST_SPEED)
1103
    //if(u->speed < FAST_SPEED)
1106
    //{
1104
    //{
1107
    if (move_sprite(SpriteNum, sintable[NORM_ANGLE(tang+512)] >> 7, sintable[tang] >> 7,
1105
    if (move_sprite(SpriteNum, sintable[NORM_ANGLE(tang+512)] >> 7, sintable[tang] >> 7,
1108
                    0L, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS))
1106
                    0L, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS))
1109
        sp->ang = NORM_ANGLE((sp->ang + 1024) + (RANDOM_NEG(256 << 6) >> 6));
1107
        sp->ang = NORM_ANGLE((sp->ang + 1024) + (RANDOM_NEG(256, 6) >> 6));
1110
    else
1108
    else
1111
        sp->ang = NORM_ANGLE(tang);
1109
        sp->ang = NORM_ANGLE(tang);
1112
    //    sp->ang = NORM_ANGLE(tang + (RANDOM_NEG(256 << 6) >> 6));
1110
    //    sp->ang = NORM_ANGLE(tang + (RANDOM_NEG(256, 6) >> 6));
1113
    //} else
1111
    //} else
1114
    //    sp->ang = NORM_ANGLE(tang);
1112
    //    sp->ang = NORM_ANGLE(tang);
1115
1113
1116
1114
1117
    DoActorSetSpeed(SpriteNum, FAST_SPEED);
1115
    DoActorSetSpeed(SpriteNum, FAST_SPEED);