Fixed player base block is zero bug after loading a new game. This value is not saved in single player or multiplayer, so when a character is loaded, the value is always zero. Now when a player is loaded, it is set to the default. See section 2.1.4 in Jarulf's Guide.

This commit is contained in:
Troy Bronzan 2020-02-24 22:02:59 -05:00 committed by Anders Jenbo
commit 8960450560
2 changed files with 4 additions and 0 deletions

View file

@ -357,6 +357,9 @@ void LoadPlayer(int i)
CopyInt(tbuff, &pPlayer->_pStatPts);
CopyInt(tbuff, &pPlayer->_pDamageMod);
CopyInt(tbuff, &pPlayer->_pBaseToBlk);
if (pPlayer->_pBaseToBlk == 0) {
pPlayer->_pBaseToBlk = ToBlkTbl[pPlayer->_pClass];
}
CopyInt(tbuff, &pPlayer->_pHPBase);
CopyInt(tbuff, &pPlayer->_pMaxHPBase);
CopyInt(tbuff, &pPlayer->_pHitPoints);