Update with simon, and drawing SPRK on walls crash fix.
This commit is contained in:
parent
c1ca8bae29
commit
fea297b2ac
@ -7,8 +7,8 @@
|
|||||||
#define PATH_SEP "/"
|
#define PATH_SEP "/"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SAVE_VERSION 45
|
#define SAVE_VERSION 46
|
||||||
#define MINOR_VERSION 2
|
#define MINOR_VERSION 0
|
||||||
#define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter.
|
#define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter.
|
||||||
//#define BETA
|
//#define BETA
|
||||||
|
|
||||||
|
@ -867,11 +867,19 @@ void login_ui(pixel *vid_buf)
|
|||||||
if (res && !strncmp(res, "OK ", 3))
|
if (res && !strncmp(res, "OK ", 3))
|
||||||
{
|
{
|
||||||
char *s_id,*u_e,*nres;
|
char *s_id,*u_e,*nres;
|
||||||
|
printf("\n{%s}\n", res);
|
||||||
s_id = strchr(res+3, ' ');
|
s_id = strchr(res+3, ' ');
|
||||||
|
if (!s_id)
|
||||||
|
goto fail;
|
||||||
*(s_id++) = 0;
|
*(s_id++) = 0;
|
||||||
|
|
||||||
u_e = strchr(s_id, ' ');
|
u_e = strchr(s_id, ' ');
|
||||||
*(u_e++) = 0;
|
if (!u_e){
|
||||||
|
u_e = malloc(1);
|
||||||
|
memset(u_e, 0, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
*(u_e++) = 0;
|
||||||
|
|
||||||
strcpy(svf_user_id, res+3);
|
strcpy(svf_user_id, res+3);
|
||||||
strcpy(svf_session_id, s_id);
|
strcpy(svf_session_id, s_id);
|
||||||
|
@ -577,7 +577,7 @@ inline int create_part(int p, int x, int y, int t)
|
|||||||
|
|
||||||
if (t==PT_SPRK)
|
if (t==PT_SPRK)
|
||||||
{
|
{
|
||||||
if (!((pmap[y][x]&0xFF)==PT_INST||(ptypes[pmap[y][x]&0xFF].properties&PROP_CONDUCTS)))
|
if ((pmap[y][x]>>8)>=NPART || !((pmap[y][x]&0xFF)==PT_INST||(ptypes[pmap[y][x]&0xFF].properties&PROP_CONDUCTS)))
|
||||||
return -1;
|
return -1;
|
||||||
if (parts[pmap[y][x]>>8].life!=0)
|
if (parts[pmap[y][x]>>8].life!=0)
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user