Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep Season opened but disable traffic #36

Closed
wants to merge 1 commit into from
Closed

Keep Season opened but disable traffic #36

wants to merge 1 commit into from

Conversation

Deewarz
Copy link
Contributor

@Deewarz Deewarz commented Jan 10, 2024

Related to #34 and temporary fix #25

This is just a working POC based on Kamzik123 reply.

Next steps:

  • Reverse OpenSeason, CloseSeason and GetCurrentSeasonID methods in order to expose them to scripting API
  • Be sure, when the scripter change the Season, it will not reactivate traffic
  • Do not use Lua but hooks

I can't do better with my limited knowledge of C++ and IDA.
I'll pass the topic on to you.

cc @zpl-zak @Greavesy1899

@Deewarz Deewarz self-assigned this Jan 10, 2024
This was referenced Jan 11, 2024
@Deewarz
Copy link
Contributor Author

Deewarz commented Jan 11, 2024

We can merge this one as is.

Next steps in dedicated tickets:

@Deewarz Deewarz changed the title POC: Keep Season opened but disable traffic Keep Season opened but disable traffic Jan 11, 2024
@Deewarz Deewarz marked this pull request as ready for review January 11, 2024 16:30
@Deewarz Deewarz requested a review from zpl-zak January 11, 2024 16:31
@Segfaultd
Copy link
Member

We should absolutely avoid using any native lua call, it's not reliable and we have barely no control over behavior.

We must reverse these calls instead. I suggest we keep this PR open for tracking, but instead we transform it to reversing task.

Copy link
Member

@zpl-zak zpl-zak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely not an issue but the Lua code here will be executed each time player goes back to the menu (ie. disconnects), but we aim to replace it later anyways, so not an issue, just something to be aware of.

@Deewarz
Copy link
Contributor Author

Deewarz commented Jan 11, 2024

@Segfaultd

I created a dedicated ticket for replacing these calls with native hooks. #42

Do you think it's really annoying to merge this for a V0?

@Segfaultd
Copy link
Member

I can handle the reversing part today and i'll let you do the implementation, ok for you?

@Deewarz Deewarz marked this pull request as draft January 11, 2024 16:41
@Deewarz
Copy link
Contributor Author

Deewarz commented Jan 18, 2024

The objective of this PR was to keep the season open to maintain the radios.
Except the season have no impact on the radios. Only on traffic.

I close the PR.

@Deewarz Deewarz closed this Jan 18, 2024
@Deewarz Deewarz deleted the season branch January 18, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reverse police offenses
3 participants