mirror of
https://github.com/ZDoom/Raze.git
synced 2024-12-03 01:22:19 +00:00
- route the input to the player.
Still very broken.
This commit is contained in:
parent
dc24dcadf5
commit
25a0ce51ba
3 changed files with 8 additions and 10 deletions
|
@ -174,6 +174,8 @@ void processinput(int num) {
|
||||||
short onsprite = -1;
|
short onsprite = -1;
|
||||||
|
|
||||||
PLAYER& plr = player[num];
|
PLAYER& plr = player[num];
|
||||||
|
oldposx = plr.x;
|
||||||
|
oldposy = plr.y;
|
||||||
|
|
||||||
auto bits = plr.plInput.actions;
|
auto bits = plr.plInput.actions;
|
||||||
|
|
||||||
|
@ -228,7 +230,7 @@ void processinput(int num) {
|
||||||
tics += tics >> 1;
|
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 ((bits & SB_AIM_DOWN) != 0) {
|
||||||
if (plr.horiz > 100 - (200 >> 1)) {
|
if (plr.horiz > 100 - (200 >> 1)) {
|
||||||
|
@ -415,9 +417,6 @@ void processinput(int num) {
|
||||||
// yvect -= (plr.pInput.svel * tics * BCosAngle(plr.ang));
|
// yvect -= (plr.pInput.svel * tics * BCosAngle(plr.ang));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
oldposx = plr.x;
|
|
||||||
oldposy = plr.y;
|
|
||||||
|
|
||||||
if (plr.noclip) {
|
if (plr.noclip) {
|
||||||
plr.x += xvect >> 14;
|
plr.x += xvect >> 14;
|
||||||
plr.y += yvect >> 14;
|
plr.y += yvect >> 14;
|
||||||
|
|
|
@ -303,15 +303,13 @@ bool playrunning()
|
||||||
|
|
||||||
void GameInterface::Ticker()
|
void GameInterface::Ticker()
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
// Make copies so that the originals do not have to be modified.
|
// Make copies so that the originals do not have to be modified.
|
||||||
for (int i = 0; i < MAXPLAYERS; i++)
|
for (int i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
auto oldactions = ps[i].sync.actions;
|
auto oldactions = player[i].plInput.actions;
|
||||||
ps[i].sync = playercmds[i].ucmd;
|
player[i].plInput = playercmds[i].ucmd;
|
||||||
if (oldactions & SB_CENTERVIEW) ps[i].sync.actions |= SB_CENTERVIEW;
|
if (oldactions & SB_CENTERVIEW) player[i].plInput.actions |= SB_CENTERVIEW;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!playrunning())
|
if (!playrunning())
|
||||||
{
|
{
|
||||||
|
@ -325,7 +323,7 @@ void GameInterface::Ticker()
|
||||||
PLAYER &plr = player[pyrn];
|
PLAYER &plr = player[pyrn];
|
||||||
viewBackupPlayerLoc(pyrn);
|
viewBackupPlayerLoc(pyrn);
|
||||||
|
|
||||||
//processinput(pyrn);
|
processinput(pyrn);
|
||||||
updateviewmap(plr);
|
updateviewmap(plr);
|
||||||
updatepaletteshifts();
|
updatepaletteshifts();
|
||||||
|
|
||||||
|
|
|
@ -194,6 +194,7 @@ int movesprite(short spritenum, int dx, int dy, int dz, int ceildist, int flordi
|
||||||
void trowajavlin(int s);
|
void trowajavlin(int s);
|
||||||
void spawnhornskull(short i);
|
void spawnhornskull(short i);
|
||||||
void spawnapentagram(int sn);
|
void spawnapentagram(int sn);
|
||||||
|
void processinput(int num);
|
||||||
|
|
||||||
|
|
||||||
// whplr
|
// whplr
|
||||||
|
|
Loading…
Reference in a new issue