mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- buildutils: Replace sintable[]
use within SW's bunny.cpp with bsin()
/bcos()
.
This commit is contained in:
parent
156709d6bf
commit
4192416268
1 changed files with 3 additions and 3 deletions
|
@ -859,7 +859,7 @@ DoBunnyBeginJumpAttack(short SpriteNum)
|
||||||
|
|
||||||
tang = getangle(psp->x - sp->x, psp->y - sp->y);
|
tang = getangle(psp->x - sp->x, psp->y - sp->y);
|
||||||
|
|
||||||
if (move_sprite(SpriteNum, sintable[NORM_ANGLE(tang+512)] >> 7, sintable[tang] >> 7,
|
if (move_sprite(SpriteNum, bcos(tang, -7), bsin(tang, -7),
|
||||||
0L, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS))
|
0L, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS))
|
||||||
sp->ang = NORM_ANGLE(sp->ang + 1024) + (RANDOM_NEG(256, 6) >> 6);
|
sp->ang = NORM_ANGLE(sp->ang + 1024) + (RANDOM_NEG(256, 6) >> 6);
|
||||||
else
|
else
|
||||||
|
@ -895,8 +895,8 @@ DoBunnyMoveJump(short SpriteNum)
|
||||||
int nx, ny;
|
int nx, ny;
|
||||||
|
|
||||||
// Move while jumping
|
// Move while jumping
|
||||||
nx = sp->xvel * (int) sintable[NORM_ANGLE(sp->ang + 512)] >> 14;
|
nx = mulscale14(sp->xvel, bcos(sp->ang));
|
||||||
ny = sp->xvel * (int) sintable[sp->ang] >> 14;
|
ny = mulscale14(sp->xvel, bsin(sp->ang));
|
||||||
|
|
||||||
move_actor(SpriteNum, nx, ny, 0L);
|
move_actor(SpriteNum, nx, ny, 0L);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue