Skip to content

Disappearing Boats and duplicate horses #146

Description

@plaidpants

There appears to be an issue with the Save in Settlements feature. If you buy a horse and then leave it outside and then enter a settlement and then save inside the settlement and exit the game the horse will be duplicated when you relaunch the game and exit the settlement. This can also cause a loss of a ship if you happen to save inside a settlement after leaving your boat outside nearby without saving while outside. I fixed this issue in my code by updating this region of code that you modified for this feature. I copy the most recent outdoor npc information from the OUTMONST.SAV file that was last updated when you entered the settlement to the MONSTERS.SAV file which is loaded when you start the game. Not sure if there are additional cases that need attention.

file: U4_Q_N_V.C


struct tNPC temp;

/*C_6F29*/CMD_Quit()
{
...
/*ENABLE_TOWN_SAVE4*/
...
	if (Party._loc != 0 && Party._loc < 0x11)
	{
		/*Force doors to close before saving*/
		C_431D(); C_431D(); C_431D(); C_431D(); C_431D();
		if(Save("TOWNMAP.SAV", sizeof(struct t_500), &D_8742) == -1)
			exit(3);
		// Update the outdoor map save to the latest which was saved when we entered
		if(Load("OUTMONST.SAV", sizeof(struct tNPC), &temp) == -1)
			exit(3);
		if(Save("MONSTERS.SAV", sizeof(struct tNPC), &temp) == -1)
			exit(3);
		return 0;
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions