Browse Source

Fixed `CreatePlayer` to now be binary exact!

pull/4/head
Dennis Duda 8 years ago
parent
commit
d45a175064
  1. 42
      Source/player.cpp

42
Source/player.cpp

@ -681,37 +681,37 @@ void __fastcall CreatePlayer(int pnum, char c)
} }
plr[pnum]._pClass = c; plr[pnum]._pClass = c;
char str = StrengthTbl[c]; char val = StrengthTbl[c];
if ( str < 0 ) if ( val < 0 )
{ {
str = 0; val = 0;
} }
plr[pnum]._pStrength = str; plr[pnum]._pStrength = val;
plr[pnum]._pBaseStr = str; plr[pnum]._pBaseStr = val;
char mag = MagicTbl[c]; val = MagicTbl[c];
if ( mag < 0 ) if ( val < 0 )
{ {
mag = 0; val = 0;
} }
plr[pnum]._pMagic = mag; plr[pnum]._pMagic = val;
plr[pnum]._pBaseMag = mag; plr[pnum]._pBaseMag = val;
char dex = DexterityTbl[c]; val = DexterityTbl[c];
if ( dex < 0 ) if ( val < 0 )
{ {
dex = 0; val = 0;
} }
plr[pnum]._pDexterity = dex; plr[pnum]._pDexterity = val;
plr[pnum]._pBaseDex = dex; plr[pnum]._pBaseDex = val;
char vit = VitalityTbl[c]; val = VitalityTbl[c];
if ( vit < 0 ) if ( val < 0 )
{ {
vit = 0; val = 0;
} }
plr[pnum]._pVitality = vit; plr[pnum]._pVitality = val;
plr[pnum]._pBaseVit = vit; plr[pnum]._pBaseVit = val;
plr[pnum]._pStatPts = 0; plr[pnum]._pStatPts = 0;
plr[pnum].pTownWarps = 0; plr[pnum].pTownWarps = 0;
@ -731,7 +731,7 @@ void __fastcall CreatePlayer(int pnum, char c)
plr[pnum]._pBaseToBlk = ToBlkTbl[c]; plr[pnum]._pBaseToBlk = ToBlkTbl[c];
plr[pnum]._pHitPoints = (vit + 10) << 6; plr[pnum]._pHitPoints = (val + 10) << 6;
if ( c == PC_WARRIOR ) if ( c == PC_WARRIOR )
{ {
plr[pnum]._pHitPoints *= 2; plr[pnum]._pHitPoints *= 2;

Loading…
Cancel
Save