mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- buildutils: Replace sintable[]
use within Duke's input.cpp with bsin()
/bcos()
.
This commit is contained in:
parent
d934bfd985
commit
fd4e1b3b28
1 changed files with 4 additions and 10 deletions
|
@ -897,18 +897,12 @@ void GameInterface::GetInput(InputPacket* packet, ControlInfo* const hidInput)
|
||||||
|
|
||||||
if (packet)
|
if (packet)
|
||||||
{
|
{
|
||||||
auto const pPlayer = &ps[myconnectindex];
|
auto cos = p->angle.ang.bcos();
|
||||||
auto const ang = pPlayer->angle.ang.asbuild();
|
auto sin = p->angle.ang.bsin();
|
||||||
|
|
||||||
*packet = loc;
|
*packet = loc;
|
||||||
auto fvel = loc.fvel;
|
packet->fvel = mulscale9(loc.fvel, cos) + mulscale9(loc.svel, sin) + p->fric.x;
|
||||||
auto svel = loc.svel;
|
packet->svel = mulscale9(loc.fvel, sin) - mulscale9(loc.svel, cos) + p->fric.y;
|
||||||
packet->fvel = mulscale9(fvel, sintable[(ang + 2560) & 2047]) +
|
|
||||||
mulscale9(svel, sintable[(ang + 2048) & 2047]) +
|
|
||||||
pPlayer->fric.x;
|
|
||||||
packet->svel = mulscale9(fvel, sintable[(ang + 2048) & 2047]) +
|
|
||||||
mulscale9(svel, sintable[(ang + 1536) & 2047]) +
|
|
||||||
pPlayer->fric.y;
|
|
||||||
loc = {};
|
loc = {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue