diff --git a/source/games/whaven/src/input.cpp b/source/games/whaven/src/input.cpp index 6ab2f8471..df50ce4ae 100644 --- a/source/games/whaven/src/input.cpp +++ b/source/games/whaven/src/input.cpp @@ -174,6 +174,8 @@ void processinput(int num) { short onsprite = -1; PLAYER& plr = player[num]; + oldposx = plr.x; + oldposy = plr.y; auto bits = plr.plInput.actions; @@ -228,7 +230,7 @@ void processinput(int num) { tics += tics >> 1; } - plr.horiz = clamp(plr.horiz + plr.plInput.horz + 100, -(200 >> 1), 100 + (200 >> 1)); + plr.horiz = clamp(plr.horiz + plr.plInput.horz, -(200 >> 1), 100 + (200 >> 1)); if ((bits & SB_AIM_DOWN) != 0) { if (plr.horiz > 100 - (200 >> 1)) { @@ -415,9 +417,6 @@ void processinput(int num) { // yvect -= (plr.pInput.svel * tics * BCosAngle(plr.ang)); // } - oldposx = plr.x; - oldposy = plr.y; - if (plr.noclip) { plr.x += xvect >> 14; plr.y += yvect >> 14; diff --git a/source/games/whaven/src/main.cpp b/source/games/whaven/src/main.cpp index a71e449e6..7ed98113a 100644 --- a/source/games/whaven/src/main.cpp +++ b/source/games/whaven/src/main.cpp @@ -303,15 +303,13 @@ bool playrunning() void GameInterface::Ticker() { -#if 0 // Make copies so that the originals do not have to be modified. for (int i = 0; i < MAXPLAYERS; i++) { - auto oldactions = ps[i].sync.actions; - ps[i].sync = playercmds[i].ucmd; - if (oldactions & SB_CENTERVIEW) ps[i].sync.actions |= SB_CENTERVIEW; + auto oldactions = player[i].plInput.actions; + player[i].plInput = playercmds[i].ucmd; + if (oldactions & SB_CENTERVIEW) player[i].plInput.actions |= SB_CENTERVIEW; } -#endif if (!playrunning()) { @@ -325,7 +323,7 @@ void GameInterface::Ticker() PLAYER &plr = player[pyrn]; viewBackupPlayerLoc(pyrn); - //processinput(pyrn); + processinput(pyrn); updateviewmap(plr); updatepaletteshifts(); diff --git a/source/games/whaven/src/wh.h b/source/games/whaven/src/wh.h index f87ca79b9..8d5e19ab4 100644 --- a/source/games/whaven/src/wh.h +++ b/source/games/whaven/src/wh.h @@ -194,6 +194,7 @@ int movesprite(short spritenum, int dx, int dy, int dz, int ceildist, int flordi void trowajavlin(int s); void spawnhornskull(short i); void spawnapentagram(int sn); +void processinput(int num); // whplr