Commit de49453f authored by Richard Gobeille's avatar Richard Gobeille

Duke3d: get rid of dynamic allocation for input_t inside playerdata_t

At some point years ago I switched the input_t struct inside the player struct to use dynamic memory allocation for some reason. This changes that back--input_t is only 20 bytes and dynamically allocating it saves at most a couple hundred bytes of memory. Pointless.
parent 7d38c5d6
......@@ -3602,7 +3602,7 @@ ACTOR_STATIC void G_MoveWeapons(void)
static int P_Submerge(int const playerNum, DukePlayer_t * const pPlayer, int const sectNum, int const otherSect)
{
if (pPlayer->on_ground && pPlayer->pos.z >= sector[sectNum].floorz
&& (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))
// if( onfloorz && sectlotag == 1 && ps->pos.z > (sector[sect].floorz-(6<<8)) )
{
if (screenpeek == playerNum)
......@@ -3618,7 +3618,7 @@ static int P_Submerge(int const playerNum, DukePlayer_t * const pPlayer, int con
pPlayer->opos.z = pPlayer->pos.z = sector[otherSect].ceilingz;
if (TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_CROUCH))
if (TEST_SYNC_KEY(g_player[playerNum].input.bits, SK_CROUCH))
pPlayer->vel.z += 512;
return 1;
......@@ -3781,12 +3781,12 @@ ACTOR_STATIC void G_MoveTransports(void)
}
if (onFloor == 0 && klabs(SZ(spriteNum) - pPlayer->pos.z) < 6144)
if (!pPlayer->jetpack_on || TEST_SYNC_KEY(thisPlayer.input->bits, SK_JUMP)
|| TEST_SYNC_KEY(thisPlayer.input->bits, SK_CROUCH))
if (!pPlayer->jetpack_on || TEST_SYNC_KEY(thisPlayer.input.bits, SK_JUMP)
|| TEST_SYNC_KEY(thisPlayer.input.bits, SK_CROUCH))
{
pPlayer->pos.x += sprite[OW(spriteNum)].x - SX(spriteNum);
pPlayer->pos.y += sprite[OW(spriteNum)].y - SY(spriteNum);
pPlayer->pos.z = (pPlayer->jetpack_on && (TEST_SYNC_KEY(thisPlayer.input->bits, SK_JUMP)
pPlayer->pos.z = (pPlayer->jetpack_on && (TEST_SYNC_KEY(thisPlayer.input.bits, SK_JUMP)
|| pPlayer->jetpack_on < 11))
? sprite[OW(spriteNum)].z - 6144
: sprite[OW(spriteNum)].z + 6144;
......@@ -4346,7 +4346,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));
if (angDiff > -64 && angDiff < 64 && TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_OPEN)
if (angDiff > -64 && angDiff < 64 && TEST_SYNC_KEY(g_player[playerNum].input.bits, SK_OPEN)
&& pPlayer->toggle_key_flag == 1)
{
int ballSprite;
......@@ -4768,7 +4768,7 @@ ACTOR_STATIC void G_MoveActors(void)
pSprite->ang = fix16_to_int(pPlayer->q16ang);
if ((TEST_SYNC_KEY(g_player[playerNum].input->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 ||
(PWEAPON(playerNum, pPlayer->curr_weapon, WorksLike) != HANDREMOTE_WEAPON && PWEAPON(playerNum, pPlayer->curr_weapon, WorksLike) != HANDBOMB_WEAPON &&
PWEAPON(playerNum, pPlayer->curr_weapon, WorksLike) != TRIPBOMB_WEAPON && pPlayer->ammo_amount[pPlayer->curr_weapon] >= 0))
......
......@@ -287,7 +287,7 @@ void G_DemoRecord(void)
for (TRAVERSE_CONNECT(i))
{
Bmemcpy(&recsync[ud.reccnt], g_player[i].input, sizeof(input_t));
Bmemcpy(&recsync[ud.reccnt], &g_player[i].input, sizeof(input_t));
ud.reccnt++;
}
......
......@@ -4016,17 +4016,17 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura
{
static int32_t targetang = 0;
if (g_player[playerNum].input->extbits&(1<<1))
if (g_player[playerNum].input.extbits&(1<<1))
{
if (g_player[playerNum].input->extbits&(1<<2))targetang += 16;
else if (g_player[playerNum].input->extbits&(1<<3)) targetang -= 16;
if (g_player[playerNum].input.extbits&(1<<2))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 (g_player[playerNum].input->extbits&(1<<2))targetang -= 16;
else if (g_player[playerNum].input->extbits&(1<<3)) targetang += 16;
if (g_player[playerNum].input.extbits&(1<<2))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;
}
......@@ -4058,7 +4058,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura
spritesortcnt++;
}
if (g_player[playerNum].input->extbits & (1 << 7) && !ud.pause_on && spritesortcnt < maxspritesonscreen)
if (g_player[playerNum].input.extbits & (1 << 7) && !ud.pause_on && spritesortcnt < maxspritesonscreen)
{
auto const playerTyping = &tsprite[spritesortcnt];
......@@ -5873,15 +5873,11 @@ static void G_Cleanup(void)
}
for (i=MAXPLAYERS-1; i>=0; i--)
{
Xfree(g_player[i].ps);
Xfree(g_player[i].input);
}
for (i=MAXSOUNDS-1; i>=0; i--)
{
Xfree(g_sounds[i].filename);
}
if (label != (char *)&sprite[0]) Xfree(label);
if (labelcode != (int32_t *)&sector[0]) Xfree(labelcode);
Xfree(apScript);
......@@ -6322,8 +6318,6 @@ void G_MaybeAllocPlayer(int32_t pnum)
{
if (g_player[pnum].ps == NULL)
g_player[pnum].ps = (DukePlayer_t *)Xcalloc(1, sizeof(DukePlayer_t));
if (g_player[pnum].input == NULL)
g_player[pnum].input = (input_t *)Xcalloc(1, sizeof(input_t));
}
// TODO: reorder (net)actor_t to eliminate slop and update assertion
......@@ -7132,7 +7126,7 @@ int G_DoMoveThings(void)
randomseed = ticrandomseed;
for (bssize_t TRAVERSE_CONNECT(i))
Bmemcpy(g_player[i].input, &inputfifo[(g_netServer && myconnectindex == i)][i], sizeof(input_t));
Bmemcpy(&g_player[i].input, &inputfifo[(g_netServer && myconnectindex == i)][i], sizeof(input_t));
G_UpdateInterpolations();
......
......@@ -2985,7 +2985,7 @@ badindex:
dispatch();
vInstruction(CON_IFHITSPACE):
branch(TEST_SYNC_KEY(g_player[vm.playerNum].input->bits, SK_OPEN));
branch(TEST_SYNC_KEY(g_player[vm.playerNum].input.bits, SK_OPEN));
dispatch();
vInstruction(CON_IFHITWEAPON):
......@@ -5023,7 +5023,7 @@ badindex:
int const moveFlags = *(++insptr);
int nResult = 0;
int const playerXVel = sprite[vm.pPlayer->i].xvel;
int const syncBits = g_player[vm.playerNum].input->bits;
int const syncBits = g_player[vm.playerNum].input.bits;
if (((moveFlags & pducking) && vm.pPlayer->on_ground && TEST_SYNC_KEY(syncBits, SK_CROUCH))
|| ((moveFlags & pfalling) && vm.pPlayer->jumping_counter == 0 && !vm.pPlayer->on_ground && vm.pPlayer->vel.z > 2048)
......
......@@ -1764,17 +1764,17 @@ int32_t __fastcall VM_GetPlayerInput(int const playerNum, int32_t labelNum)
switch (labelNum)
{
case INPUT_AVEL:
labelNum = (i->q16avel >> 16); break;
labelNum = (i.q16avel >> 16); break;
case INPUT_HORZ:
labelNum = (i->q16horz >> 16); break;
labelNum = (i.q16horz >> 16); break;
case INPUT_Q16AVEL: labelNum = i->q16avel; break;
case INPUT_Q16HORZ: labelNum = i->q16horz; break;
case INPUT_FVEL: labelNum = i->fvel; break;
case INPUT_SVEL: labelNum = i->svel; break;
case INPUT_BITS: labelNum = i->bits; break;
case INPUT_EXTBITS: labelNum = i->extbits; break;
case INPUT_Q16AVEL: labelNum = i.q16avel; break;
case INPUT_Q16HORZ: labelNum = i.q16horz; break;
case INPUT_FVEL: labelNum = i.fvel; break;
case INPUT_SVEL: labelNum = i.svel; break;
case INPUT_BITS: labelNum = i.bits; break;
case INPUT_EXTBITS: labelNum = i.extbits; break;
default: EDUKE32_UNREACHABLE_SECTION(labelNum = -1; break);
}
......@@ -1795,17 +1795,17 @@ void __fastcall VM_SetPlayerInput(int const playerNum, int const labelNum, int32
switch (labelNum)
{
case INPUT_AVEL:
i->q16avel = fix16_from_int(newValue); break;
i.q16avel = fix16_from_int(newValue); break;
case INPUT_HORZ:
i->q16horz = fix16_from_int(newValue); break;
case INPUT_Q16AVEL: i->q16avel = newValue; break;
case INPUT_Q16HORZ: i->q16horz = newValue; break;
case INPUT_FVEL: i->fvel = newValue; break;
case INPUT_SVEL: i->svel = newValue; break;
case INPUT_BITS: i->bits = newValue; break;
case INPUT_EXTBITS: i->extbits = newValue; break;
i.q16horz = fix16_from_int(newValue); break;
case INPUT_Q16AVEL: i.q16avel = newValue; break;
case INPUT_Q16HORZ: i.q16horz = newValue; break;
case INPUT_FVEL: i.fvel = newValue; break;
case INPUT_SVEL: i.svel = newValue; break;
case INPUT_BITS: i.bits = newValue; break;
case INPUT_EXTBITS: i.extbits = newValue; break;
}
}
......
......@@ -2330,13 +2330,7 @@ static void Net_ReceiveNewPlayer(uint8_t *pbuf, int32_t packbufleng)
g_player[pbuf[4]].playerquitflag = 1;
if (!g_player[pbuf[4]].ps)
{
g_player[pbuf[4]].ps = (DukePlayer_t *)Xcalloc(1, sizeof(DukePlayer_t));
}
if (!g_player[pbuf[4]].input)
{
g_player[pbuf[4]].input = (input_t *)Xcalloc(1, sizeof(input_t));
}
}
if (pbuf[5] == NET_DEDICATED_SERVER)
......
......@@ -1754,7 +1754,7 @@ static void P_DisplaySpit(void)
{
int const rotAng = klabs(sintable[((loogCounter + i) << 5) & 2047]) >> 5;
int const rotZoom = 4096 + ((loogCounter + i) << 9);
int const rotX = (-fix16_to_int(g_player[screenpeek].input->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),
256 - rotAng, LOOGIE, 0, 0, 2);
......@@ -1820,7 +1820,7 @@ static int P_DisplayFist(int const fistShade)
wx[(g_snum==0)] = (wx[0]+wx[1])/2+1;
#endif
rotatesprite((-fistInc + 222 + (fix16_to_int(g_player[screenpeek].input->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);
return 1;
......@@ -1970,7 +1970,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 kneePal = P_GetKneePal(ps);
G_DrawTileScaled(105+(fix16_to_int(g_player[screenpeek].input->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);
return 1;
......@@ -2000,7 +2000,7 @@ static int P_DisplayKnuckles(int knuckleShade)
int const knuckleY = (klabs(pPlayer->look_ang) / 9) - (pPlayer->hard_landing << 3);
int const knucklePal = P_GetHudPal(pPlayer);
G_DrawTileScaled(160 + (fix16_to_int(g_player[screenpeek].input->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),
CRACKKNUCKLES + knuckleFrames[pPlayer->knuckle_incs >> 1], knuckleShade, 4 + DRAWEAP_CENTER,
knucklePal);
......@@ -2169,7 +2169,7 @@ static int P_DisplayTip(int tipShade)
guniqhudid = 201;
G_DrawTileScaled(170 + (fix16_to_int(g_player[screenpeek].input->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),
TIP + ((26 - pPlayer->tipincs) >> 4), tipShade, DRAWEAP_CENTER, tipPal);
......@@ -2202,13 +2202,13 @@ static int P_DisplayAccess(int accessShade)
if ((pSprite->access_incs - 3) > 0 && (pSprite->access_incs - 3) >> 3)
{
G_DrawTileScaled(170 + (fix16_to_int(g_player[screenpeek].input->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),
HANDHOLDINGLASER + (pSprite->access_incs >> 3), accessShade, DRAWEAP_CENTER, accessPal);
}
else
{
G_DrawTileScaled(170 + (fix16_to_int(g_player[screenpeek].input->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,
4 + DRAWEAP_CENTER, accessPal);
}
......@@ -3545,7 +3545,7 @@ access_incs:
A_PlaySound(DUKE_CRACK_FIRST,pPlayer->i);
}
}
else if (pPlayer->knuckle_incs == 22 || TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_FIRE))
else if (pPlayer->knuckle_incs == 22 || TEST_SYNC_KEY(g_player[playerNum].input.bits, SK_FIRE))
pPlayer->knuckle_incs=0;
return 1;
......@@ -4046,7 +4046,7 @@ static void P_ProcessWeapon(int playerNum)
auto const pPlayer = g_player[playerNum].ps;
uint8_t *const weaponFrame = &pPlayer->kickback_pic;
int const playerShrunk = (sprite[pPlayer->i].yrepeat < 32);
uint32_t playerBits = g_player[playerNum].input->bits;
uint32_t playerBits = g_player[playerNum].input.bits;
switch (pPlayer->weapon_pos)
{
......@@ -4165,7 +4165,7 @@ static void P_ProcessWeapon(int playerNum)
}
bool const doFire = (playerBits & BIT(SK_FIRE) && (*weaponFrame) == 0);
bool const doAltFire = g_player[playerNum].input->extbits & (1 << 6);
bool const doAltFire = g_player[playerNum].input.extbits & (1 << 6);
if (doAltFire)
{
......@@ -4865,7 +4865,8 @@ void P_ProcessInput(int playerNum)
VM_OnEvent(EVENT_PROCESSINPUT, pPlayer->i, playerNum);
uint32_t playerBits = thisPlayer.input->bits;
auto &pInput = thisPlayer.input;
uint32_t playerBits = pInput.bits;
if (pPlayer->cheat_phase > 0)
playerBits = 0;
......@@ -5384,7 +5385,7 @@ void P_ProcessInput(int playerNum)
pPlayer->vel.x = 0;
pPlayer->vel.y = 0;
}
else if (thisPlayer.input->q16avel)
else if (pInput.q16avel)
pPlayer->crack_time = PCRACKTIME;
if (pPlayer->spritebridge == 0)
......@@ -5422,18 +5423,18 @@ void P_ProcessInput(int playerNum)
}
}
if (thisPlayer.input->extbits & (1)) VM_OnEvent(EVENT_MOVEFORWARD, pPlayer->i, playerNum);
if (thisPlayer.input->extbits & (1 << 1)) VM_OnEvent(EVENT_MOVEBACKWARD, pPlayer->i, playerNum);
if (thisPlayer.input->extbits & (1 << 2)) VM_OnEvent(EVENT_STRAFELEFT, pPlayer->i, playerNum);
if (thisPlayer.input->extbits & (1 << 3)) VM_OnEvent(EVENT_STRAFERIGHT, pPlayer->i, playerNum);
if (pInput.extbits & (1)) VM_OnEvent(EVENT_MOVEFORWARD, pPlayer->i, playerNum);
if (pInput.extbits & (1 << 1)) VM_OnEvent(EVENT_MOVEBACKWARD, pPlayer->i, playerNum);
if (pInput.extbits & (1 << 2)) VM_OnEvent(EVENT_STRAFELEFT, pPlayer->i, playerNum);
if (pInput.extbits & (1 << 3)) VM_OnEvent(EVENT_STRAFERIGHT, pPlayer->i, playerNum);
if (thisPlayer.input->extbits & (1 << 4) || thisPlayer.input->q16avel < 0)
if (pInput.extbits & (1 << 4) || pInput.q16avel < 0)
VM_OnEvent(EVENT_TURNLEFT, pPlayer->i, playerNum);
if (thisPlayer.input->extbits & (1 << 5) || thisPlayer.input->q16avel > 0)
if (pInput.extbits & (1 << 5) || pInput.q16avel > 0)
VM_OnEvent(EVENT_TURNRIGHT, pPlayer->i, playerNum);
if (pPlayer->vel.x || pPlayer->vel.y || thisPlayer.input->fvel || thisPlayer.input->svel)
if (pPlayer->vel.x || pPlayer->vel.y || pInput.fvel || pInput.svel)
{
pPlayer->crack_time = PCRACKTIME;
......@@ -5487,8 +5488,8 @@ void P_ProcessInput(int playerNum)
}
#endif
pPlayer->vel.x += (((thisPlayer.input->fvel) * velocityModifier) << 6);
pPlayer->vel.y += (((thisPlayer.input->svel) * velocityModifier) << 6);
pPlayer->vel.x += (((pInput.fvel) * velocityModifier) << 6);
pPlayer->vel.y += (((pInput.svel) * velocityModifier) << 6);
int playerSpeedReduction = 0;
......
......@@ -215,7 +215,7 @@ EDUKE32_STATIC_ASSERT(sizeof(DukePlayer_t) % 4 == 0);
typedef struct
{
DukePlayer_t *ps;
input_t *input;
input_t input;
int horizRecenter;
int horizAngleAdjust;
......
......@@ -1687,11 +1687,10 @@ void G_ClearFIFO(void)
for (int p = 0; p < MAXPLAYERS; ++p)
{
if (g_player[p].input != NULL)
*g_player[p].input = {};
g_player[p].vote = 0;
g_player[p].input = {};
g_player[p].vote = 0;
g_player[p].gotvote = 0;
g_player[p].horizSkew = 0;
g_player[p].horizAngleAdjust = 0;
}
......
......@@ -2588,7 +2588,7 @@ void P_HandleSharedKeys(int playerNum)
if (pPlayer->cheat_phase == 1) return;
uint32_t playerBits = g_player[playerNum].input->bits, weaponNum;
uint32_t playerBits = g_player[playerNum].input.bits, weaponNum;
// 1<<0 = jump
// 1<<1 = crouch
......@@ -3270,27 +3270,27 @@ void P_CheckSectors(int playerNum)
if (pPlayer->gm &MODE_TYPE || sprite[pPlayer->i].extra <= 0)
return;
if (TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_OPEN))
if (TEST_SYNC_KEY(g_player[playerNum].input.bits, SK_OPEN))
{
if (VM_OnEvent(EVENT_USE, pPlayer->i, playerNum) != 0)
g_player[playerNum].input->bits &= ~BIT(SK_OPEN);
g_player[playerNum].input.bits &= ~BIT(SK_OPEN);
}
#ifndef EDUKE32_STANDALONE
if (!FURY && ud.cashman && TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_OPEN))
if (!FURY && ud.cashman && TEST_SYNC_KEY(g_player[playerNum].input.bits, SK_OPEN))
A_SpawnMultiple(pPlayer->i, MONEY, 2);
#endif
if (pPlayer->newowner >= 0)
{
if (klabs(g_player[playerNum].input->svel) > 768 || klabs(g_player[playerNum].input->fvel) > 768)
if (klabs(g_player[playerNum].input.svel) > 768 || klabs(g_player[playerNum].input.fvel) > 768)
{
G_ClearCameras(pPlayer);
return;
}
}
if (!TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_OPEN) && !TEST_SYNC_KEY(g_player[playerNum].input->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;
else if (!pPlayer->toggle_key_flag)
{
......@@ -3299,7 +3299,7 @@ void P_CheckSectors(int playerNum)
int16_t nearSector, nearWall, nearSprite;
int32_t nearDist;
if (TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_ESCAPE))
if (TEST_SYNC_KEY(g_player[playerNum].input.bits, SK_ESCAPE))
{
if (pPlayer->newowner >= 0)
G_ClearCameras(pPlayer);
......@@ -3504,7 +3504,7 @@ void P_CheckSectors(int playerNum)
} // switch
}
if (TEST_SYNC_KEY(g_player[playerNum].input->bits, SK_OPEN) == 0)
if (TEST_SYNC_KEY(g_player[playerNum].input.bits, SK_OPEN) == 0)
return;
if (pPlayer->newowner >= 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment