Use name in game

This commit is contained in:
jl777
2019-02-12 19:11:09 -11:00
parent 13a3898082
commit a12fe67278
2 changed files with 4 additions and 4 deletions

View File

@@ -170,10 +170,10 @@ int32_t rogue_setplayerdata(struct rogue_state *rs,char *gametxidstr)
if ( strcmp(statusstr,"registered") == 0 )
{
retval = 0;
if ( (pname= jstr(item,"pname")) != 0 && strlen(pname) < MAXSTR-1 )
strcpy(whoami,pname);
if ( (item= jobj(item,"player")) != 0 && (datastr= jstr(item,"data")) != 0 )
{
if ( (pname= jstr(item,"pname")) != 0 && strlen(pname) < MAXSTR-1 )
strcpy(whoami,pname);
decode_hex((uint8_t *)&rs->P,(int32_t)strlen(datastr)/2,datastr);
//fprintf(stderr,"set datastr[%d]\n",(int32_t)strlen(datastr));
rs->restoring = 1;