Skip to content

Commit 5b1023c

Browse files
BoondorlRicardoLuis0
authored andcommitted
Fixed inventory ticking when playing online
No longer tied to the player's latency value as it now runs in the client-side logic.
1 parent 302d279 commit 5b1023c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/p_tick.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ void P_RunClientsideLogic()
6767

6868
if (gamestate == GS_LEVEL || gamestate == GS_TITLELEVEL)
6969
{
70+
for (int i = 0; i < MAXPLAYERS; ++i)
71+
{
72+
if (playeringame[i] && players[i].inventorytics > 0)
73+
--players[i].inventorytics;
74+
}
75+
7076
for (auto level : AllLevels())
7177
{
7278
auto it = level->GetClientsideThinkerIterator<AActor>();

wadsrc/static/zscript/actors/player/player.zs

-4
Original file line numberDiff line numberDiff line change
@@ -1671,10 +1671,6 @@ class PlayerPawn : Actor
16711671
++BobTimer;
16721672
CheckFOV();
16731673

1674-
if (player.inventorytics)
1675-
{
1676-
player.inventorytics--;
1677-
}
16781674
CheckCheats();
16791675

16801676
if (bJustAttacked)

0 commit comments

Comments
 (0)