alexbatalov/fallout2-ce

New Game Starts with Poisoned Status

cambragol opened this issue · 2 comments

A new game can be started with a player having 'poisoned' status

This is occurring in Fallout: Sonora

This is easy to reproduce.

  1. Load a game where a player saved while having a poisoned status.
  2. Then exit the game to Main Menu
  3. Then start a new game
  4. Choose a premade character and start game.
  5. New game character will have 'poisoned' status.

This occurs with 'Radiated' status too.

Injuries don't carry over.

So, could this be solved like this?:

if (gCharacterEditorIsCreationMode) {
maxHp = critterGetStat(gDude, STAT_MAXIMUM_HIT_POINTS);
currHp = maxHp;
gDude->data.critter.poison = 0;
gDude->data.critter.radiation = 0;

} else {
maxHp = critterGetStat(gDude, STAT_MAXIMUM_HIT_POINTS);
currHp = critterGetHitPoints(gDude);
}