mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 06:32:37 +00:00
- addweapon.
This commit is contained in:
parent
294a7e4c9c
commit
2cc4176ed8
11 changed files with 156 additions and 181 deletions
|
@ -119,15 +119,57 @@ void addammo(short weapon, struct player_struct* p, short amount)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void addweapon(struct player_struct* p, short weapon)
|
void addweapon(struct player_struct* p, int weapon)
|
||||||
{
|
{
|
||||||
if (!p->gotweapon[weapon])
|
short cw = p->curr_weapon;
|
||||||
|
if (p->OnMotorcycle || p->OnBoat)
|
||||||
{
|
{
|
||||||
p->gotweapon.Set(weapon);
|
p->gotweapon.Set(weapon);
|
||||||
if (weapon == SHRINKER_WEAPON)
|
if (weapon == SHRINKER_WEAPON)
|
||||||
|
{
|
||||||
p->gotweapon.Set(GROW_WEAPON);
|
p->gotweapon.Set(GROW_WEAPON);
|
||||||
|
p->ammo_amount[GROW_WEAPON] = 1;
|
||||||
|
}
|
||||||
|
else if (weapon == RPG_WEAPON)
|
||||||
|
{
|
||||||
|
p->gotweapon.Set(RA16_WEAPON);
|
||||||
|
}
|
||||||
|
else if (weapon == RA15_WEAPON)
|
||||||
|
{
|
||||||
|
p->ammo_amount[RA15_WEAPON] = 1;
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (p->gotweapon[weapon] == 0)
|
||||||
|
{
|
||||||
|
p->gotweapon.Set(weapon);
|
||||||
|
if (weapon == SHRINKER_WEAPON)
|
||||||
|
{
|
||||||
|
p->gotweapon.Set(GROW_WEAPON);
|
||||||
|
if (g_gameType & GAMEFLAG_RRRA) p->ammo_amount[GROW_WEAPON] = 1;
|
||||||
|
}
|
||||||
|
if (g_gameType & GAMEFLAG_RRRA)
|
||||||
|
{
|
||||||
|
if (weapon == RPG_WEAPON)
|
||||||
|
{
|
||||||
|
p->gotweapon.Set(RA16_WEAPON);
|
||||||
|
}
|
||||||
|
if (weapon == RA15_WEAPON)
|
||||||
|
{
|
||||||
|
p->ammo_amount[RA15_WEAPON] = 50;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(g_gameType & GAMEFLAG_RRALL) || weapon != HANDBOMB_WEAPON)
|
||||||
|
cw = weapon;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
cw = weapon;
|
||||||
|
|
||||||
|
if ((g_gameType & GAMEFLAG_RRALL) && weapon == HANDBOMB_WEAPON)
|
||||||
|
p->last_weapon = -1;
|
||||||
|
|
||||||
p->random_club_frame = 0;
|
p->random_club_frame = 0;
|
||||||
|
|
||||||
if (p->holster_weapon == 0)
|
if (p->holster_weapon == 0)
|
||||||
|
@ -144,12 +186,12 @@ void addweapon(struct player_struct* p, short weapon)
|
||||||
|
|
||||||
p->kickback_pic = 0;
|
p->kickback_pic = 0;
|
||||||
#ifdef EDUKE
|
#ifdef EDUKE
|
||||||
if (p->curr_weapon != weapon)
|
if (p->curr_weapon != cw)
|
||||||
{
|
{
|
||||||
short snum;
|
short snum;
|
||||||
snum = sprite[p->i].yvel;
|
snum = sprite[p->i].yvel;
|
||||||
|
|
||||||
SetGameVarID(g_iWeaponVarID, weapon, p->i, snum);
|
SetGameVarID(g_iWeaponVarID, cw, p->i, snum);
|
||||||
if (p->curr_weapon >= 0)
|
if (p->curr_weapon >= 0)
|
||||||
{
|
{
|
||||||
SetGameVarID(g_iWorksLikeVarID, aplWeaponWorksLike[weapon][snum], p->i, snum);
|
SetGameVarID(g_iWorksLikeVarID, aplWeaponWorksLike[weapon][snum], p->i, snum);
|
||||||
|
@ -162,15 +204,16 @@ void addweapon(struct player_struct* p, short weapon)
|
||||||
OnEvent(EVENT_CHANGEWEAPON, p->i, snum, -1);
|
OnEvent(EVENT_CHANGEWEAPON, p->i, snum, -1);
|
||||||
if (GetGameVarID(g_iReturnVarID, -1, snum) == 0)
|
if (GetGameVarID(g_iReturnVarID, -1, snum) == 0)
|
||||||
{
|
{
|
||||||
p->curr_weapon = weapon;
|
p->curr_weapon = cw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
p->curr_weapon = weapon;
|
p->curr_weapon = cw;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch (weapon)
|
switch (weapon)
|
||||||
{
|
{
|
||||||
|
case RA15_WEAPON:
|
||||||
case KNEE_WEAPON:
|
case KNEE_WEAPON:
|
||||||
case TRIPBOMB_WEAPON:
|
case TRIPBOMB_WEAPON:
|
||||||
case HANDREMOTE_WEAPON:
|
case HANDREMOTE_WEAPON:
|
||||||
|
|
|
@ -3105,10 +3105,10 @@ static int P_Submerge(int const spriteNum, int const playerNum, DukePlayer_t * c
|
||||||
{
|
{
|
||||||
if ((!RR && pPlayer->on_ground && pPlayer->pos.z > sector[sectNum].floorz - ZOFFSET2
|
if ((!RR && pPlayer->on_ground && pPlayer->pos.z > sector[sectNum].floorz - ZOFFSET2
|
||||||
&& (TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_CROUCH) || pPlayer->vel.z > 2048))
|
&& (TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_CROUCH) || pPlayer->vel.z > 2048))
|
||||||
|| (RR && pPlayer->pos.z > (sector[sectNum].floorz-(6<<8))) || pPlayer->on_motorcycle)
|
|| (RR && pPlayer->pos.z > (sector[sectNum].floorz-(6<<8))) || pPlayer->OnMotorcycle)
|
||||||
// if( onfloorz && sectlotag == 1 && ps->pos.z > (sector[sect].floorz-(6<<8)) )
|
// if( onfloorz && sectlotag == 1 && ps->pos.z > (sector[sect].floorz-(6<<8)) )
|
||||||
{
|
{
|
||||||
if (pPlayer->on_boat) return 0;
|
if (pPlayer->OnBoat) return 0;
|
||||||
|
|
||||||
if (screenpeek == playerNum)
|
if (screenpeek == playerNum)
|
||||||
{
|
{
|
||||||
|
@ -3127,7 +3127,7 @@ static int P_Submerge(int const spriteNum, int const playerNum, DukePlayer_t * c
|
||||||
pPlayer->vel.y = 4096-(krand2()&8192);
|
pPlayer->vel.y = 4096-(krand2()&8192);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pPlayer->on_motorcycle)
|
if (pPlayer->OnMotorcycle)
|
||||||
pPlayer->moto_underwater = 1;
|
pPlayer->moto_underwater = 1;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -635,7 +635,7 @@ void G_DoCheats(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_VIEW:
|
case CHEAT_VIEW:
|
||||||
if (!RRRA || (!pPlayer->on_motorcycle && !pPlayer->on_boat))
|
if (!RRRA || (!pPlayer->OnMotorcycle && !pPlayer->OnBoat))
|
||||||
{
|
{
|
||||||
pPlayer->over_shoulder_on ^= 1;
|
pPlayer->over_shoulder_on ^= 1;
|
||||||
CAMERADIST = 0;
|
CAMERADIST = 0;
|
||||||
|
|
|
@ -214,7 +214,7 @@ int32_t A_CheckInventorySprite(spritetype *s)
|
||||||
|
|
||||||
void G_OnMotorcycle(DukePlayer_t *pPlayer, int spriteNum)
|
void G_OnMotorcycle(DukePlayer_t *pPlayer, int spriteNum)
|
||||||
{
|
{
|
||||||
if (!pPlayer->on_motorcycle && !(sector[pPlayer->cursectnum].lotag == 2))
|
if (!pPlayer->OnMotorcycle && !(sector[pPlayer->cursectnum].lotag == 2))
|
||||||
{
|
{
|
||||||
if (spriteNum)
|
if (spriteNum)
|
||||||
{
|
{
|
||||||
|
@ -225,7 +225,7 @@ void G_OnMotorcycle(DukePlayer_t *pPlayer, int spriteNum)
|
||||||
A_DeleteSprite(spriteNum);
|
A_DeleteSprite(spriteNum);
|
||||||
}
|
}
|
||||||
pPlayer->over_shoulder_on = 0;
|
pPlayer->over_shoulder_on = 0;
|
||||||
pPlayer->on_motorcycle = 1;
|
pPlayer->OnMotorcycle = 1;
|
||||||
pPlayer->last_full_weapon = pPlayer->curr_weapon;
|
pPlayer->last_full_weapon = pPlayer->curr_weapon;
|
||||||
pPlayer->curr_weapon = MOTORCYCLE_WEAPON;
|
pPlayer->curr_weapon = MOTORCYCLE_WEAPON;
|
||||||
pPlayer->gotweapon.Set(MOTORCYCLE_WEAPON);
|
pPlayer->gotweapon.Set(MOTORCYCLE_WEAPON);
|
||||||
|
@ -240,7 +240,7 @@ void G_OnMotorcycle(DukePlayer_t *pPlayer, int spriteNum)
|
||||||
void G_OffMotorcycle(DukePlayer_t *pPlayer)
|
void G_OffMotorcycle(DukePlayer_t *pPlayer)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
if (pPlayer->on_motorcycle)
|
if (pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
if (A_CheckSoundPlaying(pPlayer->i,188))
|
if (A_CheckSoundPlaying(pPlayer->i,188))
|
||||||
S_StopEnvSound(188,pPlayer->i);
|
S_StopEnvSound(188,pPlayer->i);
|
||||||
|
@ -252,7 +252,7 @@ void G_OffMotorcycle(DukePlayer_t *pPlayer)
|
||||||
S_StopEnvSound(214,pPlayer->i);
|
S_StopEnvSound(214,pPlayer->i);
|
||||||
if (!A_CheckSoundPlaying(pPlayer->i,42))
|
if (!A_CheckSoundPlaying(pPlayer->i,42))
|
||||||
A_PlaySound(42, pPlayer->i);
|
A_PlaySound(42, pPlayer->i);
|
||||||
pPlayer->on_motorcycle = 0;
|
pPlayer->OnMotorcycle = 0;
|
||||||
pPlayer->gotweapon.Clear(MOTORCYCLE_WEAPON);
|
pPlayer->gotweapon.Clear(MOTORCYCLE_WEAPON);
|
||||||
pPlayer->curr_weapon = pPlayer->last_full_weapon;
|
pPlayer->curr_weapon = pPlayer->last_full_weapon;
|
||||||
P_CheckWeapon(pPlayer);
|
P_CheckWeapon(pPlayer);
|
||||||
|
@ -279,7 +279,7 @@ void G_OffMotorcycle(DukePlayer_t *pPlayer)
|
||||||
|
|
||||||
void G_OnBoat(DukePlayer_t *pPlayer, int spriteNum)
|
void G_OnBoat(DukePlayer_t *pPlayer, int spriteNum)
|
||||||
{
|
{
|
||||||
if (!pPlayer->on_boat)
|
if (!pPlayer->OnBoat)
|
||||||
{
|
{
|
||||||
if (spriteNum)
|
if (spriteNum)
|
||||||
{
|
{
|
||||||
|
@ -290,7 +290,7 @@ void G_OnBoat(DukePlayer_t *pPlayer, int spriteNum)
|
||||||
deletesprite(spriteNum);
|
deletesprite(spriteNum);
|
||||||
}
|
}
|
||||||
pPlayer->over_shoulder_on = 0;
|
pPlayer->over_shoulder_on = 0;
|
||||||
pPlayer->on_boat = 1;
|
pPlayer->OnBoat = 1;
|
||||||
pPlayer->last_full_weapon = pPlayer->curr_weapon;
|
pPlayer->last_full_weapon = pPlayer->curr_weapon;
|
||||||
pPlayer->curr_weapon = BOAT_WEAPON;
|
pPlayer->curr_weapon = BOAT_WEAPON;
|
||||||
pPlayer->gotweapon.Set(BOAT_WEAPON);
|
pPlayer->gotweapon.Set(BOAT_WEAPON);
|
||||||
|
@ -303,9 +303,9 @@ void G_OnBoat(DukePlayer_t *pPlayer, int spriteNum)
|
||||||
void G_OffBoat(DukePlayer_t *pPlayer)
|
void G_OffBoat(DukePlayer_t *pPlayer)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
if (pPlayer->on_boat)
|
if (pPlayer->OnBoat)
|
||||||
{
|
{
|
||||||
pPlayer->on_boat = 0;
|
pPlayer->OnBoat = 0;
|
||||||
pPlayer->gotweapon.Clear(BOAT_WEAPON);
|
pPlayer->gotweapon.Clear(BOAT_WEAPON);
|
||||||
pPlayer->curr_weapon = pPlayer->last_full_weapon;
|
pPlayer->curr_weapon = pPlayer->last_full_weapon;
|
||||||
P_CheckWeapon(pPlayer);
|
P_CheckWeapon(pPlayer);
|
||||||
|
@ -5005,7 +5005,7 @@ default_case1:
|
||||||
}
|
}
|
||||||
newTspr->z = (pSprite->owner >= 0) ? g_player[playerNum].ps->pos.z - ZOFFSET4 : pSprite->z - (51 << 8);
|
newTspr->z = (pSprite->owner >= 0) ? g_player[playerNum].ps->pos.z - ZOFFSET4 : pSprite->z - (51 << 8);
|
||||||
newTspr->xrepeat = (newTspr->picnum == TILE_HEAVYHBOMB) ? 10 : 16;
|
newTspr->xrepeat = (newTspr->picnum == TILE_HEAVYHBOMB) ? 10 : 16;
|
||||||
if (RRRA && (g_player[playerNum].ps->on_motorcycle || g_player[playerNum].ps->on_boat))
|
if (RRRA && (g_player[playerNum].ps->OnMotorcycle || g_player[playerNum].ps->OnBoat))
|
||||||
newTspr->xrepeat = 0;
|
newTspr->xrepeat = 0;
|
||||||
newTspr->yrepeat = newTspr->xrepeat;
|
newTspr->yrepeat = newTspr->xrepeat;
|
||||||
|
|
||||||
|
@ -5112,7 +5112,7 @@ PALONLY:
|
||||||
|
|
||||||
if (RRRA)
|
if (RRRA)
|
||||||
{
|
{
|
||||||
if (g_player[playerNum].ps->on_motorcycle && playerNum == screenpeek)
|
if (g_player[playerNum].ps->OnMotorcycle && playerNum == screenpeek)
|
||||||
{
|
{
|
||||||
t->picnum = TILE_RRTILE7219;
|
t->picnum = TILE_RRTILE7219;
|
||||||
t->xrepeat = 18;
|
t->xrepeat = 18;
|
||||||
|
@ -5120,7 +5120,7 @@ PALONLY:
|
||||||
scrofs_action = 0;
|
scrofs_action = 0;
|
||||||
curframe = 0;
|
curframe = 0;
|
||||||
}
|
}
|
||||||
else if (g_player[playerNum].ps->on_motorcycle)
|
else if (g_player[playerNum].ps->OnMotorcycle)
|
||||||
{
|
{
|
||||||
t->xrepeat = 18;
|
t->xrepeat = 18;
|
||||||
t->yrepeat = 18;
|
t->yrepeat = 18;
|
||||||
|
@ -5139,7 +5139,7 @@ PALONLY:
|
||||||
|
|
||||||
t->picnum = TILE_RRTILE7213 + frameOffset;
|
t->picnum = TILE_RRTILE7213 + frameOffset;
|
||||||
}
|
}
|
||||||
else if (g_player[playerNum].ps->on_boat && playerNum == screenpeek)
|
else if (g_player[playerNum].ps->OnBoat && playerNum == screenpeek)
|
||||||
{
|
{
|
||||||
t->picnum = TILE_RRTILE7190;
|
t->picnum = TILE_RRTILE7190;
|
||||||
t->xrepeat = 32;
|
t->xrepeat = 32;
|
||||||
|
@ -5147,7 +5147,7 @@ PALONLY:
|
||||||
scrofs_action = 0;
|
scrofs_action = 0;
|
||||||
curframe = 0;
|
curframe = 0;
|
||||||
}
|
}
|
||||||
else if (g_player[playerNum].ps->on_boat)
|
else if (g_player[playerNum].ps->OnBoat)
|
||||||
{
|
{
|
||||||
t->xrepeat = 32;
|
t->xrepeat = 32;
|
||||||
t->yrepeat = 32;
|
t->yrepeat = 32;
|
||||||
|
@ -5993,7 +5993,7 @@ void G_HandleLocalKeys(void)
|
||||||
{
|
{
|
||||||
buttonMap.ClearButton(gamefunc_Third_Person_View);
|
buttonMap.ClearButton(gamefunc_Third_Person_View);
|
||||||
|
|
||||||
if (!RRRA || (!g_player[myconnectindex].ps->on_motorcycle && !g_player[myconnectindex].ps->on_boat))
|
if (!RRRA || (!g_player[myconnectindex].ps->OnMotorcycle && !g_player[myconnectindex].ps->OnBoat))
|
||||||
{
|
{
|
||||||
g_player[myconnectindex].ps->over_shoulder_on = !g_player[myconnectindex].ps->over_shoulder_on;
|
g_player[myconnectindex].ps->over_shoulder_on = !g_player[myconnectindex].ps->over_shoulder_on;
|
||||||
|
|
||||||
|
@ -7146,6 +7146,7 @@ int GameInterface::app_main()
|
||||||
|
|
||||||
videoInit();
|
videoInit();
|
||||||
InitFonts();
|
InitFonts();
|
||||||
|
V_LoadTranslations();
|
||||||
videoSetPalette(0, g_player[myconnectindex].ps->palette, 0);
|
videoSetPalette(0, g_player[myconnectindex].ps->palette, 0);
|
||||||
|
|
||||||
// check if the minifont will support lowercase letters (3136-3161)
|
// check if the minifont will support lowercase letters (3136-3161)
|
||||||
|
@ -7281,9 +7282,9 @@ MAIN_LOOP_RESTART:
|
||||||
{
|
{
|
||||||
ototalclock += TICSPERFRAME;
|
ototalclock += TICSPERFRAME;
|
||||||
|
|
||||||
if (RRRA && g_player[myconnectindex].ps->on_motorcycle)
|
if (RRRA && g_player[myconnectindex].ps->OnMotorcycle)
|
||||||
P_GetInputMotorcycle(myconnectindex);
|
P_GetInputMotorcycle(myconnectindex);
|
||||||
else if (RRRA && g_player[myconnectindex].ps->on_boat)
|
else if (RRRA && g_player[myconnectindex].ps->OnBoat)
|
||||||
P_GetInputBoat(myconnectindex);
|
P_GetInputBoat(myconnectindex);
|
||||||
else
|
else
|
||||||
P_GetInput(myconnectindex);
|
P_GetInput(myconnectindex);
|
||||||
|
@ -7334,9 +7335,9 @@ MAIN_LOOP_RESTART:
|
||||||
}
|
}
|
||||||
else */if (G_FPSLimit())
|
else */if (G_FPSLimit())
|
||||||
{
|
{
|
||||||
if (RRRA && g_player[myconnectindex].ps->on_motorcycle)
|
if (RRRA && g_player[myconnectindex].ps->OnMotorcycle)
|
||||||
P_GetInputMotorcycle(myconnectindex);
|
P_GetInputMotorcycle(myconnectindex);
|
||||||
else if (RRRA && g_player[myconnectindex].ps->on_boat)
|
else if (RRRA && g_player[myconnectindex].ps->OnBoat)
|
||||||
P_GetInputBoat(myconnectindex);
|
P_GetInputBoat(myconnectindex);
|
||||||
else
|
else
|
||||||
P_GetInput(myconnectindex);
|
P_GetInput(myconnectindex);
|
||||||
|
|
|
@ -2300,11 +2300,11 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case CON_IFONMOTO:
|
case CON_IFONMOTO:
|
||||||
VM_CONDITIONAL(pPlayer->on_motorcycle == 1);
|
VM_CONDITIONAL(pPlayer->OnMotorcycle == 1);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case CON_IFONBOAT:
|
case CON_IFONBOAT:
|
||||||
VM_CONDITIONAL(pPlayer->on_boat == 1);
|
VM_CONDITIONAL(pPlayer->OnBoat == 1);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case CON_IFSIZEDOWN:
|
case CON_IFSIZEDOWN:
|
||||||
|
|
|
@ -3590,6 +3590,8 @@ enum dukeweapon_t_alt
|
||||||
BOAT_WEAPON,
|
BOAT_WEAPON,
|
||||||
SLINGBLADE_WEAPON, // 15
|
SLINGBLADE_WEAPON, // 15
|
||||||
CHICKEN_WEAPON,
|
CHICKEN_WEAPON,
|
||||||
|
RA15_WEAPON = 15, // 15
|
||||||
|
RA16_WEAPON,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum redneck_weapon_t
|
enum redneck_weapon_t
|
||||||
|
|
|
@ -246,7 +246,7 @@ void Net_DoPrediction(void)
|
||||||
|
|
||||||
if (RRRA)
|
if (RRRA)
|
||||||
{
|
{
|
||||||
if (pPlayer->on_motorcycle && pSprite->extra > 0)
|
if (pPlayer->OnMotorcycle && pSprite->extra > 0)
|
||||||
{
|
{
|
||||||
int var64, var68, var6c, var74, var7c;
|
int var64, var68, var6c, var74, var7c;
|
||||||
if (my_moto_speed < 0)
|
if (my_moto_speed < 0)
|
||||||
|
@ -445,7 +445,7 @@ void Net_DoPrediction(void)
|
||||||
my_moto_on_mud = 0;
|
my_moto_on_mud = 0;
|
||||||
my_moto_on_oil = 0;
|
my_moto_on_oil = 0;
|
||||||
}
|
}
|
||||||
else if (pPlayer->on_boat && pSprite->extra > 0)
|
else if (pPlayer->OnBoat && pSprite->extra > 0)
|
||||||
{
|
{
|
||||||
int vara8, varac, varb0, varb4, varbc, varc4;
|
int vara8, varac, varb0, varb4, varbc, varc4;
|
||||||
if (my_moto_speed < 0)
|
if (my_moto_speed < 0)
|
||||||
|
@ -747,7 +747,7 @@ void Net_DoPrediction(void)
|
||||||
if (!my_stairs)
|
if (!my_stairs)
|
||||||
{
|
{
|
||||||
my_stairs = 10;
|
my_stairs = 10;
|
||||||
if (TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->on_motorcycle))
|
if (TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->OnMotorcycle))
|
||||||
{
|
{
|
||||||
highZhit = 0;
|
highZhit = 0;
|
||||||
ceilZ = pPlayer->truecz;
|
ceilZ = pPlayer->truecz;
|
||||||
|
@ -774,14 +774,14 @@ void Net_DoPrediction(void)
|
||||||
|
|
||||||
if (RRRA)
|
if (RRRA)
|
||||||
{
|
{
|
||||||
if (pPlayer->on_motorcycle)
|
if (pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
if (A_CheckEnemySprite(&sprite[spriteNum]))
|
if (A_CheckEnemySprite(&sprite[spriteNum]))
|
||||||
{
|
{
|
||||||
my_moto_speed -= my_moto_speed >> 4;
|
my_moto_speed -= my_moto_speed >> 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pPlayer->on_boat)
|
if (pPlayer->OnBoat)
|
||||||
{
|
{
|
||||||
if (A_CheckEnemySprite(&sprite[spriteNum]))
|
if (A_CheckEnemySprite(&sprite[spriteNum]))
|
||||||
{
|
{
|
||||||
|
@ -811,7 +811,7 @@ check_enemy_sprite:
|
||||||
if (!my_stairs)
|
if (!my_stairs)
|
||||||
{
|
{
|
||||||
my_stairs = 10;
|
my_stairs = 10;
|
||||||
if (TEST_SYNC_KEY(playerBits, SK_CROUCH) && (!RRRA || !pPlayer->on_motorcycle))
|
if (TEST_SYNC_KEY(playerBits, SK_CROUCH) && (!RRRA || !pPlayer->OnMotorcycle))
|
||||||
{
|
{
|
||||||
ceilZ = sprite[spriteNum].z;
|
ceilZ = sprite[spriteNum].z;
|
||||||
highZhit = 0;
|
highZhit = 0;
|
||||||
|
@ -936,7 +936,7 @@ check_enemy_sprite:
|
||||||
{
|
{
|
||||||
myonground = 0;
|
myonground = 0;
|
||||||
|
|
||||||
if (RRRA && (pPlayer->on_motorcycle || pPlayer->on_boat) && floorZ - (floorZOffset << 9) > mypos.z)
|
if (RRRA && (pPlayer->OnMotorcycle || pPlayer->OnBoat) && floorZ - (floorZOffset << 9) > mypos.z)
|
||||||
{
|
{
|
||||||
if (my_moto_on_ground)
|
if (my_moto_on_ground)
|
||||||
{
|
{
|
||||||
|
@ -999,12 +999,12 @@ check_enemy_sprite:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TEST_SYNC_KEY(playerBits, SK_CROUCH) && (!RRRA || !pPlayer->on_motorcycle))
|
if (TEST_SYNC_KEY(playerBits, SK_CROUCH) && (!RRRA || !pPlayer->OnMotorcycle))
|
||||||
mypos.z += (2048+768);
|
mypos.z += (2048+768);
|
||||||
|
|
||||||
if (!TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->on_motorcycle) && myjumpingtoggle == 1)
|
if (!TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->OnMotorcycle) && myjumpingtoggle == 1)
|
||||||
myjumpingtoggle = 0;
|
myjumpingtoggle = 0;
|
||||||
else if (TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->on_motorcycle) && myjumpingtoggle == 0)
|
else if (TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->OnMotorcycle) && myjumpingtoggle == 0)
|
||||||
{
|
{
|
||||||
if (myjumpingcounter == 0)
|
if (myjumpingcounter == 0)
|
||||||
if ((floorZ-ceilZ) > (56<<8))
|
if ((floorZ-ceilZ) > (56<<8))
|
||||||
|
@ -1019,7 +1019,7 @@ check_enemy_sprite:
|
||||||
|
|
||||||
if (myjumpingcounter)
|
if (myjumpingcounter)
|
||||||
{
|
{
|
||||||
if (!TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->on_motorcycle) && myjumpingtoggle == 1)
|
if (!TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->OnMotorcycle) && myjumpingtoggle == 1)
|
||||||
myjumpingtoggle = 0;
|
myjumpingtoggle = 0;
|
||||||
|
|
||||||
if (myjumpingcounter < (RR ? 768 : (1024+256)))
|
if (myjumpingcounter < (RR ? 768 : (1024+256)))
|
||||||
|
@ -1082,7 +1082,7 @@ check_enemy_sprite:
|
||||||
{
|
{
|
||||||
if (sectorLotag == ST_1_ABOVE_WATER)
|
if (sectorLotag == ST_1_ABOVE_WATER)
|
||||||
my_not_on_water = 0;
|
my_not_on_water = 0;
|
||||||
else if (pPlayer->on_boat)
|
else if (pPlayer->OnBoat)
|
||||||
{
|
{
|
||||||
if (sectorLotag == 1234)
|
if (sectorLotag == 1234)
|
||||||
my_not_on_water = 0;
|
my_not_on_water = 0;
|
||||||
|
@ -1116,12 +1116,12 @@ check_enemy_sprite:
|
||||||
{
|
{
|
||||||
if (sector[mycursectnum].floorpicnum == TILE_RRTILE7888)
|
if (sector[mycursectnum].floorpicnum == TILE_RRTILE7888)
|
||||||
{
|
{
|
||||||
if (pPlayer->on_motorcycle && myonground)
|
if (pPlayer->OnMotorcycle && myonground)
|
||||||
my_moto_on_oil = 1;
|
my_moto_on_oil = 1;
|
||||||
}
|
}
|
||||||
else if (sector[mycursectnum].floorpicnum == TILE_RRTILE7889)
|
else if (sector[mycursectnum].floorpicnum == TILE_RRTILE7889)
|
||||||
{
|
{
|
||||||
if (pPlayer->on_motorcycle)
|
if (pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
if (myonground)
|
if (myonground)
|
||||||
my_moto_on_mud = 1;
|
my_moto_on_mud = 1;
|
||||||
|
@ -1135,7 +1135,7 @@ check_enemy_sprite:
|
||||||
}
|
}
|
||||||
if (sector[mycursectnum].floorpicnum == TILE_RRTILE3073 || sector[mycursectnum].floorpicnum == TILE_RRTILE2702)
|
if (sector[mycursectnum].floorpicnum == TILE_RRTILE3073 || sector[mycursectnum].floorpicnum == TILE_RRTILE2702)
|
||||||
{
|
{
|
||||||
if (RRRA && pPlayer->on_motorcycle)
|
if (RRRA && pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
if (myonground)
|
if (myonground)
|
||||||
{
|
{
|
||||||
|
@ -1193,7 +1193,7 @@ FAKEHORIZONLY:;
|
||||||
if ((spriteNum & 49152) == 32768)
|
if ((spriteNum & 49152) == 32768)
|
||||||
{
|
{
|
||||||
int const wallNum = spriteNum&(MAXWALLS-1);
|
int const wallNum = spriteNum&(MAXWALLS-1);
|
||||||
if (RRRA && pPlayer->on_motorcycle)
|
if (RRRA && pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
int16_t var108, var10c;
|
int16_t var108, var10c;
|
||||||
var108 = getangle(wall[wall[wallNum].point2].x-wall[wallNum].x,wall[wall[wallNum].point2].y-wall[wallNum].y);
|
var108 = getangle(wall[wall[wallNum].point2].x-wall[wallNum].x,wall[wall[wallNum].point2].y-wall[wallNum].y);
|
||||||
|
@ -1215,7 +1215,7 @@ FAKEHORIZONLY:;
|
||||||
my_moto_speed -= (my_moto_speed>>3);
|
my_moto_speed -= (my_moto_speed>>3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (RRRA && pPlayer->on_boat)
|
else if (RRRA && pPlayer->OnBoat)
|
||||||
{
|
{
|
||||||
short var114, var118;
|
short var114, var118;
|
||||||
var114 = getangle(wall[wall[wallNum].point2].x-wall[wallNum].x,wall[wall[wallNum].point2].y-wall[wallNum].y);
|
var114 = getangle(wall[wall[wallNum].point2].x-wall[wallNum].x,wall[wall[wallNum].point2].y-wall[wallNum].y);
|
||||||
|
@ -1242,7 +1242,7 @@ FAKEHORIZONLY:;
|
||||||
{
|
{
|
||||||
spriteNum &= (MAXSPRITES-1);
|
spriteNum &= (MAXSPRITES-1);
|
||||||
|
|
||||||
if (RRRA && pPlayer->on_motorcycle)
|
if (RRRA && pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
if (A_CheckEnemySprite(&sprite[spriteNum]) || sprite[spriteNum].picnum == TILE_APLAYER)
|
if (A_CheckEnemySprite(&sprite[spriteNum]) || sprite[spriteNum].picnum == TILE_APLAYER)
|
||||||
{
|
{
|
||||||
|
@ -1250,7 +1250,7 @@ FAKEHORIZONLY:;
|
||||||
my_moto_turb = 6;
|
my_moto_turb = 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (RRRA && pPlayer->on_boat)
|
else if (RRRA && pPlayer->OnBoat)
|
||||||
{
|
{
|
||||||
if (A_CheckEnemySprite(&sprite[spriteNum]) || sprite[spriteNum].picnum == TILE_APLAYER)
|
if (A_CheckEnemySprite(&sprite[spriteNum]) || sprite[spriteNum].picnum == TILE_APLAYER)
|
||||||
{
|
{
|
||||||
|
@ -1778,9 +1778,9 @@ void Net_GetInput(void)
|
||||||
if (g_player[myconnectindex].movefifoend - movefifoplc >= 100 || System_WantGuiCapture())
|
if (g_player[myconnectindex].movefifoend - movefifoplc >= 100 || System_WantGuiCapture())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (RRRA && g_player[myconnectindex].ps->on_motorcycle)
|
if (RRRA && g_player[myconnectindex].ps->OnMotorcycle)
|
||||||
P_GetInputMotorcycle(myconnectindex);
|
P_GetInputMotorcycle(myconnectindex);
|
||||||
else if (RRRA && g_player[myconnectindex].ps->on_boat)
|
else if (RRRA && g_player[myconnectindex].ps->OnBoat)
|
||||||
P_GetInputBoat(myconnectindex);
|
P_GetInputBoat(myconnectindex);
|
||||||
else if (DEER)
|
else if (DEER)
|
||||||
P_DHGetInput(myconnectindex);
|
P_DHGetInput(myconnectindex);
|
||||||
|
|
|
@ -1946,7 +1946,7 @@ void P_DisplayWeapon(void)
|
||||||
|
|
||||||
if (RRRA)
|
if (RRRA)
|
||||||
{
|
{
|
||||||
if (pPlayer->on_motorcycle)
|
if (pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
int motoTile = TILE_MOTOHIT;
|
int motoTile = TILE_MOTOHIT;
|
||||||
if (!g_netServer && numplayers == 1)
|
if (!g_netServer && numplayers == 1)
|
||||||
|
@ -1986,7 +1986,7 @@ void P_DisplayWeapon(void)
|
||||||
weaponPal, 34816, pPlayer->tilt_status * 5 + (pPlayer->tilt_status < 0 ? 2047 : 0));
|
weaponPal, 34816, pPlayer->tilt_status * 5 + (pPlayer->tilt_status < 0 ? 2047 : 0));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (pPlayer->on_boat)
|
if (pPlayer->OnBoat)
|
||||||
{
|
{
|
||||||
int boatTile;
|
int boatTile;
|
||||||
if (pPlayer->tilt_status > 0)
|
if (pPlayer->tilt_status > 0)
|
||||||
|
@ -4599,12 +4599,12 @@ void P_DropWeapon(int const playerNum)
|
||||||
|
|
||||||
if (RRRA && (g_netServer || numplayers > 1))
|
if (RRRA && (g_netServer || numplayers > 1))
|
||||||
{
|
{
|
||||||
if (pPlayer->on_motorcycle)
|
if (pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
int const newSprite = A_Spawn(pPlayer->i, TILE_EMPTYBIKE);
|
int const newSprite = A_Spawn(pPlayer->i, TILE_EMPTYBIKE);
|
||||||
sprite[newSprite].ang = fix16_to_int(pPlayer->q16ang);
|
sprite[newSprite].ang = fix16_to_int(pPlayer->q16ang);
|
||||||
sprite[newSprite].owner = pPlayer->ammo_amount[MOTORCYCLE_WEAPON];
|
sprite[newSprite].owner = pPlayer->ammo_amount[MOTORCYCLE_WEAPON];
|
||||||
pPlayer->on_motorcycle = 0;
|
pPlayer->OnMotorcycle = 0;
|
||||||
pPlayer->gotweapon.Clear(MOTORCYCLE_WEAPON);
|
pPlayer->gotweapon.Clear(MOTORCYCLE_WEAPON);
|
||||||
pPlayer->q16horiz = F16(100);
|
pPlayer->q16horiz = F16(100);
|
||||||
pPlayer->moto_do_bump = 0;
|
pPlayer->moto_do_bump = 0;
|
||||||
|
@ -4615,12 +4615,12 @@ void P_DropWeapon(int const playerNum)
|
||||||
pPlayer->moto_bump = 0;
|
pPlayer->moto_bump = 0;
|
||||||
pPlayer->moto_turb = 0;
|
pPlayer->moto_turb = 0;
|
||||||
}
|
}
|
||||||
else if (pPlayer->on_boat)
|
else if (pPlayer->OnBoat)
|
||||||
{
|
{
|
||||||
int const newSprite = A_Spawn(pPlayer->i, TILE_EMPTYBOAT);
|
int const newSprite = A_Spawn(pPlayer->i, TILE_EMPTYBOAT);
|
||||||
sprite[newSprite].ang = fix16_to_int(pPlayer->q16ang);
|
sprite[newSprite].ang = fix16_to_int(pPlayer->q16ang);
|
||||||
sprite[newSprite].owner = pPlayer->ammo_amount[BOAT_WEAPON];
|
sprite[newSprite].owner = pPlayer->ammo_amount[BOAT_WEAPON];
|
||||||
pPlayer->on_boat = 0;
|
pPlayer->OnBoat = 0;
|
||||||
pPlayer->gotweapon.Clear(BOAT_WEAPON);
|
pPlayer->gotweapon.Clear(BOAT_WEAPON);
|
||||||
pPlayer->q16horiz = F16(100);
|
pPlayer->q16horiz = F16(100);
|
||||||
pPlayer->moto_do_bump = 0;
|
pPlayer->moto_do_bump = 0;
|
||||||
|
@ -4683,81 +4683,10 @@ void P_AddAmmo(DukePlayer_t * const pPlayer, int const weaponNum, int const addA
|
||||||
pPlayer->ammo_amount[weaponNum] = pPlayer->max_ammo_amount[weaponNum];
|
pPlayer->ammo_amount[weaponNum] = pPlayer->max_ammo_amount[weaponNum];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void addweapon(player_struct* p, int w);
|
||||||
void P_AddWeapon(DukePlayer_t *pPlayer, int weaponNum)
|
void P_AddWeapon(DukePlayer_t *pPlayer, int weaponNum)
|
||||||
{
|
{
|
||||||
int8_t curr_weapon = pPlayer->curr_weapon;
|
addweapon(pPlayer, weaponNum);
|
||||||
|
|
||||||
if (pPlayer->on_motorcycle || pPlayer->on_boat)
|
|
||||||
{
|
|
||||||
pPlayer->gotweapon.Set(weaponNum);
|
|
||||||
|
|
||||||
if (weaponNum == SHRINKER_WEAPON)
|
|
||||||
{
|
|
||||||
pPlayer->gotweapon.Set(GROW_WEAPON);
|
|
||||||
pPlayer->ammo_amount[GROW_WEAPON] = 1;
|
|
||||||
}
|
|
||||||
else if (weaponNum == RPG_WEAPON)
|
|
||||||
pPlayer->gotweapon.Set(CHICKEN_WEAPON);
|
|
||||||
else if (weaponNum == SLINGBLADE_WEAPON)
|
|
||||||
pPlayer->ammo_amount[SLINGBLADE_WEAPON] = 1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pPlayer->gotweapon[weaponNum])
|
|
||||||
{
|
|
||||||
pPlayer->gotweapon.Set(weaponNum);
|
|
||||||
|
|
||||||
if (weaponNum == SHRINKER_WEAPON)
|
|
||||||
{
|
|
||||||
pPlayer->gotweapon.Set(GROW_WEAPON);
|
|
||||||
if (RR)
|
|
||||||
pPlayer->ammo_amount[GROW_WEAPON] = 1;
|
|
||||||
}
|
|
||||||
if (RRRA)
|
|
||||||
{
|
|
||||||
if (weaponNum == RPG_WEAPON)
|
|
||||||
pPlayer->gotweapon.Set(CHICKEN_WEAPON);
|
|
||||||
else if (weaponNum == SLINGBLADE_WEAPON)
|
|
||||||
pPlayer->ammo_amount[SLINGBLADE_WEAPON] = 50;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!RR || weaponNum != HANDBOMB_WEAPON)
|
|
||||||
curr_weapon = weaponNum;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
curr_weapon = weaponNum;
|
|
||||||
|
|
||||||
if (RR && weaponNum == HANDBOMB_WEAPON)
|
|
||||||
pPlayer->last_weapon = -1;
|
|
||||||
|
|
||||||
pPlayer->random_club_frame = 0;
|
|
||||||
|
|
||||||
if (pPlayer->holster_weapon == 0)
|
|
||||||
{
|
|
||||||
pPlayer->weapon_pos = -1;
|
|
||||||
pPlayer->last_weapon = pPlayer->curr_weapon;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pPlayer->weapon_pos = WEAPON_POS_RAISE;
|
|
||||||
pPlayer->holster_weapon = 0;
|
|
||||||
pPlayer->last_weapon = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
pPlayer->kickback_pic = 0;
|
|
||||||
pPlayer->curr_weapon = curr_weapon;
|
|
||||||
|
|
||||||
switch (DYNAMICWEAPONMAP(weaponNum))
|
|
||||||
{
|
|
||||||
case SLINGBLADE_WEAPON__STATIC:
|
|
||||||
case KNEE_WEAPON__STATIC:
|
|
||||||
case TRIPBOMB_WEAPON__STATIC:
|
|
||||||
case HANDREMOTE_WEAPON__STATIC:
|
|
||||||
case HANDBOMB_WEAPON__STATIC: break;
|
|
||||||
case SHOTGUN_WEAPON__STATIC: A_PlaySound(SHOTGUN_COCK, pPlayer->i); break;
|
|
||||||
case PISTOL_WEAPON__STATIC: A_PlaySound(INSERT_CLIP, pPlayer->i); break;
|
|
||||||
default: A_PlaySound(RR ? EJECT_CLIP : SELECT_WEAPON, pPlayer->i); break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void P_SelectNextInvItem(DukePlayer_t *pPlayer)
|
void P_SelectNextInvItem(DukePlayer_t *pPlayer)
|
||||||
|
@ -5923,7 +5852,7 @@ static void P_ProcessWeapon(int playerNum)
|
||||||
pus = 1;
|
pus = 1;
|
||||||
pPlayer->ammo_amount[TRIPBOMB_WEAPON]--;
|
pPlayer->ammo_amount[TRIPBOMB_WEAPON]--;
|
||||||
pPlayer->gotweapon.Clear(TRIPBOMB_WEAPON);
|
pPlayer->gotweapon.Clear(TRIPBOMB_WEAPON);
|
||||||
if (pPlayer->on_ground && TEST_SYNC_KEY(playerBits, SK_CROUCH) && (!RRRA || !pPlayer->on_motorcycle))
|
if (pPlayer->on_ground && TEST_SYNC_KEY(playerBits, SK_CROUCH) && (!RRRA || !pPlayer->OnMotorcycle))
|
||||||
{
|
{
|
||||||
FwdVel = 15;
|
FwdVel = 15;
|
||||||
Zvel = (fix16_to_int(pPlayer->q16horiz + pPlayer->q16horizoff - F16(100)) * 20);
|
Zvel = (fix16_to_int(pPlayer->q16horiz + pPlayer->q16horizoff - F16(100)) * 20);
|
||||||
|
@ -6785,12 +6714,12 @@ static void P_DoWater(int const playerNum, int const playerBits, int const floor
|
||||||
if (!A_CheckSoundPlaying(pPlayer->i, DUKE_UNDERWATER))
|
if (!A_CheckSoundPlaying(pPlayer->i, DUKE_UNDERWATER))
|
||||||
A_PlaySound(DUKE_UNDERWATER, pPlayer->i);
|
A_PlaySound(DUKE_UNDERWATER, pPlayer->i);
|
||||||
|
|
||||||
if (TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->on_motorcycle))
|
if (TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->OnMotorcycle))
|
||||||
{
|
{
|
||||||
pPlayer->vel.z = max(min(-348, pPlayer->vel.z - 348), -(256 * 6));
|
pPlayer->vel.z = max(min(-348, pPlayer->vel.z - 348), -(256 * 6));
|
||||||
}
|
}
|
||||||
else if ((TEST_SYNC_KEY(playerBits, SK_CROUCH) && (!RRRA || !pPlayer->on_motorcycle))
|
else if ((TEST_SYNC_KEY(playerBits, SK_CROUCH) && (!RRRA || !pPlayer->OnMotorcycle))
|
||||||
|| (RRRA && pPlayer->on_motorcycle))
|
|| (RRRA && pPlayer->OnMotorcycle))
|
||||||
{
|
{
|
||||||
pPlayer->vel.z = min(max(348, pPlayer->vel.z + 348), (256 * 6));
|
pPlayer->vel.z = min(max(348, pPlayer->vel.z + 348), (256 * 6));
|
||||||
}
|
}
|
||||||
|
@ -6970,7 +6899,7 @@ void P_ProcessInput(int playerNum)
|
||||||
|
|
||||||
if (RRRA)
|
if (RRRA)
|
||||||
{
|
{
|
||||||
if (pPlayer->on_motorcycle && pSprite->extra > 0)
|
if (pPlayer->OnMotorcycle && pSprite->extra > 0)
|
||||||
{
|
{
|
||||||
int var64, var68, var6c, var74, var7c;
|
int var64, var68, var6c, var74, var7c;
|
||||||
int16_t var84;
|
int16_t var84;
|
||||||
|
@ -7242,7 +7171,7 @@ void P_ProcessInput(int playerNum)
|
||||||
pPlayer->moto_on_mud = 0;
|
pPlayer->moto_on_mud = 0;
|
||||||
pPlayer->moto_on_oil = 0;
|
pPlayer->moto_on_oil = 0;
|
||||||
}
|
}
|
||||||
else if (pPlayer->on_boat && pSprite->extra > 0)
|
else if (pPlayer->OnBoat && pSprite->extra > 0)
|
||||||
{
|
{
|
||||||
int vara8, varac, varb0, varb4, varbc, varc4;
|
int vara8, varac, varb0, varb4, varbc, varc4;
|
||||||
int16_t varcc;
|
int16_t varcc;
|
||||||
|
@ -7585,7 +7514,7 @@ void P_ProcessInput(int playerNum)
|
||||||
if (!pPlayer->stairs)
|
if (!pPlayer->stairs)
|
||||||
{
|
{
|
||||||
pPlayer->stairs = 10;
|
pPlayer->stairs = 10;
|
||||||
if (TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->on_motorcycle))
|
if (TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->OnMotorcycle))
|
||||||
{
|
{
|
||||||
highZhit = 0;
|
highZhit = 0;
|
||||||
ceilZ = pPlayer->truecz;
|
ceilZ = pPlayer->truecz;
|
||||||
|
@ -7613,7 +7542,7 @@ void P_ProcessInput(int playerNum)
|
||||||
|
|
||||||
if (RRRA)
|
if (RRRA)
|
||||||
{
|
{
|
||||||
if (pPlayer->on_motorcycle)
|
if (pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
if (A_CheckEnemySprite(&sprite[spriteNum]))
|
if (A_CheckEnemySprite(&sprite[spriteNum]))
|
||||||
{
|
{
|
||||||
|
@ -7622,7 +7551,7 @@ void P_ProcessInput(int playerNum)
|
||||||
pPlayer->moto_speed -= pPlayer->moto_speed >> 4;
|
pPlayer->moto_speed -= pPlayer->moto_speed >> 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pPlayer->on_boat)
|
if (pPlayer->OnBoat)
|
||||||
{
|
{
|
||||||
if (A_CheckEnemySprite(&sprite[spriteNum]))
|
if (A_CheckEnemySprite(&sprite[spriteNum]))
|
||||||
{
|
{
|
||||||
|
@ -7654,7 +7583,7 @@ check_enemy_sprite:
|
||||||
if (!pPlayer->stairs)
|
if (!pPlayer->stairs)
|
||||||
{
|
{
|
||||||
pPlayer->stairs = 10;
|
pPlayer->stairs = 10;
|
||||||
if (TEST_SYNC_KEY(playerBits, SK_CROUCH) && (!RRRA || !pPlayer->on_motorcycle))
|
if (TEST_SYNC_KEY(playerBits, SK_CROUCH) && (!RRRA || !pPlayer->OnMotorcycle))
|
||||||
{
|
{
|
||||||
ceilZ = sprite[spriteNum].z;
|
ceilZ = sprite[spriteNum].z;
|
||||||
highZhit = 0;
|
highZhit = 0;
|
||||||
|
@ -7666,7 +7595,7 @@ check_enemy_sprite:
|
||||||
}
|
}
|
||||||
else if (sprite[spriteNum].picnum == TILE_TOILET || sprite[spriteNum].picnum == TILE_RRTILE2121)
|
else if (sprite[spriteNum].picnum == TILE_TOILET || sprite[spriteNum].picnum == TILE_RRTILE2121)
|
||||||
{
|
{
|
||||||
if (TEST_SYNC_KEY(playerBits, SK_CROUCH) && (!RRRA || !pPlayer->on_motorcycle))
|
if (TEST_SYNC_KEY(playerBits, SK_CROUCH) && (!RRRA || !pPlayer->OnMotorcycle))
|
||||||
{
|
{
|
||||||
A_PlaySound(436, pPlayer->i);
|
A_PlaySound(436, pPlayer->i);
|
||||||
pPlayer->last_pissed_time = 4000;
|
pPlayer->last_pissed_time = 4000;
|
||||||
|
@ -7772,7 +7701,7 @@ check_enemy_sprite:
|
||||||
if (pPlayer->look_ang && !(pPlayer->look_ang >> 2))
|
if (pPlayer->look_ang && !(pPlayer->look_ang >> 2))
|
||||||
pPlayer->look_ang -= ksgn(pPlayer->look_ang);
|
pPlayer->look_ang -= ksgn(pPlayer->look_ang);
|
||||||
|
|
||||||
if (TEST_SYNC_KEY(playerBits, SK_LOOK_LEFT) && (!RRRA || !pPlayer->on_motorcycle))
|
if (TEST_SYNC_KEY(playerBits, SK_LOOK_LEFT) && (!RRRA || !pPlayer->OnMotorcycle))
|
||||||
{
|
{
|
||||||
// look_left
|
// look_left
|
||||||
if (VM_OnEvent(EVENT_LOOKLEFT,pPlayer->i,playerNum) == 0)
|
if (VM_OnEvent(EVENT_LOOKLEFT,pPlayer->i,playerNum) == 0)
|
||||||
|
@ -7782,7 +7711,7 @@ check_enemy_sprite:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TEST_SYNC_KEY(playerBits, SK_LOOK_RIGHT) && (!RRRA || !pPlayer->on_motorcycle))
|
if (TEST_SYNC_KEY(playerBits, SK_LOOK_RIGHT) && (!RRRA || !pPlayer->OnMotorcycle))
|
||||||
{
|
{
|
||||||
// look_right
|
// look_right
|
||||||
if (VM_OnEvent(EVENT_LOOKRIGHT,pPlayer->i,playerNum) == 0)
|
if (VM_OnEvent(EVENT_LOOKRIGHT,pPlayer->i,playerNum) == 0)
|
||||||
|
@ -7925,7 +7854,7 @@ check_enemy_sprite:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((!RRRA || pPlayer->on_motorcycle) && pPlayer->footprintcount > 0 && pPlayer->on_ground)
|
else if ((!RRRA || pPlayer->OnMotorcycle) && pPlayer->footprintcount > 0 && pPlayer->on_ground)
|
||||||
{
|
{
|
||||||
if (pPlayer->cursectnum >= 0 && (sector[pPlayer->cursectnum].floorstat & 2) != 2)
|
if (pPlayer->cursectnum >= 0 && (sector[pPlayer->cursectnum].floorstat & 2) != 2)
|
||||||
{
|
{
|
||||||
|
@ -7974,7 +7903,7 @@ check_enemy_sprite:
|
||||||
pPlayer->pos.z = floorZ - (floorZOffset << 8);
|
pPlayer->pos.z = floorZ - (floorZOffset << 8);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (RRRA && (pPlayer->on_motorcycle || pPlayer->on_boat) && floorZ - (floorZOffset << 9) > pPlayer->pos.z)
|
if (RRRA && (pPlayer->OnMotorcycle || pPlayer->OnBoat) && floorZ - (floorZOffset << 9) > pPlayer->pos.z)
|
||||||
{
|
{
|
||||||
if (pPlayer->moto_on_ground)
|
if (pPlayer->moto_on_ground)
|
||||||
{
|
{
|
||||||
|
@ -8033,7 +7962,7 @@ check_enemy_sprite:
|
||||||
}
|
}
|
||||||
else if (pPlayer->vel.z > 2048)
|
else if (pPlayer->vel.z > 2048)
|
||||||
{
|
{
|
||||||
if (RRRA && pPlayer->on_motorcycle)
|
if (RRRA && pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
if (A_CheckSoundPlaying(pPlayer->i, 190))
|
if (A_CheckSoundPlaying(pPlayer->i, 190))
|
||||||
S_StopEnvSound(pPlayer->i, 190);
|
S_StopEnvSound(pPlayer->i, 190);
|
||||||
|
@ -8043,7 +7972,7 @@ check_enemy_sprite:
|
||||||
else
|
else
|
||||||
A_PlaySound(DUKE_LAND, pPlayer->i);
|
A_PlaySound(DUKE_LAND, pPlayer->i);
|
||||||
}
|
}
|
||||||
else if (RRRA && pPlayer->vel.z > 1024 && pPlayer->on_motorcycle)
|
else if (RRRA && pPlayer->vel.z > 1024 && pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
A_PlaySound(DUKE_LAND, pPlayer->i);
|
A_PlaySound(DUKE_LAND, pPlayer->i);
|
||||||
pPlayer->moto_turb = 12;
|
pPlayer->moto_turb = 12;
|
||||||
|
@ -8094,7 +8023,7 @@ check_enemy_sprite:
|
||||||
|
|
||||||
pPlayer->on_warping_sector = 0;
|
pPlayer->on_warping_sector = 0;
|
||||||
|
|
||||||
if (TEST_SYNC_KEY(playerBits, SK_CROUCH) && (!RRRA || !pPlayer->on_motorcycle))
|
if (TEST_SYNC_KEY(playerBits, SK_CROUCH) && (!RRRA || !pPlayer->OnMotorcycle))
|
||||||
{
|
{
|
||||||
// crouching
|
// crouching
|
||||||
if (VM_OnEvent(EVENT_CROUCH,pPlayer->i,playerNum) == 0)
|
if (VM_OnEvent(EVENT_CROUCH,pPlayer->i,playerNum) == 0)
|
||||||
|
@ -8105,9 +8034,9 @@ check_enemy_sprite:
|
||||||
}
|
}
|
||||||
|
|
||||||
// jumping
|
// jumping
|
||||||
if (!TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->on_motorcycle) && pPlayer->jumping_toggle == 1)
|
if (!TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->OnMotorcycle) && pPlayer->jumping_toggle == 1)
|
||||||
pPlayer->jumping_toggle = 0;
|
pPlayer->jumping_toggle = 0;
|
||||||
else if (TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->on_motorcycle) && pPlayer->jumping_toggle == 0)
|
else if (TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->OnMotorcycle) && pPlayer->jumping_toggle == 0)
|
||||||
{
|
{
|
||||||
if (pPlayer->jumping_counter == 0)
|
if (pPlayer->jumping_counter == 0)
|
||||||
if ((floorZ-ceilZ) > (56<<8))
|
if ((floorZ-ceilZ) > (56<<8))
|
||||||
|
@ -8126,7 +8055,7 @@ check_enemy_sprite:
|
||||||
|
|
||||||
if (pPlayer->jumping_counter)
|
if (pPlayer->jumping_counter)
|
||||||
{
|
{
|
||||||
if (!TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->on_motorcycle) && pPlayer->jumping_toggle == 1)
|
if (!TEST_SYNC_KEY(playerBits, SK_JUMP) && (!RRRA || !pPlayer->OnMotorcycle) && pPlayer->jumping_toggle == 1)
|
||||||
pPlayer->jumping_toggle = 0;
|
pPlayer->jumping_toggle = 0;
|
||||||
|
|
||||||
if (pPlayer->jumping_counter < (RR ? 768 : (1024+256)))
|
if (pPlayer->jumping_counter < (RR ? 768 : (1024+256)))
|
||||||
|
@ -8197,7 +8126,7 @@ check_enemy_sprite:
|
||||||
{
|
{
|
||||||
if ((krand2() & 3) == 1)
|
if ((krand2() & 3) == 1)
|
||||||
{
|
{
|
||||||
if (pPlayer->on_motorcycle)
|
if (pPlayer->OnMotorcycle)
|
||||||
pSprite->extra -= 2;
|
pSprite->extra -= 2;
|
||||||
else
|
else
|
||||||
pSprite->extra -= 4;
|
pSprite->extra -= 4;
|
||||||
|
@ -8228,7 +8157,7 @@ check_enemy_sprite:
|
||||||
{
|
{
|
||||||
if (sectorLotag == ST_1_ABOVE_WATER)
|
if (sectorLotag == ST_1_ABOVE_WATER)
|
||||||
pPlayer->not_on_water = 0;
|
pPlayer->not_on_water = 0;
|
||||||
else if (pPlayer->on_boat)
|
else if (pPlayer->OnBoat)
|
||||||
{
|
{
|
||||||
if (sectorLotag == 1234)
|
if (sectorLotag == 1234)
|
||||||
pPlayer->not_on_water = 0;
|
pPlayer->not_on_water = 0;
|
||||||
|
@ -8267,7 +8196,7 @@ check_enemy_sprite:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ST_1_ABOVE_WATER:
|
case ST_1_ABOVE_WATER:
|
||||||
if ((krand2() & 1) == 0 && (!RRRA || (!pPlayer->on_boat && !pPlayer->on_motorcycle && sector[pPlayer->cursectnum].lotag != 321)))
|
if ((krand2() & 1) == 0 && (!RRRA || (!pPlayer->OnBoat && !pPlayer->OnMotorcycle && sector[pPlayer->cursectnum].lotag != 321)))
|
||||||
A_PlaySound(DUKE_ONWATER, pPlayer->i);
|
A_PlaySound(DUKE_ONWATER, pPlayer->i);
|
||||||
pPlayer->walking_snd_toggle = 1;
|
pPlayer->walking_snd_toggle = 1;
|
||||||
break;
|
break;
|
||||||
|
@ -8301,12 +8230,12 @@ check_enemy_sprite:
|
||||||
{
|
{
|
||||||
if (sector[pPlayer->cursectnum].floorpicnum == TILE_RRTILE7888)
|
if (sector[pPlayer->cursectnum].floorpicnum == TILE_RRTILE7888)
|
||||||
{
|
{
|
||||||
if (pPlayer->on_motorcycle && pPlayer->on_ground)
|
if (pPlayer->OnMotorcycle && pPlayer->on_ground)
|
||||||
pPlayer->moto_on_oil = 1;
|
pPlayer->moto_on_oil = 1;
|
||||||
}
|
}
|
||||||
else if (sector[pPlayer->cursectnum].floorpicnum == TILE_RRTILE7889)
|
else if (sector[pPlayer->cursectnum].floorpicnum == TILE_RRTILE7889)
|
||||||
{
|
{
|
||||||
if (pPlayer->on_motorcycle)
|
if (pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
if (pPlayer->on_ground)
|
if (pPlayer->on_ground)
|
||||||
pPlayer->moto_on_mud = 1;
|
pPlayer->moto_on_mud = 1;
|
||||||
|
@ -8322,7 +8251,7 @@ check_enemy_sprite:
|
||||||
}
|
}
|
||||||
if (sector[pPlayer->cursectnum].floorpicnum == TILE_RRTILE3073 || sector[pPlayer->cursectnum].floorpicnum == TILE_RRTILE2702)
|
if (sector[pPlayer->cursectnum].floorpicnum == TILE_RRTILE3073 || sector[pPlayer->cursectnum].floorpicnum == TILE_RRTILE2702)
|
||||||
{
|
{
|
||||||
if (RRRA && pPlayer->on_motorcycle)
|
if (RRRA && pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
if (pPlayer->on_ground)
|
if (pPlayer->on_ground)
|
||||||
{
|
{
|
||||||
|
@ -8410,7 +8339,7 @@ HORIZONLY:;
|
||||||
if ((spriteNum & 49152) == 32768)
|
if ((spriteNum & 49152) == 32768)
|
||||||
{
|
{
|
||||||
int const wallNum = spriteNum&(MAXWALLS-1);
|
int const wallNum = spriteNum&(MAXWALLS-1);
|
||||||
if (RRRA && pPlayer->on_motorcycle)
|
if (RRRA && pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
int16_t var104, var108, var10c;
|
int16_t var104, var108, var10c;
|
||||||
var104 = 0;
|
var104 = 0;
|
||||||
|
@ -8462,7 +8391,7 @@ HORIZONLY:;
|
||||||
else if (var104)
|
else if (var104)
|
||||||
A_PlaySound(DUKE_LAND_HURT,pPlayer->i);
|
A_PlaySound(DUKE_LAND_HURT,pPlayer->i);
|
||||||
}
|
}
|
||||||
else if (RRRA && pPlayer->on_boat)
|
else if (RRRA && pPlayer->OnBoat)
|
||||||
{
|
{
|
||||||
short var114, var118;
|
short var114, var118;
|
||||||
var114 = getangle(wall[wall[wallNum].point2].x-wall[wallNum].x,wall[wall[wallNum].point2].y-wall[wallNum].y);
|
var114 = getangle(wall[wall[wallNum].point2].x-wall[wallNum].x,wall[wall[wallNum].point2].y-wall[wallNum].y);
|
||||||
|
@ -8519,7 +8448,7 @@ HORIZONLY:;
|
||||||
{
|
{
|
||||||
spriteNum &= (MAXSPRITES-1);
|
spriteNum &= (MAXSPRITES-1);
|
||||||
|
|
||||||
if (RRRA && pPlayer->on_motorcycle)
|
if (RRRA && pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
if (A_CheckEnemySprite(&sprite[spriteNum]) || sprite[spriteNum].picnum == TILE_APLAYER)
|
if (A_CheckEnemySprite(&sprite[spriteNum]) || sprite[spriteNum].picnum == TILE_APLAYER)
|
||||||
{
|
{
|
||||||
|
@ -8572,7 +8501,7 @@ HORIZONLY:;
|
||||||
sprite[spriteNum].yrepeat = 0;
|
sprite[spriteNum].yrepeat = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (RRRA && pPlayer->on_boat)
|
else if (RRRA && pPlayer->OnBoat)
|
||||||
{
|
{
|
||||||
if (A_CheckEnemySprite(&sprite[spriteNum]) || sprite[spriteNum].picnum == TILE_APLAYER)
|
if (A_CheckEnemySprite(&sprite[spriteNum]) || sprite[spriteNum].picnum == TILE_APLAYER)
|
||||||
{
|
{
|
||||||
|
@ -8670,7 +8599,7 @@ HORIZONLY:;
|
||||||
|
|
||||||
if ((pPlayer->cursectnum >= 0 && trueFloorDist < PHEIGHT && pPlayer->on_ground && sectorLotag != ST_1_ABOVE_WATER &&
|
if ((pPlayer->cursectnum >= 0 && trueFloorDist < PHEIGHT && pPlayer->on_ground && sectorLotag != ST_1_ABOVE_WATER &&
|
||||||
playerShrunk == 0 && sector[pPlayer->cursectnum].lotag == ST_1_ABOVE_WATER) && (!A_CheckSoundPlaying(pPlayer->i, DUKE_ONWATER)))
|
playerShrunk == 0 && sector[pPlayer->cursectnum].lotag == ST_1_ABOVE_WATER) && (!A_CheckSoundPlaying(pPlayer->i, DUKE_ONWATER)))
|
||||||
if (!RRRA || (!pPlayer->on_boat && !pPlayer->on_motorcycle && sector[pPlayer->cursectnum].lotag != 321))
|
if (!RRRA || (!pPlayer->OnBoat && !pPlayer->OnMotorcycle && sector[pPlayer->cursectnum].lotag != 321))
|
||||||
A_PlaySound(DUKE_ONWATER, pPlayer->i);
|
A_PlaySound(DUKE_ONWATER, pPlayer->i);
|
||||||
|
|
||||||
if (pPlayer->cursectnum >= 0 && pPlayer->cursectnum != pSprite->sectnum)
|
if (pPlayer->cursectnum >= 0 && pPlayer->cursectnum != pSprite->sectnum)
|
||||||
|
@ -8728,7 +8657,7 @@ HORIZONLY:;
|
||||||
thisPlayer.horizAngleAdjust = -float(12<<(int)(TEST_SYNC_KEY(playerBits, SK_RUN)));
|
thisPlayer.horizAngleAdjust = -float(12<<(int)(TEST_SYNC_KEY(playerBits, SK_RUN)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (TEST_SYNC_KEY(playerBits, SK_AIM_UP) && (!RRRA || !pPlayer->on_motorcycle))
|
else if (TEST_SYNC_KEY(playerBits, SK_AIM_UP) && (!RRRA || !pPlayer->OnMotorcycle))
|
||||||
{
|
{
|
||||||
if (VM_OnEvent(EVENT_AIMUP,pPlayer->i,playerNum) == 0)
|
if (VM_OnEvent(EVENT_AIMUP,pPlayer->i,playerNum) == 0)
|
||||||
{
|
{
|
||||||
|
@ -8736,7 +8665,7 @@ HORIZONLY:;
|
||||||
thisPlayer.horizRecenter = false;
|
thisPlayer.horizRecenter = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (TEST_SYNC_KEY(playerBits, SK_AIM_DOWN) && (!RRRA || !pPlayer->on_motorcycle))
|
else if (TEST_SYNC_KEY(playerBits, SK_AIM_DOWN) && (!RRRA || !pPlayer->OnMotorcycle))
|
||||||
{
|
{
|
||||||
if (VM_OnEvent(EVENT_AIMDOWN,pPlayer->i,playerNum) == 0)
|
if (VM_OnEvent(EVENT_AIMDOWN,pPlayer->i,playerNum) == 0)
|
||||||
{
|
{
|
||||||
|
@ -9023,14 +8952,14 @@ void P_DHProcessInput(int playerNum)
|
||||||
if (pPlayer->look_ang && !(pPlayer->look_ang >> 2))
|
if (pPlayer->look_ang && !(pPlayer->look_ang >> 2))
|
||||||
pPlayer->look_ang -= ksgn(pPlayer->look_ang);
|
pPlayer->look_ang -= ksgn(pPlayer->look_ang);
|
||||||
|
|
||||||
if (TEST_SYNC_KEY(playerBits, SK_LOOK_LEFT) && !pPlayer->on_motorcycle)
|
if (TEST_SYNC_KEY(playerBits, SK_LOOK_LEFT) && !pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
// look_left
|
// look_left
|
||||||
pPlayer->look_ang -= 152;
|
pPlayer->look_ang -= 152;
|
||||||
pPlayer->rotscrnang += 24;
|
pPlayer->rotscrnang += 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TEST_SYNC_KEY(playerBits, SK_LOOK_RIGHT) && !pPlayer->on_motorcycle)
|
if (TEST_SYNC_KEY(playerBits, SK_LOOK_RIGHT) && !pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
// look_right
|
// look_right
|
||||||
pPlayer->look_ang += 152;
|
pPlayer->look_ang += 152;
|
||||||
|
@ -9157,7 +9086,7 @@ void P_DHProcessInput(int playerNum)
|
||||||
|
|
||||||
pPlayer->on_warping_sector = 0;
|
pPlayer->on_warping_sector = 0;
|
||||||
|
|
||||||
if (TEST_SYNC_KEY(playerBits, SK_CROUCH) && !pPlayer->on_motorcycle)
|
if (TEST_SYNC_KEY(playerBits, SK_CROUCH) && !pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
// crouching
|
// crouching
|
||||||
pPlayer->pos.z += (2048+768);
|
pPlayer->pos.z += (2048+768);
|
||||||
|
@ -9165,9 +9094,9 @@ void P_DHProcessInput(int playerNum)
|
||||||
}
|
}
|
||||||
|
|
||||||
// jumping
|
// jumping
|
||||||
if (!TEST_SYNC_KEY(playerBits, SK_JUMP) && !pPlayer->on_motorcycle && pPlayer->jumping_toggle == 1)
|
if (!TEST_SYNC_KEY(playerBits, SK_JUMP) && !pPlayer->OnMotorcycle && pPlayer->jumping_toggle == 1)
|
||||||
pPlayer->jumping_toggle = 0;
|
pPlayer->jumping_toggle = 0;
|
||||||
else if (TEST_SYNC_KEY(playerBits, SK_JUMP) && !pPlayer->on_motorcycle && pPlayer->jumping_toggle == 0)
|
else if (TEST_SYNC_KEY(playerBits, SK_JUMP) && !pPlayer->OnMotorcycle && pPlayer->jumping_toggle == 0)
|
||||||
{
|
{
|
||||||
if (pPlayer->jumping_counter == 0)
|
if (pPlayer->jumping_counter == 0)
|
||||||
if ((floorZ-ceilZ) > (56<<8))
|
if ((floorZ-ceilZ) > (56<<8))
|
||||||
|
@ -9180,7 +9109,7 @@ void P_DHProcessInput(int playerNum)
|
||||||
|
|
||||||
if (pPlayer->jumping_counter)
|
if (pPlayer->jumping_counter)
|
||||||
{
|
{
|
||||||
if (!TEST_SYNC_KEY(playerBits, SK_JUMP) && !pPlayer->on_motorcycle && pPlayer->jumping_toggle == 1)
|
if (!TEST_SYNC_KEY(playerBits, SK_JUMP) && !pPlayer->OnMotorcycle && pPlayer->jumping_toggle == 1)
|
||||||
pPlayer->jumping_toggle = 0;
|
pPlayer->jumping_toggle = 0;
|
||||||
|
|
||||||
if (pPlayer->jumping_counter < 768)
|
if (pPlayer->jumping_counter < 768)
|
||||||
|
@ -9371,12 +9300,12 @@ void P_DHProcessInput(int playerNum)
|
||||||
thisPlayer.horizRecenter = true;
|
thisPlayer.horizRecenter = true;
|
||||||
thisPlayer.horizAngleAdjust = -float(12<<(int)(TEST_SYNC_KEY(playerBits, SK_RUN)));
|
thisPlayer.horizAngleAdjust = -float(12<<(int)(TEST_SYNC_KEY(playerBits, SK_RUN)));
|
||||||
}
|
}
|
||||||
else if (TEST_SYNC_KEY(playerBits, SK_AIM_UP) && !pPlayer->on_motorcycle)
|
else if (TEST_SYNC_KEY(playerBits, SK_AIM_UP) && !pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
thisPlayer.horizAngleAdjust = float(6 << (int)(TEST_SYNC_KEY(playerBits, SK_RUN)));
|
thisPlayer.horizAngleAdjust = float(6 << (int)(TEST_SYNC_KEY(playerBits, SK_RUN)));
|
||||||
thisPlayer.horizRecenter = false;
|
thisPlayer.horizRecenter = false;
|
||||||
}
|
}
|
||||||
else if (TEST_SYNC_KEY(playerBits, SK_AIM_DOWN) && !pPlayer->on_motorcycle)
|
else if (TEST_SYNC_KEY(playerBits, SK_AIM_DOWN) && !pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
thisPlayer.horizAngleAdjust = -float(6 << (int)(TEST_SYNC_KEY(playerBits, SK_RUN)));
|
thisPlayer.horizAngleAdjust = -float(6 << (int)(TEST_SYNC_KEY(playerBits, SK_RUN)));
|
||||||
thisPlayer.horizRecenter = false;
|
thisPlayer.horizRecenter = false;
|
||||||
|
|
|
@ -212,7 +212,7 @@ typedef struct player_struct {
|
||||||
int32_t drink_timer, eat_timer;
|
int32_t drink_timer, eat_timer;
|
||||||
int16_t level_end_timer;
|
int16_t level_end_timer;
|
||||||
int16_t moto_speed, tilt_status, moto_drink;
|
int16_t moto_speed, tilt_status, moto_drink;
|
||||||
uint8_t on_motorcycle, on_boat, moto_underwater, not_on_water, moto_on_ground;
|
uint8_t OnMotorcycle, OnBoat, moto_underwater, not_on_water, moto_on_ground;
|
||||||
uint8_t moto_do_bump, moto_bump_fast, moto_on_oil, moto_on_mud;
|
uint8_t moto_do_bump, moto_bump_fast, moto_on_oil, moto_on_mud;
|
||||||
int16_t moto_bump, moto_bump_target, moto_turb;
|
int16_t moto_bump, moto_bump_target, moto_turb;
|
||||||
int16_t drug_stat[3];
|
int16_t drug_stat[3];
|
||||||
|
|
|
@ -970,9 +970,9 @@ void P_ResetStatus(int playerNum)
|
||||||
if (RRRA)
|
if (RRRA)
|
||||||
{
|
{
|
||||||
g_chickenWeaponTimer = 0;
|
g_chickenWeaponTimer = 0;
|
||||||
if (pPlayer->on_motorcycle)
|
if (pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
pPlayer->on_motorcycle = 0;
|
pPlayer->OnMotorcycle = 0;
|
||||||
pPlayer->gotweapon.Clear(MOTORCYCLE_WEAPON);
|
pPlayer->gotweapon.Clear(MOTORCYCLE_WEAPON);
|
||||||
pPlayer->curr_weapon = SLINGBLADE_WEAPON;
|
pPlayer->curr_weapon = SLINGBLADE_WEAPON;
|
||||||
}
|
}
|
||||||
|
@ -989,9 +989,9 @@ void P_ResetStatus(int playerNum)
|
||||||
pPlayer->moto_turb = 0;
|
pPlayer->moto_turb = 0;
|
||||||
pPlayer->moto_on_mud = 0;
|
pPlayer->moto_on_mud = 0;
|
||||||
pPlayer->moto_on_oil = 0;
|
pPlayer->moto_on_oil = 0;
|
||||||
if (pPlayer->on_boat)
|
if (pPlayer->OnBoat)
|
||||||
{
|
{
|
||||||
pPlayer->on_boat = 0;
|
pPlayer->OnBoat = 0;
|
||||||
pPlayer->gotweapon.Clear(BOAT_WEAPON);
|
pPlayer->gotweapon.Clear(BOAT_WEAPON);
|
||||||
pPlayer->curr_weapon = SLINGBLADE_WEAPON;
|
pPlayer->curr_weapon = SLINGBLADE_WEAPON;
|
||||||
}
|
}
|
||||||
|
@ -1041,9 +1041,9 @@ void P_ResetWeapons(int playerNum)
|
||||||
pPlayer->gotweapon.Set(SLINGBLADE_WEAPON);
|
pPlayer->gotweapon.Set(SLINGBLADE_WEAPON);
|
||||||
pPlayer->ammo_amount[KNEE_WEAPON] = 1;
|
pPlayer->ammo_amount[KNEE_WEAPON] = 1;
|
||||||
pPlayer->ammo_amount[SLINGBLADE_WEAPON] = 1;
|
pPlayer->ammo_amount[SLINGBLADE_WEAPON] = 1;
|
||||||
pPlayer->on_motorcycle = 0;
|
pPlayer->OnMotorcycle = 0;
|
||||||
pPlayer->moto_underwater = 0;
|
pPlayer->moto_underwater = 0;
|
||||||
pPlayer->on_boat = 0;
|
pPlayer->OnBoat = 0;
|
||||||
pPlayer->lotag800kill = 0;
|
pPlayer->lotag800kill = 0;
|
||||||
}
|
}
|
||||||
pPlayer->last_weapon = -1;
|
pPlayer->last_weapon = -1;
|
||||||
|
|
|
@ -4465,13 +4465,13 @@ void P_CheckSectors(int playerNum)
|
||||||
|
|
||||||
if (RRRA)
|
if (RRRA)
|
||||||
{
|
{
|
||||||
if (pPlayer->on_motorcycle)
|
if (pPlayer->OnMotorcycle)
|
||||||
{
|
{
|
||||||
if (pPlayer->moto_speed < 20)
|
if (pPlayer->moto_speed < 20)
|
||||||
G_OffMotorcycle(pPlayer);
|
G_OffMotorcycle(pPlayer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (pPlayer->on_boat)
|
if (pPlayer->OnBoat)
|
||||||
{
|
{
|
||||||
if (pPlayer->moto_speed < 20)
|
if (pPlayer->moto_speed < 20)
|
||||||
G_OffBoat(pPlayer);
|
G_OffBoat(pPlayer);
|
||||||
|
|
Loading…
Reference in a new issue