mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 04:20:45 +00:00
- buildutils: Replace sintable[]
use within SW's input.cpp with bsin()
/bcos()
.
This commit is contained in:
parent
2e4bced7f9
commit
94bd45569c
1 changed files with 4 additions and 3 deletions
|
@ -231,12 +231,13 @@ void GameInterface::GetInput(InputPacket *packet, ControlInfo* const hidInput)
|
|||
|
||||
if (packet)
|
||||
{
|
||||
auto const ang = pp->angle.ang.asbuild();
|
||||
auto const cos = pp->angle.ang.bcos();
|
||||
auto const sin = pp->angle.ang.bsin();
|
||||
|
||||
*packet = loc;
|
||||
|
||||
packet->fvel = mulscale9(loc.fvel, sintable[NORM_ANGLE(ang + 512)]) + mulscale9(loc.svel, sintable[NORM_ANGLE(ang)]);
|
||||
packet->svel = mulscale9(loc.fvel, sintable[NORM_ANGLE(ang)]) + mulscale9(loc.svel, sintable[NORM_ANGLE(ang + 1536)]);
|
||||
packet->fvel = mulscale9(loc.fvel, cos) + mulscale9(loc.svel, sin);
|
||||
packet->svel = mulscale9(loc.fvel, sin) - mulscale9(loc.svel, cos);
|
||||
|
||||
loc = {};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue