mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
Merge remote-tracking branch 'remotes/Github_private/back_to_basics2' into automap
This commit is contained in:
commit
2c183bf504
4 changed files with 13 additions and 28 deletions
|
@ -87,7 +87,6 @@ BEGIN_SW_NS
|
|||
|
||||
void Logo(const CompletionFunc& completion);
|
||||
void StatScreen(int FinishAnim, CompletionFunc completion);
|
||||
void getinput(InputPacket*, SWBOOL);
|
||||
|
||||
|
||||
void pClearSpriteList(PLAYERp pp);
|
||||
|
|
|
@ -67,8 +67,7 @@ void GameInterface::ResetFollowPos(bool)
|
|||
Follow_posy = pp->posy;
|
||||
}
|
||||
|
||||
void
|
||||
getinput(InputPacket *loc, SWBOOL tied)
|
||||
static void getinput(InputPacket *loc)
|
||||
{
|
||||
int i;
|
||||
PLAYERp pp = Player + myconnectindex;
|
||||
|
@ -111,7 +110,7 @@ getinput(InputPacket *loc, SWBOOL tied)
|
|||
// If in 2D follow mode, scroll around using glob vars
|
||||
// Tried calling this in domovethings, but key response it too poor, skips key presses
|
||||
// Note: this get called only during follow mode
|
||||
if (!tied && automapFollow && automapMode != am_off && pp == Player + myconnectindex && !Prediction)
|
||||
if (automapFollow && automapMode != am_off && pp == Player + myconnectindex && !Prediction)
|
||||
MoveScrollMode2D(Player + myconnectindex);
|
||||
|
||||
// !JIM! Added M_Active() so that you don't move at all while using menus
|
||||
|
@ -175,9 +174,6 @@ getinput(InputPacket *loc, SWBOOL tied)
|
|||
keymove = NORMALKEYMOVE;
|
||||
}
|
||||
|
||||
if (tied)
|
||||
keymove = 0;
|
||||
|
||||
int32_t svel = 0, vel = 0;
|
||||
fixed_t q16horz = 0, q16angvel = 0;
|
||||
|
||||
|
@ -279,23 +275,8 @@ getinput(InputPacket *loc, SWBOOL tied)
|
|||
pp->oq16horiz += pp->camq16horiz - prevcamq16horiz;
|
||||
}
|
||||
|
||||
loc->fvel += vel;
|
||||
loc->svel += svel;
|
||||
|
||||
if (!tied)
|
||||
{
|
||||
vel = clamp(loc->fvel, -MAXVEL, MAXVEL);
|
||||
svel = clamp(loc->svel, -MAXSVEL, MAXSVEL);
|
||||
|
||||
momx = mulscale9(vel, sintable[NORM_ANGLE(FixedToInt(newpp->q16ang) + 512)]);
|
||||
momy = mulscale9(vel, sintable[NORM_ANGLE(FixedToInt(newpp->q16ang))]);
|
||||
|
||||
momx += mulscale9(svel, sintable[NORM_ANGLE(FixedToInt(newpp->q16ang))]);
|
||||
momy += mulscale9(svel, sintable[NORM_ANGLE(FixedToInt(newpp->q16ang) + 1536)]);
|
||||
|
||||
loc->fvel = momx;
|
||||
loc->svel = momy;
|
||||
}
|
||||
loc->fvel = clamp(loc->fvel + vel, -MAXVEL, MAXVEL);
|
||||
loc->svel = clamp(loc->svel + svel, -MAXSVEL, MAXSVEL);
|
||||
|
||||
loc->q16avel += q16angvel;
|
||||
loc->q16horz += q16horz;
|
||||
|
@ -380,10 +361,17 @@ getinput(InputPacket *loc, SWBOOL tied)
|
|||
|
||||
void GameInterface::GetInput(InputPacket *packet)
|
||||
{
|
||||
getinput(&loc, FALSE);
|
||||
getinput(&loc);
|
||||
if (packet)
|
||||
{
|
||||
PLAYERp pp = &Player[myconnectindex];
|
||||
|
||||
auto fvel = loc.fvel;
|
||||
auto svel = loc.svel;
|
||||
auto ang = FixedToInt(pp->camq16ang);
|
||||
|
||||
loc.fvel = mulscale9(fvel, sintable[NORM_ANGLE(ang + 512)]) + mulscale9(svel, sintable[NORM_ANGLE(ang)]);
|
||||
loc.svel = mulscale9(fvel, sintable[NORM_ANGLE(ang)]) + mulscale9(svel, sintable[NORM_ANGLE(ang + 1536)]);
|
||||
loc.q16ang = pp->camq16ang;
|
||||
loc.q16horiz = pp->camq16horiz;
|
||||
*packet = loc;
|
||||
|
|
|
@ -42,8 +42,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
|
||||
BEGIN_SW_NS
|
||||
|
||||
void getinput(InputPacket *, SWBOOL);
|
||||
|
||||
static uint8_t tempbuf[576], packbuf[576];
|
||||
int PlayClock;
|
||||
|
||||
|
|
|
@ -7378,7 +7378,7 @@ void ChopsCheck(PLAYERp pp)
|
|||
{
|
||||
if (!M_Active() && !TEST(pp->Flags, PF_DEAD) && !pp->sop_riding && numplayers <= 1)
|
||||
{
|
||||
if (pp->input.actions || pp->input.fvel || pp->input.svel || pp->input.q16avel || pp->input.q16horz ||
|
||||
if (pp->input.actions & ~SB_RUN || pp->input.fvel || pp->input.svel || pp->input.q16avel || pp->input.q16horz ||
|
||||
TEST(pp->Flags, PF_CLIMBING | PF_FALLING | PF_DIVING))
|
||||
{
|
||||
// Hit a input key or other reason to stop chops
|
||||
|
|
Loading…
Reference in a new issue