openmultiplayer / openmultiplayer/open.mp

SetPlayerTime bug

Open
#631 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue
Dominant language
C++
Stars
641
Forks
208
PR merge metrics
No merged PRs in 30d

Description

The server sets the time every second with SetPlayerTime, but after a while the weather starts to "Blink". When checking the time, the following was determined:

GetPlayerTime(21:0) - SetPlayerTime(21:0)
GetPlayerTime(21:0) - SetPlayerTime(21:1)
GetPlayerTime(21:1) - SetPlayerTime(21:2)
GetPlayerTime(21:2) - SetPlayerTime(21:3)
GetPlayerTime(21:3) - SetPlayerTime(21:4)
GetPlayerTime(21:0) - SetPlayerTime(21:5)
GetPlayerTime(21:5) - SetPlayerTime(21:6)
GetPlayerTime(21:6) - SetPlayerTime(21:7)
GetPlayerTime(21:7) - SetPlayerTime(21:8)
GetPlayerTime(21:8) - SetPlayerTime(21:9)
GetPlayerTime(21:0) - SetPlayerTime(21:10)
GetPlayerTime(21:10) - SetPlayerTime(21:11)
GetPlayerTime(21:11) - SetPlayerTime(21:12)
GetPlayerTime(21:12) - SetPlayerTime(21:13)
GetPlayerTime(21:13) - SetPlayerTime(21:14)
GetPlayerTime(21:0) - SetPlayerTime(21:15)
GetPlayerTime(21:15) - SetPlayerTime(21:16)
GetPlayerTime(21:16) - SetPlayerTime(21:17)
GetPlayerTime(21:17) - SetPlayerTime(21:18)
GetPlayerTime(21:18) - SetPlayerTime(21:19)
GetPlayerTime(21:0) - SetPlayerTime(21:20)
GetPlayerTime(21:20) - SetPlayerTime(21:21)
GetPlayerTime(21:21) - SetPlayerTime(21:22)

GetPlayerTime resets the number of game minutes every fifth second.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with a server that calls SetPlayerTime every second, comparing its result with GetPlayerTime and observing the weather. Trace the SetPlayerTime and GetPlayerTime entry points and identify why the reported game minutes reset every fifth second; done means time remains consistent and the weather no longer blinks.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.