mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
Merge branch 'back_to_basics2' into InputStuffs
This commit is contained in:
commit
ee5689b07e
6 changed files with 33 additions and 10 deletions
|
@ -121,6 +121,7 @@ void G_BuildTiccmd(ticcmd_t* cmd)
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
bool newGameStarted;
|
||||||
|
|
||||||
static void GameTicker()
|
static void GameTicker()
|
||||||
{
|
{
|
||||||
|
@ -171,6 +172,7 @@ static void GameTicker()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ga_newgame:
|
case ga_newgame:
|
||||||
|
newGameStarted = true;
|
||||||
FX_StopAllSounds();
|
FX_StopAllSounds();
|
||||||
FX_SetReverb(0);
|
FX_SetReverb(0);
|
||||||
gi->FreeLevelData();
|
gi->FreeLevelData();
|
||||||
|
@ -210,7 +212,8 @@ static void GameTicker()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ga_autosave:
|
case ga_autosave:
|
||||||
if (gamestate == GS_LEVEL) M_Autosave();
|
if (gamestate == GS_LEVEL && !newGameStarted) M_Autosave();
|
||||||
|
newGameStarted = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ga_level:
|
case ga_level:
|
||||||
|
|
|
@ -954,7 +954,7 @@ public:
|
||||||
{
|
{
|
||||||
DrawStatus();
|
DrawStatus();
|
||||||
}
|
}
|
||||||
PrintLevelStats(hud_size == Hud_Nothing ? 0 : 40);
|
PrintLevelStats(hud_size == Hud_Nothing ? 0 : hud_size == Hud_full? 22 : 40);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -928,7 +928,7 @@ static void FinalizeInput(int playerNum, InputPacket& input, bool vehicle)
|
||||||
auto p = &ps[playerNum];
|
auto p = &ps[playerNum];
|
||||||
bool blocked = movementBlocked(playerNum) || sprite[p->i].extra <= 0 || (p->dead_flag && !ud.god);
|
bool blocked = movementBlocked(playerNum) || sprite[p->i].extra <= 0 || (p->dead_flag && !ud.god);
|
||||||
|
|
||||||
if (blocked)
|
if (blocked && ps[playerNum].newowner < 0)
|
||||||
{
|
{
|
||||||
// neutralize all movement when blocked or in automap follow mode
|
// neutralize all movement when blocked or in automap follow mode
|
||||||
loc.fvel = loc.svel = 0;
|
loc.fvel = loc.svel = 0;
|
||||||
|
|
|
@ -1723,7 +1723,7 @@ static void movement(int snum, ESyncBits actions, int psect, int fz, int cz, int
|
||||||
|
|
||||||
if ((p->posz + p->poszv) >= (fz - (i << 8))) // hit the ground
|
if ((p->posz + p->poszv) >= (fz - (i << 8))) // hit the ground
|
||||||
{
|
{
|
||||||
//S_StopSound(DUKE_SCREAM, pi);
|
S_StopSound(DUKE_SCREAM, pi);
|
||||||
if (sector[p->cursectnum].lotag != 1)
|
if (sector[p->cursectnum].lotag != 1)
|
||||||
{
|
{
|
||||||
if (p->falling_counter > 62) quickkill(p);
|
if (p->falling_counter > 62) quickkill(p);
|
||||||
|
|
|
@ -581,17 +581,37 @@ void displayrooms(int snum, double smoothratio)
|
||||||
|
|
||||||
if (p->newowner >= 0)
|
if (p->newowner >= 0)
|
||||||
{
|
{
|
||||||
fixed_t oang = hittype[p->newowner].oq16ang;
|
fixed_t a = IntToFixed(sprite[p->newowner].ang);
|
||||||
cang = q16ang(oang + xs_CRoundToInt(fmulscale16(((p->q16ang + dang - oang) & 0x7FFFFFF) - dang, smoothratio)));
|
if (p->newowner != p->oldowner)
|
||||||
|
{
|
||||||
|
p->oldowner = p->newowner;
|
||||||
|
hittype[p->newowner].oq16ang = a;
|
||||||
|
cang = q16ang(a);
|
||||||
|
p->camchangecnt = 3;
|
||||||
|
}
|
||||||
|
else if (p->camchangecnt > 0)
|
||||||
|
{
|
||||||
|
hittype[p->newowner].oq16ang = a;
|
||||||
|
cang = q16ang(a);
|
||||||
|
p->camchangecnt--;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fixed_t oang = hittype[p->newowner].oq16ang;
|
||||||
|
cang = q16ang(oang + xs_CRoundToInt(fmulscale16(((a + dang - oang) & 0x7FFFFFF) - dang, smoothratio)));
|
||||||
|
}
|
||||||
|
cang = q16ang(a);
|
||||||
choriz = q16horiz(p->q16horiz + p->q16horizoff);
|
choriz = q16horiz(p->q16horiz + p->q16horizoff);
|
||||||
cposx = p->posx;
|
cposx = sprite[p->newowner].pos.x;
|
||||||
cposy = p->posy;
|
cposy = sprite[p->newowner].pos.y;
|
||||||
cposz = p->posz;
|
cposz = sprite[p->newowner].pos.z;
|
||||||
sect = sprite[p->newowner].sectnum;
|
sect = sprite[p->newowner].sectnum;
|
||||||
smoothratio = MaxSmoothRatio;
|
smoothratio = MaxSmoothRatio;
|
||||||
}
|
}
|
||||||
else if (p->over_shoulder_on == 0)
|
else if (p->over_shoulder_on == 0)
|
||||||
{
|
{
|
||||||
|
p->camchangecnt = 0;
|
||||||
|
p->oldowner = -1;
|
||||||
if (cl_viewbob) cposz += p->opyoff + xs_CRoundToInt(fmulscale16(p->pyoff - p->opyoff, smoothratio));
|
if (cl_viewbob) cposz += p->opyoff + xs_CRoundToInt(fmulscale16(p->pyoff - p->opyoff, smoothratio));
|
||||||
}
|
}
|
||||||
else view(p, &cposx, &cposy, &cposz, §, cang.asbuild(), choriz.asbuild(), smoothratio);
|
else view(p, &cposx, &cposy, &cposz, §, cang.asbuild(), choriz.asbuild(), smoothratio);
|
||||||
|
|
|
@ -137,7 +137,7 @@ struct player_struct
|
||||||
short ammo_amount[MAX_WEAPONS], wackedbyactor, frag, fraggedself;
|
short ammo_amount[MAX_WEAPONS], wackedbyactor, frag, fraggedself;
|
||||||
|
|
||||||
short curr_weapon, last_weapon, tipincs, wantweaponfire;
|
short curr_weapon, last_weapon, tipincs, wantweaponfire;
|
||||||
short holoduke_amount, newowner, hurt_delay, hbomb_hold_delay;
|
short holoduke_amount, newowner, oldowner, camchangecnt, hurt_delay, hbomb_hold_delay;
|
||||||
short jumping_counter, airleft, knee_incs, access_incs;
|
short jumping_counter, airleft, knee_incs, access_incs;
|
||||||
short ftq, access_wallnum, access_spritenum;
|
short ftq, access_wallnum, access_spritenum;
|
||||||
short got_access, weapon_ang, firstaid_amount;
|
short got_access, weapon_ang, firstaid_amount;
|
||||||
|
|
Loading…
Reference in a new issue