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

Update player-vehicle.pwn #587

Closed
wants to merge 1 commit into from
Closed

Update player-vehicle.pwn #587

wants to merge 1 commit into from

Conversation

kolor4do
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented May 19, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/southclaws/scavenge-survive/7N6wi5mf6HkjJBThAstmXLL7Kaqi
✅ Preview: https://scavenge-survive-git-fork-nicolasmenegoni-patch-1-southclaws.vercel.app

@Southclaws
Copy link
Owner

Could you describe what this change fixes please? Thanks!

@kolor4do
Copy link
Contributor Author

kolor4do commented May 20, 2021

Could you describe what this change fixes please? Thanks!

If you save a vehicle and another player (who has no vehicle) enters it, the vehicle will be doubled after restart.

Not only that, sometimes someone's vehicle disappeared mysteriously after restart. I believe that this way he will be saved correctly. At least that's what I tested.

if(pveh_PlayerVehicle[playerid] != INVALID_VEHICLE_ID)
{
// Player owns a vehicle
dbg("player-vehicle", 1, "[_UpdatePlayerVehicle] Player in context already owns vehicle %s (%d) swapping owners", GetVehicleUUID(pveh_PlayerVehicle[playerid]), pveh_PlayerVehicle[playerid]);
Copy link
Owner

Choose a reason for hiding this comment

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

Ownership swapping was done to allow members of the same team to drive each other's vehicles, for example if you're in a base and moving vehicles around. I think removing this feature will result in unexpected vehicle loss.

@kolor4do kolor4do closed this Nov 23, 2021
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.

2 participants