rigertd / LegacyMUD

A multi-user dungeon engine developed in C++.
Other
0 stars 0 forks source link

Serialized Player data contains incorrect area ID for location #4

Closed rigertd closed 7 years ago

rigertd commented 7 years ago

When the game data is serialized, the spawn_location_id and location_area_id values do not match the actual ID of the area. This results in a freeze when attempting to sign in as an existing user. If you manually edit these values to the correct location, the player is able to sign in normally.

Steps to Reproduce

  1. Check out the saveloadWork branch
  2. Build the unit test project
  3. Run './unittest --gtest_filter=Data*'
  4. Copy the 'default_game_data.txt' file to engine/engineDemo
  5. Compile the demo program in engine/engineDemo
  6. Run './demo 12345 default_game_data.txt'
  7. Telnet into the server and create an admin account
  8. Enter edit mode and type 'save test.txt'
  9. Terminate the server with ctrl+c
  10. Start a new instance with './demo 12345 test.txt'
  11. Attempt to sign in with the user created in step 7

Expected Behavior The user is able to sign in and enter commands

Actual Behavior The user is able to sign in but cannot enter any text (nothing is echoed back)

keithadkins commented 7 years ago

As soon as I entered step 8, I noticed that the area description "You are surrounded by grey mist..." does not match the item description of the area description listed in the default file. This area description is coming from a hard coded area that hasn't been removed and the starting area is set to this hard coded area, not the area being loaded from disk.

This bug needs to be reassigned to David. Please remove all hard coded objects and link the starting area to the area loaded from disk.

rigertd commented 7 years ago

Once again, please do not close unless an issue is resolved.

I forgot to push my latest changes. Please do a pull and try again. The bug still stands.

rigertd commented 7 years ago

The grey mist was caused by the constructor of GameLogic creating the start area. Currently, the DataManager class does not provide a way of identifying the starting area, so I have no way of telling the GameLogic class which area is the starting area.

I will create a new issue for this and assign it to you.

keithadkins commented 7 years ago

Negative. This is a gamelogic issue. Either assign it to yourself or Rachel.
I will be more than happy to help you come up to speed with this integration, but please demonstrate to me that you have resolved issue #1 and #5 first. Thanks.

rigertd commented 7 years ago

Removing the area that was created in the constructor fixed this issue.