Posts: 6,609
Threads: 788
Joined: Dec 2006
09-04-2009, 12:26 AM
(This post was last modified: 09-04-2009, 12:37 AM by Jay)
The SaveInfo system has been a promised feature since 2.90's release, but due to a minor bug was never ever added, despite the amount of complaints and requests for it. Basically it handles the saving of players data after they reconnect to the server. A list of data it saves:
- The last vehicle the player was driving
- The players full position, including facing angle (If in minigame, position player signed up from)
- Interiors
- Skin
- Money
- Ramp type
- Gamble permit
- VAllowed
- Gang
- If applicable, Killtime kills
- Wanted level
- Health and Armour
- Spawn weapons, and other weapons
- Spawn armour
- Times punched on the ship
- Score
- World
- Alcohol consumed
If any of you have any other ideas of what it should save, feel free to comment. I want to decrease the inconvenience of crashes as much as possible. I'm aiming to save everything which largely effects game play.
This systems internal structure has been rewritten, and needs testing [color=red][u]excessively.
For the ease of testing purposes, you can go ingame and type /saveinfo to save your data, and /loadinfo to load it. This does the same process as disconnecting and reconnecting.
Please provide feedback in this topic. Even if you just reply with "it works fine", we'll know that you have at least tested it. Preferably, test it with more than one person.
|
Posts: 1,036
Threads: 118
Joined: Aug 2006
Did you include everything from 2.90 in that list? I miss properties, but they're already saved at the moment. From what we've tested, it works amazingly! I can't think of any more stuff that needs to be saved, but I'll post again if something pops up.
|
Posts: 6,609
Threads: 788
Joined: Dec 2006
Thanks for the feedback.
The Properties have saved since 2.8x - they use a separate handler
|
Posts: 4,381
Threads: 319
Joined: Aug 2006
I'll see if I can test some stuff tonight, hopefully some spare time.
For example, what happens if I connect with 2 PC's from 1 IP, and both timeout/quit, is the player data saved and restored for the correct player.
Or what happens if I time out/quit, and change the nickname, or maybe even connect from the other PC with a different nick.
Can we confuse the SaveInfo?
I'm sure the SaveInfo handler works, but without testing this weird cases, you don't know if it really does what it has to do
|
Posts: 7,281
Threads: 324
Joined: May 2007
I'll test this a bit tonight
|
Posts: 4,381
Threads: 319
Joined: Aug 2006
Some things I noticed:
1: Health: restored to 100%. (Occurred 1 time, 1 player)
2: Armour: I didn't buy it, but somehow both players had armour, and I'm not using admin hax. (Occurred 1 time, 2 players)
3: Hidden packages, pick one, disconnect, reconnect, and it's back.
4: Vehicle "jacked" while being disconnected. You spawn into the vehicle, the other player is trowed out. And next to this, you are teleported to the current vehicle location, which could be somewhere else. Maybe we could "fetch" some other vehicle if the original vehicle moved?
5: Happened once: I'm sure I did /saveinfo before disconnecting, and after reconnecting and /loadinfo I got the skin and location from 2 sessions ago (Totally different position, other skin, but not the vehicle I used in that session, probably respawned after a while, I think this session was more then 5 minutes ago)
6: Interior: Disconnecting from within an interior, location + angle are fine. Weapon still visible (Not "saved" like normally when entering Interiors)
7: Interior: Wrong exit location. Entered the 24/7 @ the strip, and after reconnecting the exit was @ Whetstone. Some "last known exterior position" should be saved if possible?
5: When reconnecting you reveice 2500 dollar. Afaik it isn't added to your old money. Probably related to the text below.
And I guess the final version is skipping the skin selection screen? Since the current debug version uses commands, after you selected your skin?
|
Posts: 6,609
Threads: 788
Joined: Dec 2006
(09-10-2009, 04:35 PM)Sander link Wrote: 1: Health: restored to 100%. (Occurred 1 time, 1 player) And your health wasn't 100% before?
(09-10-2009, 04:35 PM)Sander link Wrote: 2: Armour: I didn't buy it, but somehow both players had armour, and I'm not using admin hax. (Occurred 1 time, 2 players)
Was this spawn armour, or just armour that "restored" after you reconnected?
(09-10-2009, 04:35 PM)Sander link Wrote: 3: Hidden packages, pick one, disconnect, reconnect, and it's back. Unfortunately, since pickups are not handled on a per player basis we can't do anything about this. The hidden package handler may have to be disabled all together due to a SA:MP bug, it's still being looked into though.
(09-10-2009, 04:35 PM)Sander link Wrote: 4: Vehicle "jacked" while being disconnected. You spawn into the vehicle, the other player is trowed out. And next to this, you are teleported to the current vehicle location, which could be somewhere else. Maybe we could "fetch" some other vehicle if the original vehicle moved?
When a player disconnects it locks the vehicle. However, the locking functions have not been updated to SA:MP 0.3, which is why this occurs. When a player get's warped back into their vehicle, it restores the position of it were it was when they left. The reason it didn't occur this time I'm presuming is because someone was driving it.
(09-10-2009, 04:35 PM)Sander link Wrote: 5: Happened once: I'm sure I did /saveinfo before disconnecting, and after reconnecting and /loadinfo I got the skin and location from 2 sessions ago (Totally different position, other skin, but not the vehicle I used in that session, probably respawned after a while, I think this session was more then 5 minutes ago)
We've tested this SaveInfo handler quite excessively and haven't noticed any issues like this. I'll see if I can reproduce it again later. Do note though, the saveinfo system won't include commands and will work a completely different way. You may have typed /saveinfo twice which would cause some strange issues and conflicts. These commands are only in for the ease of testing.
(09-10-2009, 04:35 PM)Sander link Wrote: 6: Interior: Disconnecting from within an interior, location + angle are fine. Weapon still visible (Not "saved" like normally when entering Interiors) The Weapon handler was disabled in LVP 2.90.35
(09-10-2009, 04:35 PM)Sander link Wrote: 7: Interior: Wrong exit location. Entered the 24/7 @ the strip, and after reconnecting the exit was @ Whetstone. Some "last known exterior position" should be saved if possible? This is a SA:MP bug.
(09-10-2009, 04:35 PM)Sander link Wrote: 5: When reconnecting you reveice 2500 dollar. Afaik it isn't added to your old money. Probably related to the text below. If you reconnect you get the exact amount you had before you disconnected with /saveinfo. It doesn't give you an extra $2500 as normal.
(09-10-2009, 04:35 PM)Sander link Wrote: And I guess the final version is skipping the skin selection screen? Since the current debug version uses commands, after you selected your skin? The players data will load when they /login. It won't have an effect on the class selection, it all depends on whether the player has a char saved or not.
Thanks
|
Posts: 4,381
Threads: 319
Joined: Aug 2006
(09-10-2009, 06:02 PM)Jay link Wrote: And your health wasn't 100% before? It was like 90-ish, I'm 100% sure that it wasn't 100%
Quote:Was this spawn armour, or just armour that "restored" after you reconnected?
Neither of them. I didn't buy armour, neither did I use a pickup. But somehow it happened only once, but strangly at both computers.
Quote:Unfortunately, since pickups are not handled on a per player basis we can't do anything about this. The hidden package handler may have to be disabled all together due to a SA:MP bug, it's still being looked into though.
Meh, okay
Quote:When a player disconnects it locks the vehicle. However, the locking functions have not been updated to SA:MP 0.3, which is why this occurs. When a player get's warped back into their vehicle, it restores the position of it were it was when they left. The reason it didn't occur this time I'm presuming is because someone was driving it.
Well, it wasn't locked, so that could be the reason  I must add, it seemed to be locked for ~10 seconds, till my other computer timed out. (I killed GTA to test stuff) After the timeout I could enter the vehicle.
If the vehicle is locked, the problem with the (possible) wrong position wouldn't even exist. So when locking works, I'll retest.
Quote:We've tested this SaveInfo handler quite excessively and haven't noticed any issues like this. I'll see if I can reproduce it again later. Do note though, the saveinfo system won't include commands and will work a completely different way. You may have typed /saveinfo twice which would cause some strange issues and conflicts. These commands are only in for the ease of testing.
I know that it's debug with commands for now  Anyway, don't waste to much time at reproducing this, it just happens if it happens, and if it doesn't happen anymore, it was an once in a lifetime bug
Quote:The Weapon handler was disabled in LVP 2.90.35
Are you sure? Because I'm 100% sure that I entered the 24/7, and it said something like: Your weapons are saved now, and are restored when you are outside.. or w/e it was.
Aka I didn't have weapons inside, untill I reconnected, I had a weapon. Dunno if I could do damage tho, probably not
Quote:This is a SA:MP bug.
And it isn't possible to track "interior changes" so we can save the last known outside position? Since that could fix the problem.
Quote:If you reconnect you get the exact amount you had before you disconnected with /saveinfo. It doesn't give you an extra $2500 as normal.
I guess it's because you spawn first, and then use /loadinfo. Could be ignored
Quote:The players data will load when they /login. It won't have an effect on the class selection, it all depends on whether the player has a char saved or not.
To be clear:
In this debug version the player always start with the skin selection, and after the player spawns, he can use /loadinfo.
In the final version of the SaveInfo handler, you will spawn directly ingame (If you crashed/quit, w/e) with the last used skin?
/login isn't needed after a crash, or is that changed in this version, even after a reconnect?
|
Posts: 6,609
Threads: 788
Joined: Dec 2006
(09-10-2009, 06:28 PM)Sander link Wrote: It was like 90-ish, I'm 100% sure that it wasn't 100% 
Neither of them. I didn't buy armour, neither did I use a pickup. But somehow it happened only once, but strangly at both computers.
Will be looked into, thanks.
(09-10-2009, 06:28 PM)Sander link Wrote: I know that it's debug with commands for now Anyway, don't waste to much time at reproducing this, it just happens if it happens, and if it doesn't happen anymore, it was an once in a lifetime bug  Well I need to give it some attention, after all if this is a bug and was easily reproduceable, it wouldn't be too good on the main server since this new feature will probably be used the most.
(09-10-2009, 06:28 PM)Sander link Wrote: Are you sure? Because I'm 100% sure that I entered the 24/7, and it said something like: Your weapons are saved now, and are restored when you are outside.. or w/e it was. I'm not actually sure how up to date the branch is, the version you played might not contain the latest changes to 2.90. But it has definitely been disabled. I'll update the branch tomorrow.
(09-10-2009, 06:28 PM)Sander link Wrote: And it isn't possible to track "interior changes" so we can save the last known outside position? Since that could fix the problem.
Well yes, but storing every players position everytime they enter an interior isn't really worth it, for the sake of the player /taxi'ing or w/e. There's not really much point in saving interiors because of this problem tbh. I'll have a think about it, there might be another way around it.
(09-10-2009, 06:28 PM)Sander link Wrote: To be clear:
In this debug version the player always start with the skin selection, and after the player spawns, he can use /loadinfo.
In the final version of the SaveInfo handler, you will spawn directly ingame (If you crashed/quit, w/e) with the last used skin?
/login isn't needed after a crash, or is that changed in this version, even after a reconnect?
Well after a crash, despite not needing to use /login, it still logs the player in  . It depends with skins. If the player has a char saved using /savechar, the user account stuff handles it. Otherwise, it will make the player choose one from the class selection, and then when they spawn, will load the SaveInfo one. That needs looking into, well thought out  .
|
|