mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 09:21:36 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@421 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
5c4f5b3744
commit
a236be837c
3 changed files with 42 additions and 35 deletions
|
@ -277,6 +277,9 @@ int addsearchpath(const char *p)
|
|||
|
||||
searchpathhead = srch;
|
||||
if (srch->pathlen > maxsearchpathlen) maxsearchpathlen = srch->pathlen;
|
||||
|
||||
Bcorrectfilename(srch->path,0);
|
||||
|
||||
initprintf("addsearchpath(): Added %s\n", srch->path);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -7429,7 +7429,7 @@ FOUNDCHEAT:
|
|||
if (VOLUMEALL)
|
||||
{
|
||||
volnume = cheatbuf[i] - '0';
|
||||
levnume = (cheatbuf[i+1] - '0')*(MAXLEVELS-1)+(cheatbuf[i+2]-'0');
|
||||
levnume = (cheatbuf[i+1] - '0')*10+(cheatbuf[i+2]-'0');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -9646,6 +9646,7 @@ int load_script(char *szScript)
|
|||
void app_main(int argc,char **argv)
|
||||
{
|
||||
int i, j;
|
||||
char cwd[BMAX_PATH];
|
||||
#ifdef RENDERTYPEWIN
|
||||
if (win_checkinstance())
|
||||
{
|
||||
|
@ -9681,6 +9682,9 @@ void app_main(int argc,char **argv)
|
|||
|
||||
checkcommandline(argc,argv);
|
||||
|
||||
if (getcwd(cwd,BMAX_PATH)) addsearchpath(cwd);
|
||||
|
||||
if (CommandPaths)
|
||||
{
|
||||
struct strllist *s;
|
||||
while (CommandPaths)
|
||||
|
@ -9700,11 +9704,9 @@ void app_main(int argc,char **argv)
|
|||
if (usecwd == 0)
|
||||
#endif
|
||||
{
|
||||
char cwd[BMAX_PATH];
|
||||
char *homedir;
|
||||
int asperr;
|
||||
|
||||
if (getcwd(cwd,BMAX_PATH)) addsearchpath(cwd);
|
||||
if ((homedir = Bgethomedir()))
|
||||
{
|
||||
Bsnprintf(cwd,sizeof(cwd),"%s/"
|
||||
|
@ -9774,10 +9776,10 @@ void app_main(int argc,char **argv)
|
|||
if (atol(tempbuf) > BUILDDATE)
|
||||
{
|
||||
if (wm_ynbox("EDuke32","A new version of EDuke32 is available. "
|
||||
"Browse to http://www.eduke32.com now?"))
|
||||
"Browse to http://eduke32.sourceforge.net now?"))
|
||||
{
|
||||
SHELLEXECUTEINFOA sinfo;
|
||||
char *p = "http://www.eduke32.com";
|
||||
char *p = "http://eduke32.sourceforge.net";
|
||||
|
||||
Bmemset(&sinfo, 0, sizeof(sinfo));
|
||||
sinfo.cbSize = sizeof(sinfo);
|
||||
|
@ -9788,7 +9790,7 @@ void app_main(int argc,char **argv)
|
|||
sinfo.lpClass = "http";
|
||||
|
||||
if(!ShellExecuteExA(&sinfo))
|
||||
initprintf("Error launching browser!\n");
|
||||
initprintf("update: error launching browser!\n");
|
||||
CONFIG_SetupMouse();
|
||||
CONFIG_SetupJoystick();
|
||||
CONFIG_WriteSetup();
|
||||
|
|
|
@ -5093,69 +5093,66 @@ int getspritescore(long snum, long dapicnum)
|
|||
|
||||
case FREEZEAMMO__STATIC:
|
||||
if (ps[snum].ammo_amount[FREEZE_WEAPON] < max_ammo_amount[FREEZE_WEAPON]) return(10);
|
||||
return(0);
|
||||
return(1);
|
||||
case AMMO__STATIC:
|
||||
if (ps[snum].ammo_amount[PISTOL_WEAPON] < max_ammo_amount[PISTOL_WEAPON]) return(10);
|
||||
return(0);
|
||||
return(1);
|
||||
case BATTERYAMMO__STATIC:
|
||||
if (ps[snum].ammo_amount[CHAINGUN_WEAPON] < max_ammo_amount[CHAINGUN_WEAPON]) return(20);
|
||||
return(0);
|
||||
return(1);
|
||||
case DEVISTATORAMMO__STATIC:
|
||||
if (ps[snum].ammo_amount[DEVISTATOR_WEAPON] < max_ammo_amount[DEVISTATOR_WEAPON]) return(25);
|
||||
return(0);
|
||||
return(1);
|
||||
case RPGAMMO__STATIC:
|
||||
if (ps[snum].ammo_amount[RPG_WEAPON] < max_ammo_amount[RPG_WEAPON]) return(50);
|
||||
return(0);
|
||||
return(1);
|
||||
case CRYSTALAMMO__STATIC:
|
||||
if (ps[snum].ammo_amount[SHRINKER_WEAPON] < max_ammo_amount[SHRINKER_WEAPON]) return(10);
|
||||
return(0);
|
||||
return(1);
|
||||
case HBOMBAMMO__STATIC:
|
||||
if (ps[snum].ammo_amount[HANDBOMB_WEAPON] < max_ammo_amount[HANDBOMB_WEAPON]) return(30);
|
||||
return(0);
|
||||
return(1);
|
||||
case SHOTGUNAMMO__STATIC:
|
||||
if (ps[snum].ammo_amount[SHOTGUN_WEAPON] < max_ammo_amount[SHOTGUN_WEAPON]) return(25);
|
||||
return(0);
|
||||
return(1);
|
||||
|
||||
case COLA__STATIC:
|
||||
if (sprite[ps[snum].i].extra < 100) return(10);
|
||||
return(0);
|
||||
return(1);
|
||||
case SIXPAK__STATIC:
|
||||
if (sprite[ps[snum].i].extra < 100) return(30);
|
||||
return(0);
|
||||
return(1);
|
||||
case FIRSTAID__STATIC:
|
||||
if (ps[snum].firstaid_amount < 100) return(100);
|
||||
return(0);
|
||||
return(1);
|
||||
case SHIELD__STATIC:
|
||||
if (ps[snum].shield_amount < 100) return(50);
|
||||
return(0);
|
||||
return(1);
|
||||
case STEROIDS__STATIC:
|
||||
if (ps[snum].steroids_amount < 400) return(30);
|
||||
return(0);
|
||||
return(1);
|
||||
case AIRTANK__STATIC:
|
||||
if (ps[snum].scuba_amount < 6400) return(30);
|
||||
return(0);
|
||||
return(1);
|
||||
case JETPACK__STATIC:
|
||||
if (ps[snum].jetpack_amount < 1600) return(100);
|
||||
return(0);
|
||||
return(1);
|
||||
case HEATSENSOR__STATIC:
|
||||
if (ps[snum].heat_amount < 1200) return(5);
|
||||
return(0);
|
||||
return(1);
|
||||
case ACCESSCARD__STATIC:
|
||||
return(1);
|
||||
case BOOTS__STATIC:
|
||||
if (ps[snum].boot_amount < 200) return(15);
|
||||
return(0);
|
||||
return(1);
|
||||
case ATOMICHEALTH__STATIC:
|
||||
if (sprite[ps[snum].i].extra < max_player_health<<1) return(50);
|
||||
return(0);
|
||||
return(1);
|
||||
case HOLODUKE__STATIC:
|
||||
if (ps[snum].holoduke_amount < 2400) return(5);
|
||||
return(0);
|
||||
|
||||
case TOUCHPLATE__STATIC:
|
||||
return(5);
|
||||
return(1);
|
||||
case MUSICANDSFX__STATIC:
|
||||
return(10);
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
@ -5518,11 +5515,11 @@ void computergetinput(long snum, input *syn)
|
|||
|
||||
if ((goalsect[snum] < 0) || (goalwall[snum] < 0))
|
||||
{
|
||||
if (goalsprite[snum] < 0)
|
||||
if (goalsprite[snum] < 0 || !cansee(x1,y1,z1-(32<<8),damysect,sprite[goalsprite[snum]].x,sprite[goalsprite[snum]].y,sprite[goalsprite[snum]].z-(4<<8),i))
|
||||
{
|
||||
int bestsprite = -1, spritescore = 0;
|
||||
|
||||
for (k=0;k<4;k++)
|
||||
for (k=0;k<16;k++)
|
||||
{
|
||||
i = (rand()%numsectors);
|
||||
for (j=headspritesect[i];j>=0;j=nextspritesect[j])
|
||||
|
@ -5540,8 +5537,7 @@ void computergetinput(long snum, input *syn)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (bestsprite != -1 && (!cansee(x1,y1,z1-(32<<8),damysect,sprite[goalsprite[snum]].x,sprite[goalsprite[snum]].y,sprite[goalsprite[snum]].z-(4<<8),i) ||
|
||||
spritescore > goalspritescore[snum]))
|
||||
if (bestsprite != -1 && (goalsprite[snum] < 0 || spritescore > goalspritescore[snum]))
|
||||
{
|
||||
goalx[snum] = sprite[bestsprite].x;
|
||||
goaly[snum] = sprite[bestsprite].y;
|
||||
|
@ -5562,8 +5558,11 @@ void computergetinput(long snum, input *syn)
|
|||
else if (goalsprite[snum] != -1)
|
||||
{
|
||||
if (!cansee(x1,y1,z1-(32<<8),damysect,sprite[goalsprite[snum]].x,sprite[goalsprite[snum]].y,sprite[goalsprite[snum]].z-(4<<8),i))
|
||||
{
|
||||
goalspritescore[snum] = 0;
|
||||
goalsprite[snum] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
x3 = p->posx;
|
||||
y3 = p->posy;
|
||||
|
@ -5617,7 +5616,10 @@ void computergetinput(long snum, input *syn)
|
|||
if (goalsprite[snum] != -1)
|
||||
{
|
||||
if (!cansee(x1,y1,z1-(32<<8),damysect,sprite[goalsprite[snum]].x,sprite[goalsprite[snum]].y,sprite[goalsprite[snum]].z-(4<<8),i))
|
||||
{
|
||||
goalsprite[snum] = -1;
|
||||
goalspritescore[snum] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue