mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- buildutils: Replace sintable[]
use within SW's wallmove.cpp with bsin()
/bcos()
.
This commit is contained in:
parent
a5082d24d9
commit
a7a223c13d
1 changed files with 4 additions and 4 deletions
|
@ -65,8 +65,8 @@ void SOwallmove(SECTOR_OBJECTp sop, SPRITEp sp, WALLp find_wallp, int dist, int
|
||||||
ASSERT(User[sp - sprite]);
|
ASSERT(User[sp - sprite]);
|
||||||
ang = User[sp - sprite]->sang;
|
ang = User[sp - sprite]->sang;
|
||||||
|
|
||||||
*nx = ((dist * sintable[NORM_ANGLE(ang + 512)])>>14);
|
*nx = mulscale14(dist, bcos(ang));
|
||||||
*ny = ((dist * sintable[ang])>>14);
|
*ny = mulscale14(dist, bsin(ang));
|
||||||
|
|
||||||
sop->xorig[wallcount] -= *nx;
|
sop->xorig[wallcount] -= *nx;
|
||||||
sop->yorig[wallcount] -= *ny;
|
sop->yorig[wallcount] -= *ny;
|
||||||
|
@ -101,8 +101,8 @@ int DoWallMove(SPRITEp sp)
|
||||||
if (dang)
|
if (dang)
|
||||||
ang = NORM_ANGLE(ang + (RANDOM_RANGE(dang) - dang/2));
|
ang = NORM_ANGLE(ang + (RANDOM_RANGE(dang) - dang/2));
|
||||||
|
|
||||||
nx = (dist * sintable[NORM_ANGLE(ang + 512)])>>14;
|
nx = mulscale14(dist, bcos(ang));
|
||||||
ny = (dist * sintable[ang])>>14;
|
ny = mulscale14(dist, bsin(ang));
|
||||||
|
|
||||||
for (wallp = wall; wallp < &wall[numwalls]; wallp++)
|
for (wallp = wall; wallp < &wall[numwalls]; wallp++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue