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

Weapons disappear in multiplayer when player lags out #238

Open
chino opened this issue Jan 8, 2013 · 0 comments
Open

Weapons disappear in multiplayer when player lags out #238

chino opened this issue Jan 8, 2013 · 0 comments

Comments

@chino
Copy link
Member

chino commented Jan 8, 2013

The reason this happens is because each player really manages their pickup list locally. Forsaken is a highly trust based game there is no central authority checking things to verify people don't cheat.

Everyone expects that if you collect a pickup they can simply remove it from their queue's and you will notify when they can add it back.

I believe the best solution here would be to have the host track which weapons every player picks up and if that player leaves then send INIT PICKUP messages to everyone so they add it back to their queue.

Here is some debug output showing someone picking up weapons:

1339464761.850 net_msg: MSG_KILLPICKUP
1339464761.850 pickups: Killed 'Suss-Gun Ammo' Owner 'deadly', ID 16
1339464761.850 pickups: Killed 'Suss-Gun Ammo' from slot 19, Owner 'deadly', ID 16

1339464774.320 net_msg: MSG_KILLPICKUP
1339464774.320 pickups: Killed 'Trojax' Owner '', ID 13
1339464774.320 pickups: Killed 'Trojax' from slot 16, No Owner, ID 13

Ammo and power pods are also generated locally by any player that determines it's required and that player will update everyone else to also create them:

1339464757.976 pickups: Initialised 'General Ammo' in slot 17. Owner 'deadly', ID 15
1339464757.976 net_msg: MSG_VERYSHORTDROPPICKUP

1339464757.977 pickups: Initialised 'Suss-Gun Ammo' in slot 19. Owner 'deadly', ID 
161339464757.977 net_msg: MSG_VERYSHORTDROPPICKUP

1339464766.067 pickups: Initialised 'Power Pod' in slot 2. Owner 'deadly', ID 17
1339464766.067 net_msg: MSG_VERYSHORTDROPPICKUP

1339464778.537 pickups: Initialised 'Power Pod' in slot 12. Owner 'deadly', ID 18
1339464778.537 net_msg: MSG_VERYSHORTDROPPICKUP

Here is an example of picking up a scatter and then shooting it:

1339465358.931 net_msg: MSG_KILLPICKUP
1339465358.931 pickups: Killed 'Scatter Missile' Owner '', ID 14
1339465358.931 pickups: Killed 'Scatter Missile' from slot 18, No Owner, ID 14
1339465363.153 net_msg: MSG_VERYSHORTDROPPICKUP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant