Extract player data

This commit is contained in:
jl777
2019-02-16 09:31:50 -11:00
parent eba3ba86f6
commit 139a7bdfec
3 changed files with 14 additions and 1 deletions

View File

@@ -49,7 +49,11 @@ void init_player(struct rogue_state *rs)
// duplicate rng usage of normal case
obj = new_item();
init_weapon(obj, MACE);
free(obj);
obj = new_item();
init_weapon(obj, BOW);
free(obj);
obj = new_item();
init_weapon(obj, ARROW);
obj->o_count = rnd(15) + 25;
free(obj);

View File

@@ -104,7 +104,9 @@ void rogueiterate(struct rogue_state *rs)
fuse(swander, 0, WANDERTIME, AFTER);
start_daemon(stomach, 0, AFTER);
if ( rs->restoring != 0 )
{
restore_player(rs);
}
playit(rs);
}
@@ -244,7 +246,7 @@ int32_t rogue_replay2(uint8_t *newdata,uint64_t seed,char *keystrokes,int32_t nu
{
rs->P = *player;
rs->restoring = 1;
fprintf(stderr,"restore player packsize.%d\n",rs->P.packsize);
fprintf(stderr,"restore player packsize.%d HP.%d\n",rs->P.packsize,rs->P.hitpoints);
}
uint32_t starttime = (uint32_t)time(NULL);
rogueiterate(rs);