MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / GetPlayerLastAction

Function GetPlayerLastAction

src/openrct2/network/NetworkBase.cpp:3465–3475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3463 }
3464
3465 int32_t GetPlayerLastAction(uint32_t index, int32_t time)
3466 {
3467 auto& network = GetContext()->GetNetwork();
3468 Guard::IndexInRange(index, network.player_list);
3469
3470 if (time && Platform::GetTicks() > network.player_list[index]->lastActionTime + time)
3471 {
3472 return -999;
3473 }
3474 return network.player_list[index]->lastAction;
3475 }
3476
3477 void SetPlayerLastAction(uint32_t index, GameCommand command)
3478 {

Callers 2

playersScrollPaintMethod · 0.85
onDrawOverviewMethod · 0.85

Calls 3

GetContextFunction · 0.85
IndexInRangeFunction · 0.85
GetTicksFunction · 0.85

Tested by

no test coverage detected