Skip to content

Weapons disappear in multiplayer when player lags out #238

@chino

Description

@chino

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions