Skip to content

fix(server/state): update last occupant for given seat index even if was taken - #4084

Open
drakeee wants to merge 1 commit into
citizenfx:masterfrom
drakeee:fix/last-occupant-seat
Open

fix(server/state): update last occupant for given seat index even if was taken#4084
drakeee wants to merge 1 commit into
citizenfx:masterfrom
drakeee:fix/last-occupant-seat

Conversation

@drakeee

@drakeee drakeee commented Jul 26, 2026

Copy link
Copy Markdown

Goal of this PR

There are a lot of seat ejection happening. Cheater able to force out already seated players in given vehicles. The problem is that GetLastPedInVehicleSeat wouldn't return the cheater ped, because there is an if check if the seat is free and won't modify the last occupant array for the vehicle.

How is this PR achieving the goal

Current occupants for the vehicle would be the same, last occupants skip the if check.

This PR applies to the following area(s)

Server

Successfully tested on

Game builds: 3258
Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

@github-actions github-actions Bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid Requires changes before it's considered valid and can be (re)triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant