multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.4k stars 435 forks source link

Key press delay for toggling the sirens depends on FPS limit #505

Open Timic3 opened 6 years ago

Timic3 commented 6 years ago

Describe the bug To toggle sirens for a specific vehicle, you need to press horn key in a quick order. How quick depends on the FPS limit, which isn't really ideal.

To Reproduce

  1. Set FPS limit to 100
  2. Toggle sirens using horn key - it's very unlikely that you will succeed
  3. Try with 25 - it will be easier

Expected behavior The delay between key presses should be same as on 25 FPS limit (I believe the game is supposed to run on 25 FPS).

Screenshots N/A

MTA Client (please complete the following information): Latest (1.5.6).

MTA Server (please complete the following information): Latest (1.5.6).

Additional context N/A

PlatinMTA commented 5 years ago

I think this is obvious but I will say it anyway, this probably happens because the game checks how many frames did you keep pressed the horn button, if it's more than X ammount then the sirens turn on, else you just press the horn.

This can be work arround if you use setVehicleSirensOn.

patrikjuvonen commented 1 year ago

0x5002C0 would seem to be responsible for this.

Needs a frame rate fix (https://github.com/multitheftauto/mtasa-blue/blob/master/Client/multiplayer_sa/CMultiplayerSA_FrameRateFixes.cpp).

Added to framerate fixes project.