mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- buildutils: Replace sintable[]
use within SW's ripper2.cpp with bsin()
/bcos()
.
This commit is contained in:
parent
54d0b4c291
commit
d0a8f1fbda
1 changed files with 6 additions and 6 deletions
|
@ -953,9 +953,9 @@ InitRipper2Hang(short SpriteNum)
|
||||||
tang = NORM_ANGLE(sp->ang + dang);
|
tang = NORM_ANGLE(sp->ang + dang);
|
||||||
|
|
||||||
FAFhitscan(sp->x, sp->y, sp->z - SPRITEp_SIZE_Z(sp), sp->sectnum, // Start position
|
FAFhitscan(sp->x, sp->y, sp->z - SPRITEp_SIZE_Z(sp), sp->sectnum, // Start position
|
||||||
sintable[NORM_ANGLE(tang + 512)], // X vector of 3D ang
|
bcos(tang), // X vector of 3D ang
|
||||||
sintable[tang], // Y vector of 3D ang
|
bsin(tang), // Y vector of 3D ang
|
||||||
0, // Z vector of 3D ang
|
0, // Z vector of 3D ang
|
||||||
&hitinfo, CLIPMASK_MISSILE);
|
&hitinfo, CLIPMASK_MISSILE);
|
||||||
|
|
||||||
if (hitinfo.sect < 0)
|
if (hitinfo.sect < 0)
|
||||||
|
@ -1020,8 +1020,8 @@ DoRipper2MoveHang(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));
|
||||||
|
|
||||||
// if cannot move the sprite
|
// if cannot move the sprite
|
||||||
if (!move_actor(SpriteNum, nx, ny, 0L))
|
if (!move_actor(SpriteNum, nx, ny, 0L))
|
||||||
|
@ -1103,7 +1103,7 @@ DoRipper2BeginJumpAttack(short SpriteNum)
|
||||||
// Always jump at player if mad.
|
// Always jump at player if mad.
|
||||||
//if(u->speed < FAST_SPEED)
|
//if(u->speed < FAST_SPEED)
|
||||||
//{
|
//{
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue