mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Manually merge EDuke32 SVN commit 7775.
This commit is contained in:
parent
cefb1a5551
commit
63edfcf7c7
9 changed files with 55 additions and 55 deletions
|
@ -3127,7 +3127,7 @@ default_case:
|
||||||
static int P_Submerge(int const spriteNum, int const playerNum, DukePlayer_t * const pPlayer, int const sectNum, int const otherSect)
|
static int P_Submerge(int const spriteNum, int const playerNum, DukePlayer_t * const pPlayer, int const sectNum, int const otherSect)
|
||||||
{
|
{
|
||||||
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].inputBits->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->on_motorcycle)
|
||||||
// if( onfloorz && sectlotag == 1 && ps->pos.z > (sector[sect].floorz-(6<<8)) )
|
// if( onfloorz && sectlotag == 1 && ps->pos.z > (sector[sect].floorz-(6<<8)) )
|
||||||
{
|
{
|
||||||
|
@ -3323,12 +3323,12 @@ ACTOR_STATIC void G_MoveTransports(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (onFloor == 0 && klabs(SZ(spriteNum) - pPlayer->pos.z) < 6144)
|
if (onFloor == 0 && klabs(SZ(spriteNum) - pPlayer->pos.z) < 6144)
|
||||||
if (!pPlayer->jetpack_on || TEST_SYNC_KEY(g_player[playerNum].inputBits->bits, SK_JUMP)
|
if (!pPlayer->jetpack_on || TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_JUMP)
|
||||||
|| (TEST_SYNC_KEY(g_player[playerNum].inputBits->bits, SK_CROUCH) ^ pPlayer->crouch_toggle))
|
|| (TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_CROUCH) ^ pPlayer->crouch_toggle))
|
||||||
{
|
{
|
||||||
pPlayer->pos.x += sprite[OW(spriteNum)].x - SX(spriteNum);
|
pPlayer->pos.x += sprite[OW(spriteNum)].x - SX(spriteNum);
|
||||||
pPlayer->pos.y += sprite[OW(spriteNum)].y - SY(spriteNum);
|
pPlayer->pos.y += sprite[OW(spriteNum)].y - SY(spriteNum);
|
||||||
pPlayer->pos.z = (pPlayer->jetpack_on && (TEST_SYNC_KEY(g_player[playerNum].inputBits->bits, SK_JUMP)
|
pPlayer->pos.z = (pPlayer->jetpack_on && (TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_JUMP)
|
||||||
|| pPlayer->jetpack_on < 11))
|
|| pPlayer->jetpack_on < 11))
|
||||||
? sprite[OW(spriteNum)].z - 6144
|
? sprite[OW(spriteNum)].z - 6144
|
||||||
: sprite[OW(spriteNum)].z + 6144;
|
: sprite[OW(spriteNum)].z + 6144;
|
||||||
|
@ -4869,7 +4869,7 @@ ACTOR_STATIC void G_MoveActors(void)
|
||||||
{
|
{
|
||||||
int const angDiff = G_GetAngleDelta(fix16_to_int(pPlayer->q16ang),getangle(pSprite->x-pPlayer->pos.x,pSprite->y-pPlayer->pos.y));
|
int const angDiff = G_GetAngleDelta(fix16_to_int(pPlayer->q16ang),getangle(pSprite->x-pPlayer->pos.x,pSprite->y-pPlayer->pos.y));
|
||||||
|
|
||||||
if (angDiff > -64 && angDiff < 64 && TEST_SYNC_KEY(g_player[playerNum].inputBits->bits, SK_OPEN)
|
if (angDiff > -64 && angDiff < 64 && TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_OPEN)
|
||||||
&& pPlayer->toggle_key_flag == 1)
|
&& pPlayer->toggle_key_flag == 1)
|
||||||
{
|
{
|
||||||
int ballSprite;
|
int ballSprite;
|
||||||
|
@ -5319,7 +5319,7 @@ ACTOR_STATIC void G_MoveActors(void)
|
||||||
|
|
||||||
pSprite->ang = fix16_to_int(pPlayer->q16ang);
|
pSprite->ang = fix16_to_int(pPlayer->q16ang);
|
||||||
|
|
||||||
if ((TEST_SYNC_KEY(g_player[playerNum].inputBits->bits, SK_FIRE) || (pPlayer->quick_kick > 0)) && sprite[pPlayer->i].extra > 0)
|
if ((TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_FIRE) || (pPlayer->quick_kick > 0)) && sprite[pPlayer->i].extra > 0)
|
||||||
if (pPlayer->quick_kick > 0 ||
|
if (pPlayer->quick_kick > 0 ||
|
||||||
(pPlayer->curr_weapon != HANDREMOTE_WEAPON && pPlayer->curr_weapon != HANDBOMB_WEAPON &&
|
(pPlayer->curr_weapon != HANDREMOTE_WEAPON && pPlayer->curr_weapon != HANDBOMB_WEAPON &&
|
||||||
pPlayer->curr_weapon != TRIPBOMB_WEAPON && pPlayer->ammo_amount[pPlayer->curr_weapon] >= 0))
|
pPlayer->curr_weapon != TRIPBOMB_WEAPON && pPlayer->ammo_amount[pPlayer->curr_weapon] >= 0))
|
||||||
|
|
|
@ -259,7 +259,7 @@ void G_DemoRecord(void)
|
||||||
|
|
||||||
for (TRAVERSE_CONNECT(i))
|
for (TRAVERSE_CONNECT(i))
|
||||||
{
|
{
|
||||||
Bmemcpy(&recsync[ud.reccnt], g_player[i].inputBits, sizeof(input_t));
|
Bmemcpy(&recsync[ud.reccnt], g_player[i].input, sizeof(input_t));
|
||||||
ud.reccnt++;
|
ud.reccnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5130,17 +5130,17 @@ default_case1:
|
||||||
{
|
{
|
||||||
static int32_t targetang = 0;
|
static int32_t targetang = 0;
|
||||||
|
|
||||||
if (g_player[playerNum].inputBits->extbits&(1<<1))
|
if (g_player[playerNum].input->extbits&(1<<1))
|
||||||
{
|
{
|
||||||
if (g_player[playerNum].inputBits->extbits&(1<<2))targetang += 16;
|
if (g_player[playerNum].input->extbits&(1<<2))targetang += 16;
|
||||||
else if (g_player[playerNum].inputBits->extbits&(1<<3)) targetang -= 16;
|
else if (g_player[playerNum].input->extbits&(1<<3)) targetang -= 16;
|
||||||
else if (targetang > 0) targetang -= targetang>>2;
|
else if (targetang > 0) targetang -= targetang>>2;
|
||||||
else if (targetang < 0) targetang += (-targetang)>>2;
|
else if (targetang < 0) targetang += (-targetang)>>2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (g_player[playerNum].inputBits->extbits&(1<<2))targetang -= 16;
|
if (g_player[playerNum].input->extbits&(1<<2))targetang -= 16;
|
||||||
else if (g_player[playerNum].inputBits->extbits&(1<<3)) targetang += 16;
|
else if (g_player[playerNum].input->extbits&(1<<3)) targetang += 16;
|
||||||
else if (targetang > 0) targetang -= targetang>>2;
|
else if (targetang > 0) targetang -= targetang>>2;
|
||||||
else if (targetang < 0) targetang += (-targetang)>>2;
|
else if (targetang < 0) targetang += (-targetang)>>2;
|
||||||
}
|
}
|
||||||
|
@ -5204,7 +5204,7 @@ default_case1:
|
||||||
spritesortcnt++;
|
spritesortcnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_player[playerNum].inputBits->extbits & (1 << 7) && !ud.pause_on && spritesortcnt < maxspritesonscreen)
|
if (g_player[playerNum].input->extbits & (1 << 7) && !ud.pause_on && spritesortcnt < maxspritesonscreen)
|
||||||
{
|
{
|
||||||
tspritetype *const playerTyping = t;
|
tspritetype *const playerTyping = t;
|
||||||
|
|
||||||
|
@ -6707,7 +6707,7 @@ static void G_Cleanup(void)
|
||||||
for (i=MAXPLAYERS-1; i>=0; i--)
|
for (i=MAXPLAYERS-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
Xfree(g_player[i].ps);
|
Xfree(g_player[i].ps);
|
||||||
Xfree(g_player[i].inputBits);
|
Xfree(g_player[i].input);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (label != (char *)&sprite[0]) Xfree(label);
|
if (label != (char *)&sprite[0]) Xfree(label);
|
||||||
|
@ -7138,8 +7138,8 @@ void G_MaybeAllocPlayer(int32_t pnum)
|
||||||
{
|
{
|
||||||
if (g_player[pnum].ps == NULL)
|
if (g_player[pnum].ps == NULL)
|
||||||
g_player[pnum].ps = (DukePlayer_t *)Xcalloc(1, sizeof(DukePlayer_t));
|
g_player[pnum].ps = (DukePlayer_t *)Xcalloc(1, sizeof(DukePlayer_t));
|
||||||
if (g_player[pnum].inputBits == NULL)
|
if (g_player[pnum].input == NULL)
|
||||||
g_player[pnum].inputBits = (input_t *)Xcalloc(1, sizeof(input_t));
|
g_player[pnum].input = (input_t *)Xcalloc(1, sizeof(input_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void app_loop();
|
void app_loop();
|
||||||
|
@ -7621,7 +7621,7 @@ int G_DoMoveThings(void)
|
||||||
// randomseed = ticrandomseed;
|
// randomseed = ticrandomseed;
|
||||||
|
|
||||||
for (bssize_t TRAVERSE_CONNECT(i))
|
for (bssize_t TRAVERSE_CONNECT(i))
|
||||||
Bmemcpy(g_player[i].inputBits, &inputfifo[movefifoplc&(MOVEFIFOSIZ-1)][i], sizeof(input_t));
|
Bmemcpy(g_player[i].input, &inputfifo[movefifoplc&(MOVEFIFOSIZ-1)][i], sizeof(input_t));
|
||||||
|
|
||||||
movefifoplc++;
|
movefifoplc++;
|
||||||
|
|
||||||
|
@ -7660,7 +7660,7 @@ int G_DoMoveThings(void)
|
||||||
|
|
||||||
for (bssize_t TRAVERSE_CONNECT(i))
|
for (bssize_t TRAVERSE_CONNECT(i))
|
||||||
{
|
{
|
||||||
if (g_player[i].inputBits->extbits&(1<<6))
|
if (g_player[i].input->extbits&(1<<6))
|
||||||
{
|
{
|
||||||
g_player[i].ps->team = g_player[i].pteam;
|
g_player[i].ps->team = g_player[i].pteam;
|
||||||
if (g_gametypeFlags[ud.coop] & GAMETYPE_TDM)
|
if (g_gametypeFlags[ud.coop] & GAMETYPE_TDM)
|
||||||
|
|
|
@ -2398,7 +2398,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
||||||
int const moveFlags = *(++insptr);
|
int const moveFlags = *(++insptr);
|
||||||
int nResult = 0;
|
int nResult = 0;
|
||||||
int const playerXVel = sprite[pPlayer->i].xvel;
|
int const playerXVel = sprite[pPlayer->i].xvel;
|
||||||
int const syncBits = g_player[vm.playerNum].inputBits->bits;
|
int const syncBits = g_player[vm.playerNum].input->bits;
|
||||||
|
|
||||||
if (((moveFlags & pducking) && pPlayer->on_ground && (TEST_SYNC_KEY(syncBits, SK_CROUCH) ^ vm.pPlayer->crouch_toggle))
|
if (((moveFlags & pducking) && pPlayer->on_ground && (TEST_SYNC_KEY(syncBits, SK_CROUCH) ^ vm.pPlayer->crouch_toggle))
|
||||||
|| ((moveFlags & pfalling) && pPlayer->jumping_counter == 0 && !pPlayer->on_ground && pPlayer->vel.z > 2048)
|
|| ((moveFlags & pfalling) && pPlayer->jumping_counter == 0 && !pPlayer->on_ground && pPlayer->vel.z > 2048)
|
||||||
|
@ -2469,7 +2469,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
||||||
VM_CONDITIONAL(((vm.pActor->floorz - vm.pActor->ceilingz) >> 8) < *insptr);
|
VM_CONDITIONAL(((vm.pActor->floorz - vm.pActor->ceilingz) >> 8) < *insptr);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case CON_IFHITSPACE: VM_CONDITIONAL(TEST_SYNC_KEY(g_player[vm.playerNum].inputBits->bits, SK_OPEN)); continue;
|
case CON_IFHITSPACE: VM_CONDITIONAL(TEST_SYNC_KEY(g_player[vm.playerNum].input->bits, SK_OPEN)); continue;
|
||||||
|
|
||||||
case CON_IFOUTSIDE:
|
case CON_IFOUTSIDE:
|
||||||
if (DEER)
|
if (DEER)
|
||||||
|
|
|
@ -3022,9 +3022,9 @@ void Net_ReceiveNewPlayer(uint8_t *pbuf, int32_t packbufleng)
|
||||||
{
|
{
|
||||||
g_player[pbuf[4]].ps = (DukePlayer_t *) Xcalloc(1,sizeof(DukePlayer_t));
|
g_player[pbuf[4]].ps = (DukePlayer_t *) Xcalloc(1,sizeof(DukePlayer_t));
|
||||||
}
|
}
|
||||||
if (!g_player[pbuf[4]].inputBits)
|
if (!g_player[pbuf[4]].input)
|
||||||
{
|
{
|
||||||
g_player[pbuf[4]].inputBits = (input_t *) Xcalloc(1,sizeof(input_t));
|
g_player[pbuf[4]].input = (input_t *) Xcalloc(1,sizeof(input_t));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1407,7 +1407,7 @@ static void P_DisplaySpit(void)
|
||||||
{
|
{
|
||||||
int const rotAng = klabs(sintable[((loogCounter + i) << 5) & 2047]) >> 5;
|
int const rotAng = klabs(sintable[((loogCounter + i) << 5) & 2047]) >> 5;
|
||||||
int const rotZoom = 4096 + ((loogCounter + i) << 9);
|
int const rotZoom = 4096 + ((loogCounter + i) << 9);
|
||||||
int const rotX = (-fix16_to_int(g_player[screenpeek].inputBits->q16avel) >> 1) + (sintable[((loogCounter + i) << 6) & 2047] >> 10);
|
int const rotX = (-fix16_to_int(g_player[screenpeek].input->q16avel) >> 1) + (sintable[((loogCounter + i) << 6) & 2047] >> 10);
|
||||||
|
|
||||||
rotatesprite_fs((pPlayer->loogiex[i] + rotX) << 16, (200 + pPlayer->loogiey[i] - rotY) << 16, rotZoom - (i << 8),
|
rotatesprite_fs((pPlayer->loogiex[i] + rotX) << 16, (200 + pPlayer->loogiey[i] - rotY) << 16, rotZoom - (i << 8),
|
||||||
256 - rotAng, LOOGIE, 0, 0, 2);
|
256 - rotAng, LOOGIE, 0, 0, 2);
|
||||||
|
@ -1467,7 +1467,7 @@ static int P_DisplayFist(int const fistShade)
|
||||||
wx[(g_snum==0)] = (wx[0]+wx[1])/2+1;
|
wx[(g_snum==0)] = (wx[0]+wx[1])/2+1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rotatesprite((-fistInc + 222 + (fix16_to_int(g_player[screenpeek].inputBits->q16avel) >> 5)) << 16, (fistY + fistYOffset) << 16,
|
rotatesprite((-fistInc + 222 + (fix16_to_int(g_player[screenpeek].input->q16avel) >> 5)) << 16, (fistY + fistYOffset) << 16,
|
||||||
fistZoom, 0, FIST, fistShade, fistPal, 2, wx[0], windowxy1.y, wx[1], windowxy2.y);
|
fistZoom, 0, FIST, fistShade, fistPal, 2, wx[0], windowxy1.y, wx[1], windowxy2.y);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1612,7 +1612,7 @@ static int P_DisplayKnee(int kneeShade)
|
||||||
int const kneeY = knee_y[ps->knee_incs] + (klabs(ps->look_ang) / 9) - (ps->hard_landing << 3);
|
int const kneeY = knee_y[ps->knee_incs] + (klabs(ps->look_ang) / 9) - (ps->hard_landing << 3);
|
||||||
int const kneePal = P_GetKneePal(ps);
|
int const kneePal = P_GetKneePal(ps);
|
||||||
|
|
||||||
G_DrawTileScaled(105+(fix16_to_int(g_player[screenpeek].inputBits->q16avel)>>5)-(ps->look_ang>>1)+(knee_y[ps->knee_incs]>>2),
|
G_DrawTileScaled(105+(fix16_to_int(g_player[screenpeek].input->q16avel)>>5)-(ps->look_ang>>1)+(knee_y[ps->knee_incs]>>2),
|
||||||
kneeY+280-(fix16_to_int(ps->q16horiz-ps->q16horizoff)>>4),KNEE,kneeShade,4+DRAWEAP_CENTER,kneePal);
|
kneeY+280-(fix16_to_int(ps->q16horiz-ps->q16horizoff)>>4),KNEE,kneeShade,4+DRAWEAP_CENTER,kneePal);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1635,7 +1635,7 @@ static int P_DisplayKnuckles(int knuckleShade)
|
||||||
int const knuckleY = (klabs(pPlayer->look_ang) / 9) - (pPlayer->hard_landing << 3);
|
int const knuckleY = (klabs(pPlayer->look_ang) / 9) - (pPlayer->hard_landing << 3);
|
||||||
int const knucklePal = P_GetHudPal(pPlayer);
|
int const knucklePal = P_GetHudPal(pPlayer);
|
||||||
|
|
||||||
G_DrawTileScaled(160 + (fix16_to_int(g_player[screenpeek].inputBits->q16avel) >> 5) - (pPlayer->look_ang >> 1),
|
G_DrawTileScaled(160 + (fix16_to_int(g_player[screenpeek].input->q16avel) >> 5) - (pPlayer->look_ang >> 1),
|
||||||
knuckleY + 180 - (fix16_to_int(pPlayer->q16horiz - pPlayer->q16horizoff) >> 4),
|
knuckleY + 180 - (fix16_to_int(pPlayer->q16horiz - pPlayer->q16horizoff) >> 4),
|
||||||
CRACKKNUCKLES + knuckleFrames[pPlayer->knuckle_incs >> 1], knuckleShade, 4 + DRAWEAP_CENTER,
|
CRACKKNUCKLES + knuckleFrames[pPlayer->knuckle_incs >> 1], knuckleShade, 4 + DRAWEAP_CENTER,
|
||||||
knucklePal);
|
knucklePal);
|
||||||
|
@ -1809,7 +1809,7 @@ static int P_DisplayTip(int tipShade)
|
||||||
|
|
||||||
guniqhudid = 201;
|
guniqhudid = 201;
|
||||||
|
|
||||||
G_DrawTileScaled(170 + (fix16_to_int(g_player[screenpeek].inputBits->q16avel) >> 5) - (pPlayer->look_ang >> 1),
|
G_DrawTileScaled(170 + (fix16_to_int(g_player[screenpeek].input->q16avel) >> 5) - (pPlayer->look_ang >> 1),
|
||||||
tipYOffset + tipY + 240 - (fix16_to_int(pPlayer->q16horiz - pPlayer->q16horizoff) >> 4),
|
tipYOffset + tipY + 240 - (fix16_to_int(pPlayer->q16horiz - pPlayer->q16horizoff) >> 4),
|
||||||
TIP + ((26 - pPlayer->tipincs) >> 4), tipShade, DRAWEAP_CENTER, tipPal);
|
TIP + ((26 - pPlayer->tipincs) >> 4), tipShade, DRAWEAP_CENTER, tipPal);
|
||||||
|
|
||||||
|
@ -1836,13 +1836,13 @@ static int P_DisplayAccess(int accessShade)
|
||||||
|
|
||||||
if ((pSprite->access_incs - 3) > 0 && (pSprite->access_incs - 3) >> 3)
|
if ((pSprite->access_incs - 3) > 0 && (pSprite->access_incs - 3) >> 3)
|
||||||
{
|
{
|
||||||
G_DrawTileScaled(170 + (fix16_to_int(g_player[screenpeek].inputBits->q16avel) >> 5) - (pSprite->look_ang >> 1) + accessX,
|
G_DrawTileScaled(170 + (fix16_to_int(g_player[screenpeek].input->q16avel) >> 5) - (pSprite->look_ang >> 1) + accessX,
|
||||||
accessY + 266 - (fix16_to_int(pSprite->q16horiz - pSprite->q16horizoff) >> 4),
|
accessY + 266 - (fix16_to_int(pSprite->q16horiz - pSprite->q16horizoff) >> 4),
|
||||||
HANDHOLDINGLASER + (pSprite->access_incs >> 3), accessShade, DRAWEAP_CENTER, accessPal);
|
HANDHOLDINGLASER + (pSprite->access_incs >> 3), accessShade, DRAWEAP_CENTER, accessPal);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
G_DrawTileScaled(170 + (fix16_to_int(g_player[screenpeek].inputBits->q16avel) >> 5) - (pSprite->look_ang >> 1) + accessX,
|
G_DrawTileScaled(170 + (fix16_to_int(g_player[screenpeek].input->q16avel) >> 5) - (pSprite->look_ang >> 1) + accessX,
|
||||||
accessY + 266 - (fix16_to_int(pSprite->q16horiz - pSprite->q16horizoff) >> 4), HANDHOLDINGACCESS, accessShade,
|
accessY + 266 - (fix16_to_int(pSprite->q16horiz - pSprite->q16horizoff) >> 4), HANDHOLDINGACCESS, accessShade,
|
||||||
4 + DRAWEAP_CENTER, accessPal);
|
4 + DRAWEAP_CENTER, accessPal);
|
||||||
}
|
}
|
||||||
|
@ -4571,7 +4571,7 @@ static int32_t P_DoCounters(int playerNum)
|
||||||
A_PlaySound(DUKE_CRACK_FIRST, pPlayer->i);
|
A_PlaySound(DUKE_CRACK_FIRST, pPlayer->i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (pPlayer->knuckle_incs == 22 || TEST_SYNC_KEY(g_player[playerNum].inputBits->bits, SK_FIRE))
|
else if (pPlayer->knuckle_incs == 22 || TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_FIRE))
|
||||||
pPlayer->knuckle_incs=0;
|
pPlayer->knuckle_incs=0;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -5139,7 +5139,7 @@ static void P_ProcessWeapon(int playerNum)
|
||||||
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
DukePlayer_t *const pPlayer = g_player[playerNum].ps;
|
||||||
uint8_t *const weaponFrame = &pPlayer->kickback_pic;
|
uint8_t *const weaponFrame = &pPlayer->kickback_pic;
|
||||||
int const playerShrunk = (sprite[pPlayer->i].yrepeat < (RR ? 8 : 32));
|
int const playerShrunk = (sprite[pPlayer->i].yrepeat < (RR ? 8 : 32));
|
||||||
uint32_t playerBits = g_player[playerNum].inputBits->bits;
|
uint32_t playerBits = g_player[playerNum].input->bits;
|
||||||
int const sectorLotag = sector[pPlayer->cursectnum].lotag;
|
int const sectorLotag = sector[pPlayer->cursectnum].lotag;
|
||||||
|
|
||||||
if (RR)
|
if (RR)
|
||||||
|
@ -6944,7 +6944,7 @@ void P_ProcessInput(int playerNum)
|
||||||
|
|
||||||
++pPlayer->player_par;
|
++pPlayer->player_par;
|
||||||
|
|
||||||
uint32_t playerBits = g_player[playerNum].inputBits->bits;
|
uint32_t playerBits = g_player[playerNum].input->bits;
|
||||||
|
|
||||||
if (RR)
|
if (RR)
|
||||||
{
|
{
|
||||||
|
@ -8191,9 +8191,9 @@ check_enemy_sprite:
|
||||||
pPlayer->vel.x = 0;
|
pPlayer->vel.x = 0;
|
||||||
pPlayer->vel.y = 0;
|
pPlayer->vel.y = 0;
|
||||||
}
|
}
|
||||||
else if (g_player[playerNum].inputBits->q16avel) //p->ang += syncangvel * constant
|
else if (g_player[playerNum].input->q16avel) //p->ang += syncangvel * constant
|
||||||
{
|
{
|
||||||
fix16_t const inputAng = g_player[playerNum].inputBits->q16avel;
|
fix16_t const inputAng = g_player[playerNum].input->q16avel;
|
||||||
|
|
||||||
pPlayer->q16angvel = (sectorLotag == ST_2_UNDERWATER) ? fix16_mul(inputAng - (inputAng >> 3), fix16_from_int(ksgn(velocityModifier)))
|
pPlayer->q16angvel = (sectorLotag == ST_2_UNDERWATER) ? fix16_mul(inputAng - (inputAng >> 3), fix16_from_int(ksgn(velocityModifier)))
|
||||||
: fix16_mul(inputAng, fix16_from_int(ksgn(velocityModifier)));
|
: fix16_mul(inputAng, fix16_from_int(ksgn(velocityModifier)));
|
||||||
|
@ -8247,7 +8247,7 @@ check_enemy_sprite:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pPlayer->vel.x || pPlayer->vel.y || g_player[playerNum].inputBits->fvel || g_player[playerNum].inputBits->svel)
|
if (pPlayer->vel.x || pPlayer->vel.y || g_player[playerNum].input->fvel || g_player[playerNum].input->svel)
|
||||||
{
|
{
|
||||||
pPlayer->crack_time = 777;
|
pPlayer->crack_time = 777;
|
||||||
|
|
||||||
|
@ -8312,8 +8312,8 @@ check_enemy_sprite:
|
||||||
if (pPlayer->jetpack_on == 0 && pPlayer->inv_amount[GET_STEROIDS] > 0 && pPlayer->inv_amount[GET_STEROIDS] < 400)
|
if (pPlayer->jetpack_on == 0 && pPlayer->inv_amount[GET_STEROIDS] > 0 && pPlayer->inv_amount[GET_STEROIDS] < 400)
|
||||||
velocityModifier <<= 1;
|
velocityModifier <<= 1;
|
||||||
|
|
||||||
pPlayer->vel.x += (((g_player[playerNum].inputBits->fvel) * velocityModifier) << 6);
|
pPlayer->vel.x += (((g_player[playerNum].input->fvel) * velocityModifier) << 6);
|
||||||
pPlayer->vel.y += (((g_player[playerNum].inputBits->svel) * velocityModifier) << 6);
|
pPlayer->vel.y += (((g_player[playerNum].input->svel) * velocityModifier) << 6);
|
||||||
|
|
||||||
int playerSpeedReduction = 0;
|
int playerSpeedReduction = 0;
|
||||||
|
|
||||||
|
@ -8794,7 +8794,7 @@ HORIZONLY:;
|
||||||
pPlayer->q16horiz -= fix16_from_int(pPlayer->hard_landing<<4);
|
pPlayer->q16horiz -= fix16_from_int(pPlayer->hard_landing<<4);
|
||||||
}
|
}
|
||||||
|
|
||||||
pPlayer->q16horiz = fix16_clamp(pPlayer->q16horiz + g_player[playerNum].inputBits->q16horz, F16(HORIZ_MIN), F16(HORIZ_MAX));
|
pPlayer->q16horiz = fix16_clamp(pPlayer->q16horiz + g_player[playerNum].input->q16horz, F16(HORIZ_MIN), F16(HORIZ_MAX));
|
||||||
|
|
||||||
if (centerHoriz && (!RR || !pPlayer->recoil))
|
if (centerHoriz && (!RR || !pPlayer->recoil))
|
||||||
{
|
{
|
||||||
|
@ -8919,7 +8919,7 @@ void P_DHProcessInput(int playerNum)
|
||||||
|
|
||||||
++pPlayer->player_par;
|
++pPlayer->player_par;
|
||||||
|
|
||||||
uint32_t playerBits = g_player[playerNum].inputBits->bits;
|
uint32_t playerBits = g_player[playerNum].input->bits;
|
||||||
|
|
||||||
pSprite->cstat = 0;
|
pSprite->cstat = 0;
|
||||||
|
|
||||||
|
@ -9266,9 +9266,9 @@ void P_DHProcessInput(int playerNum)
|
||||||
pPlayer->vel.x = 0;
|
pPlayer->vel.x = 0;
|
||||||
pPlayer->vel.y = 0;
|
pPlayer->vel.y = 0;
|
||||||
}
|
}
|
||||||
else if (g_player[playerNum].inputBits->q16avel) //p->ang += syncangvel * constant
|
else if (g_player[playerNum].input->q16avel) //p->ang += syncangvel * constant
|
||||||
{
|
{
|
||||||
fix16_t const inputAng = g_player[playerNum].inputBits->q16avel;
|
fix16_t const inputAng = g_player[playerNum].input->q16avel;
|
||||||
|
|
||||||
pPlayer->q16angvel = (sectorLotag == ST_2_UNDERWATER) ? fix16_mul(inputAng - (inputAng >> 3), fix16_from_int(ksgn(velocityModifier)))
|
pPlayer->q16angvel = (sectorLotag == ST_2_UNDERWATER) ? fix16_mul(inputAng - (inputAng >> 3), fix16_from_int(ksgn(velocityModifier)))
|
||||||
: fix16_mul(inputAng, fix16_from_int(ksgn(velocityModifier)));
|
: fix16_mul(inputAng, fix16_from_int(ksgn(velocityModifier)));
|
||||||
|
@ -9277,14 +9277,14 @@ void P_DHProcessInput(int playerNum)
|
||||||
pPlayer->crack_time = 777;
|
pPlayer->crack_time = 777;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pPlayer->vel.x || pPlayer->vel.y || g_player[playerNum].inputBits->fvel || g_player[playerNum].inputBits->svel)
|
if (pPlayer->vel.x || pPlayer->vel.y || g_player[playerNum].input->fvel || g_player[playerNum].input->svel)
|
||||||
{
|
{
|
||||||
pPlayer->crack_time = 777;
|
pPlayer->crack_time = 777;
|
||||||
|
|
||||||
pPlayer->not_on_water = 1;
|
pPlayer->not_on_water = 1;
|
||||||
|
|
||||||
pPlayer->vel.x += (((g_player[playerNum].inputBits->fvel) * velocityModifier) << 6);
|
pPlayer->vel.x += (((g_player[playerNum].input->fvel) * velocityModifier) << 6);
|
||||||
pPlayer->vel.y += (((g_player[playerNum].inputBits->svel) * velocityModifier) << 6);
|
pPlayer->vel.y += (((g_player[playerNum].input->svel) * velocityModifier) << 6);
|
||||||
|
|
||||||
pPlayer->vel.x = mulscale16(pPlayer->vel.x, pPlayer->runspeed);
|
pPlayer->vel.x = mulscale16(pPlayer->vel.x, pPlayer->runspeed);
|
||||||
pPlayer->vel.y = mulscale16(pPlayer->vel.y, pPlayer->runspeed);
|
pPlayer->vel.y = mulscale16(pPlayer->vel.y, pPlayer->runspeed);
|
||||||
|
@ -9362,7 +9362,7 @@ void P_DHProcessInput(int playerNum)
|
||||||
|
|
||||||
if (pPlayer->jetpack_on == 0)
|
if (pPlayer->jetpack_on == 0)
|
||||||
{
|
{
|
||||||
if (g_player[playerNum].inputBits->fvel && pPlayer->on_ground)
|
if (g_player[playerNum].input->fvel && pPlayer->on_ground)
|
||||||
{
|
{
|
||||||
pPlayer->pycount += 64;
|
pPlayer->pycount += 64;
|
||||||
pPlayer->pycount &= 2047;
|
pPlayer->pycount &= 2047;
|
||||||
|
@ -9452,7 +9452,7 @@ void P_DHProcessInput(int playerNum)
|
||||||
pPlayer->q16horiz -= fix16_from_int(pPlayer->hard_landing<<4);
|
pPlayer->q16horiz -= fix16_from_int(pPlayer->hard_landing<<4);
|
||||||
}
|
}
|
||||||
|
|
||||||
pPlayer->q16horiz = fix16_clamp(pPlayer->q16horiz? 0 : g_player[playerNum].inputBits->q16horz, F16(HORIZ_MIN), F16(HORIZ_MAX));
|
pPlayer->q16horiz = fix16_clamp(pPlayer->q16horiz? 0 : g_player[playerNum].input->q16horz, F16(HORIZ_MIN), F16(HORIZ_MAX));
|
||||||
|
|
||||||
if (centerHoriz && (!RR || !pPlayer->recoil))
|
if (centerHoriz && (!RR || !pPlayer->recoil))
|
||||||
{
|
{
|
||||||
|
|
|
@ -230,7 +230,7 @@ typedef struct {
|
||||||
// KEEPINSYNC lunatic/_defs_game.lua
|
// KEEPINSYNC lunatic/_defs_game.lua
|
||||||
typedef struct {
|
typedef struct {
|
||||||
DukePlayer_t *ps;
|
DukePlayer_t *ps;
|
||||||
input_t *inputBits;
|
input_t *input;
|
||||||
|
|
||||||
int32_t movefifoend, syncvalhead, myminlag;
|
int32_t movefifoend, syncvalhead, myminlag;
|
||||||
int32_t pcolor, pteam;
|
int32_t pcolor, pteam;
|
||||||
|
|
|
@ -2185,8 +2185,8 @@ void G_ClearFIFO(void)
|
||||||
|
|
||||||
for (bsize_t p = 0; p <= MAXPLAYERS - 1; ++p)
|
for (bsize_t p = 0; p <= MAXPLAYERS - 1; ++p)
|
||||||
{
|
{
|
||||||
if (g_player[p].inputBits != NULL)
|
if (g_player[p].input != NULL)
|
||||||
Bmemset(g_player[p].inputBits, 0, sizeof(input_t));
|
Bmemset(g_player[p].input, 0, sizeof(input_t));
|
||||||
g_player[p].vote = g_player[p].gotvote = 0;
|
g_player[p].vote = g_player[p].gotvote = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3574,7 +3574,7 @@ void P_HandleSharedKeys(int playerNum)
|
||||||
|
|
||||||
if (pPlayer->cheat_phase == 1) return;
|
if (pPlayer->cheat_phase == 1) return;
|
||||||
|
|
||||||
uint32_t playerBits = g_player[playerNum].inputBits->bits;
|
uint32_t playerBits = g_player[playerNum].input->bits;
|
||||||
int32_t weaponNum;
|
int32_t weaponNum;
|
||||||
|
|
||||||
// 1<<0 = jump
|
// 1<<0 = jump
|
||||||
|
@ -4375,7 +4375,7 @@ void P_CheckSectors(int playerNum)
|
||||||
if (pPlayer->gm &MODE_TYPE || sprite[pPlayer->i].extra <= 0)
|
if (pPlayer->gm &MODE_TYPE || sprite[pPlayer->i].extra <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ud.cashman && TEST_SYNC_KEY(g_player[playerNum].inputBits->bits, SK_OPEN))
|
if (ud.cashman && TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_OPEN))
|
||||||
{
|
{
|
||||||
if (RR && !RRRA)
|
if (RR && !RRRA)
|
||||||
g_canSeePlayer = -1;
|
g_canSeePlayer = -1;
|
||||||
|
@ -4384,14 +4384,14 @@ void P_CheckSectors(int playerNum)
|
||||||
|
|
||||||
if (!RR && pPlayer->newowner >= 0)
|
if (!RR && pPlayer->newowner >= 0)
|
||||||
{
|
{
|
||||||
if (klabs(g_player[playerNum].inputBits->svel) > 768 || klabs(g_player[playerNum].inputBits->fvel) > 768)
|
if (klabs(g_player[playerNum].input->svel) > 768 || klabs(g_player[playerNum].input->fvel) > 768)
|
||||||
{
|
{
|
||||||
G_ClearCameras(pPlayer);
|
G_ClearCameras(pPlayer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!TEST_SYNC_KEY(g_player[playerNum].inputBits->bits, SK_OPEN) && !TEST_SYNC_KEY(g_player[playerNum].inputBits->bits, SK_ESCAPE))
|
if (!TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_OPEN) && !TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_ESCAPE))
|
||||||
pPlayer->toggle_key_flag = 0;
|
pPlayer->toggle_key_flag = 0;
|
||||||
else if (!pPlayer->toggle_key_flag)
|
else if (!pPlayer->toggle_key_flag)
|
||||||
{
|
{
|
||||||
|
@ -4400,7 +4400,7 @@ void P_CheckSectors(int playerNum)
|
||||||
int16_t nearSector, nearWall, nearSprite;
|
int16_t nearSector, nearWall, nearSprite;
|
||||||
int32_t nearDist;
|
int32_t nearDist;
|
||||||
|
|
||||||
if (!RR && TEST_SYNC_KEY(g_player[playerNum].inputBits->bits, SK_ESCAPE))
|
if (!RR && TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_ESCAPE))
|
||||||
{
|
{
|
||||||
if (pPlayer->newowner >= 0)
|
if (pPlayer->newowner >= 0)
|
||||||
G_ClearCameras(pPlayer);
|
G_ClearCameras(pPlayer);
|
||||||
|
@ -4729,7 +4729,7 @@ void P_CheckSectors(int playerNum)
|
||||||
} // switch
|
} // switch
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TEST_SYNC_KEY(g_player[playerNum].inputBits->bits, SK_OPEN) == 0)
|
if (TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_OPEN) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!RR && pPlayer->newowner >= 0)
|
if (!RR && pPlayer->newowner >= 0)
|
||||||
|
|
Loading…
Reference in a new issue