Subversion Repositories eduke32

Rev

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

Rev 8685 Rev 8798
Line 855... Line 855...
855
    USERp u = User[SpriteNum];
855
    USERp u = User[SpriteNum];
856
    SPRITEp psp = User[SpriteNum]->tgt_sp;
856
    SPRITEp psp = User[SpriteNum]->tgt_sp;
857
    int CanSeePlayer(short SpriteNum);
857
    int CanSeePlayer(short SpriteNum);
858
    short tang;
858
    short tang;
859
859
860
-
 
861
#define RANDOM_NEG(x) (RANDOM_P2((x)<<1) - (x))
-
 
862
-
 
863
    tang = getangle(psp->x - sp->x, psp->y - sp->y);
860
    tang = getangle(psp->x - sp->x, psp->y - sp->y);
864
861
865
    if (move_sprite(SpriteNum, sintable[NORM_ANGLE(tang+512)] >> 7, sintable[tang] >> 7,
862
    if (move_sprite(SpriteNum, sintable[NORM_ANGLE(tang+512)] >> 7, sintable[tang] >> 7,
866
                    0L, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS))
863
                    0L, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS))
867
        sp->ang = NORM_ANGLE(sp->ang + 1024) + (RANDOM_NEG(256 << 6) >> 6);
864
        sp->ang = NORM_ANGLE(sp->ang + 1024) + (RANDOM_NEG(256, 6) >> 6);
868
    else
865
    else
869
        sp->ang = NORM_ANGLE(tang + (RANDOM_NEG(256 << 6) >> 6));
866
        sp->ang = NORM_ANGLE(tang + (RANDOM_NEG(256, 6) >> 6));
870
867
871
    DoActorSetSpeed(SpriteNum, FAST_SPEED);
868
    DoActorSetSpeed(SpriteNum, FAST_SPEED);
872
869
873
    //u->jump_speed = -800;
870
    //u->jump_speed = -800;
874
    PickJumpMaxSpeed(SpriteNum, -400); // was -800
871
    PickJumpMaxSpeed(SpriteNum, -400); // was -800