git-svn-id: https://svn.eduke32.com/eduke32@1085 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-09-30 17:27:23 +00:00
parent a7539c130f
commit 02e632b5e2
5 changed files with 33 additions and 20 deletions

View file

@ -959,7 +959,7 @@ int getversionfromwebsite(char *buffer) // FIXME: this probably belongs in game
initprintf("update: socket() error in getversionfromwebsite() (%d)\n",errno); initprintf("update: socket() error in getversionfromwebsite() (%d)\n",errno);
return(0); return(0);
} }
initprintf("Connecting to \"http://%s\"\n",host);
if (connect(mysock, (struct sockaddr *)&dest_addr, sizeof(struct sockaddr)) == SOCKET_ERROR) if (connect(mysock, (struct sockaddr *)&dest_addr, sizeof(struct sockaddr)) == SOCKET_ERROR)
{ {
initprintf("update: connect() error in getversionfromwebsite() (%d)\n",errno); initprintf("update: connect() error in getversionfromwebsite() (%d)\n",errno);

View file

@ -9,6 +9,7 @@ DXROOT=../sdk/dx
ALROOT = AL ALROOT = AL
SDLROOT = SDLROOT =
SDLCONFIG = sdl-config
# Engine options # Engine options
SUPERBUILD = 1 SUPERBUILD = 1
@ -189,7 +190,7 @@ endif
ifeq ($(RENDERTYPE),SDL) ifeq ($(RENDERTYPE),SDL)
ifeq (0,$(SDL_FRAMEWORK)) ifeq (0,$(SDL_FRAMEWORK))
OURCFLAGS+= $(subst -Dmain=SDL_main,,$(shell sdl-config --cflags)) OURCFLAGS+= $(subst -Dmain=SDL_main,,$(shell $(SDLCONFIG) --cflags))
else else
OURCFLAGS += -DSDL_FRAMEWORK OURCFLAGS += -DSDL_FRAMEWORK
endif endif

View file

@ -7320,10 +7320,14 @@ static void addgroup(const char *buffer)
CommandGrps = s; CommandGrps = s;
} }
#ifdef _WIN32
#define COPYARG(i) \ #define COPYARG(i) \
Bmemcpy(&testplay_addparam[j], argv[i], lengths[i]); \ Bmemcpy(&testplay_addparam[j], argv[i], lengths[i]); \
j += lengths[i]; \ j += lengths[i]; \
testplay_addparam[j++] = ' '; testplay_addparam[j++] = ' ';
#else
#define COPYARG(i)
#endif
static void checkcommandline(int argc, const char **argv) static void checkcommandline(int argc, const char **argv)
{ {
@ -7334,8 +7338,10 @@ static void checkcommandline(int argc, const char **argv)
{ {
lengths = Bmalloc(argc*sizeof(int)); lengths = Bmalloc(argc*sizeof(int));
for (j=1; j<argc; j++) maxlen += (lengths[j] = Bstrlen(argv[j])); for (j=1; j<argc; j++) maxlen += (lengths[j] = Bstrlen(argv[j]));
#ifdef _WIN32
testplay_addparam = Bmalloc(maxlen+argc); testplay_addparam = Bmalloc(maxlen+argc);
testplay_addparam[0] = 0; testplay_addparam[0] = 0;
#endif
j = 0; j = 0;
while (i < argc) while (i < argc)
@ -7491,6 +7497,7 @@ static void checkcommandline(int argc, const char **argv)
} }
Bfree(lengths); Bfree(lengths);
#ifdef _WIN32
if (j > 0) if (j > 0)
{ {
testplay_addparam[j-1] = 0; testplay_addparam[j-1] = 0;
@ -7498,6 +7505,7 @@ static void checkcommandline(int argc, const char **argv)
} }
else else
Bfree(testplay_addparam); Bfree(testplay_addparam);
#endif
} }
} }
#undef COPYARG #undef COPYARG

View file

@ -10839,9 +10839,9 @@ void app_main(int argc,const char **argv)
if (ud.config.CheckForUpdates == 1) if (ud.config.CheckForUpdates == 1)
{ {
initprintf("Checking for updates...\n");
if (time(NULL) - ud.config.LastUpdateCheck > UPDATEINTERVAL) if (time(NULL) - ud.config.LastUpdateCheck > UPDATEINTERVAL)
{ {
initprintf("Checking for updates...\n");
if (getversionfromwebsite(tempbuf)) if (getversionfromwebsite(tempbuf))
{ {
initprintf("Current version is %d",atol(tempbuf)); initprintf("Current version is %d",atol(tempbuf));

View file

@ -1630,25 +1630,29 @@ static int parse(void)
} }
if (sprite[i].statnum == j) break; if (sprite[i].statnum == j) break;
/* initialize actor pointers when changing to an actor statnum because they usually /* initialize actor data when changing to an actor statnum because there's usually
have garbage left over from being handled as a hard coded object */ garbage left over from being handled as a hard coded object */
hittype[i].lastvx = 0; if (j == 1 || j == 2)
hittype[i].lastvy = 0;
hittype[i].timetosleep = 0;
hittype[i].cgg = 0;
hittype[i].movflag = 0;
hittype[i].tempang = 0;
hittype[i].dispicnum = 0;
T1=T2=T3=T4=T5=T6=T7=T8=T9=0;
hittype[i].flags = 0;
sprite[i].hitag = 0;
if ((j == 1 || j == 2) && actorscrptr[sprite[i].picnum])
{ {
T5 = *(actorscrptr[sprite[i].picnum]+1); hittype[i].lastvx = 0;
T2 = *(actorscrptr[sprite[i].picnum]+2); hittype[i].lastvy = 0;
sprite[i].hitag = *(actorscrptr[sprite[i].picnum]+3); hittype[i].timetosleep = 0;
hittype[i].cgg = 0;
hittype[i].movflag = 0;
hittype[i].tempang = 0;
hittype[i].dispicnum = 0;
T1=T2=T3=T4=T5=T6=T7=T8=T9=0;
hittype[i].flags = 0;
sprite[i].hitag = 0;
// pointers
if (actorscrptr[sprite[i].picnum])
{
T5 = *(actorscrptr[sprite[i].picnum]+1);
T2 = *(actorscrptr[sprite[i].picnum]+2);
sprite[i].hitag = *(actorscrptr[sprite[i].picnum]+3);
}
} }
changespritestat(i,j); changespritestat(i,j);
break; break;