Mikeeeyy

[CLOSED] [Obsolete] [FIX] Losing a mag everytime you relog

25 posts in this topic

The dreaded losing magazines bug is fixed?

No longer needed, implemented into 0.9.41

I was on my local test server and I gave myself a gun with 1 loaded magazine, and 2 reserve. If I relogged I would lose a mag everytime, guaranteed. This fix fixed that issue for me, I'm not sure if this will fix all the other magazine related issues. Please just be aware that this hasn't been thoroughly tested, only when relogging.

Get a copy of ExileServer_object_player_database_load and put it in your overwrites folder/config thing... then open it up.

Find

_uniform = _data select 30;

and start selecting, go down while selecting until you find

_primaryWeapon = _data select 26;

Dont select this line, just go up to it. If you're using an unmodified ExileServer_object_player_database_load then it will be line 81 to 143.

Cut what you have selected then find

_assignedItems = _data select 14;

Paste what you cut above this line.

You're done.

Here's the ExileServer_object_player_database_load.sqf file with the fix applied for those who struggle with instructions :D http://pastebin.com/raw/neShULvf

Edited by Mikeeeyy
  • Like 12

Share this post


Link to post
Share on other sites

Please be aware that this problem does not happen on almost empty or local servers. The reason why this happens is the following:

The server creates a unit, adds all the gear and sends it to the client. The client then takes control of this unit. The server code runs in unscheduled environment and thus very fast. Actually too fast, which is the problem. The unit on the server has all the gear, but the client does not notice it. In other words: We do a addXXX server side and it just doesnt do anything. If we run the mentioned code in scheduled environment, it will result in timeouts in large servers.

Do not say that the above does not work. But I think the circumstances where this has been tested are not optimal.

Share this post


Link to post
Share on other sites
Advertisement
5 minutes ago, Eichi said:

Please be aware that this problem does not happen on almost empty or local servers. The reason why this happens is the following:

The server creates a unit, adds all the gear and sends it to the client. The client then takes control of this unit. The server code runs in unscheduled environment and thus very fast. Actually too fast, which is the problem. The unit on the server has all the gear, but the client does not notice it. In other words: We do a addXXX server side and it just doesnt do anything. If we run the mentioned code in scheduled environment, it will result in timeouts in large servers.

Do not say that the above does not work. But I think the circumstances where this has been tested are not optimal.

I'm afraid that's inaccurate, this happens 100% of the time on my local test server. I lose a mag guaranteed every relog.

  • Like 1

Share this post


Link to post
Share on other sites

Awww, yes. The reason for this is the addWeaponGlobal. If you execute it, Arma will take one magazine out of your equipment and put it into the gun if there is one. Then later addWeaponItem will overwrite that and thus you have lost one. Sorry, my bad.

I was thinking this should solve the loss of uniforms, vests and items in general.

The above code is actually something that we have done internally too.

So thumbs up for this!

  • Like 2

Share this post


Link to post
Share on other sites
2 minutes ago, Eichi said:

Awww, yes. The reason for this is the addWeaponGlobal. If you execute it, Arma will take one magazine out of your equipment and put it into the gun if there is one. Then later addWeaponItem will overwrite that and thus you have lost one. Sorry, my bad.

I was thinking this should solve the loss of uniforms, vests and items in general.

The above code is actually something that we have done internally too.

So thumbs up for this!

Great news and great work!

Share this post


Link to post
Share on other sites
2 hours ago, Eichi said:

Awww, yes. The reason for this is the addWeaponGlobal. If you execute it, Arma will take one magazine out of your equipment and put it into the gun if there is one. Then later addWeaponItem will overwrite that and thus you have lost one. Sorry, my bad.

I was thinking this should solve the loss of uniforms, vests and items in general.

The above code is actually something that we have done internally too.

So thumbs up for this!

So you have internally fixed it, but won't share with the community before the next patch even when players are driving us mad about this issue.

Sharing is caring! :)

  • Like 5

Share this post


Link to post
Share on other sites

But then why release it as another minor update again, and have everyone complain that there are 'loads of updates in quick succession'?

The above is easy enough to implement :)

Share this post


Link to post
Share on other sites
Advertisement
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.