mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@532 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a71d347f83
commit
a5388fc0a4
9 changed files with 126 additions and 135 deletions
|
@ -24,7 +24,7 @@
|
|||
|
||||
#define updatecrc16(crc,dat) (crc = (((crc<<8)&65535)^crctable[((((unsigned short)crc)>>8)&65535)^dat]))
|
||||
static long crctable[256];
|
||||
static char kensig[24];
|
||||
static char kensig[32];
|
||||
|
||||
extern int ExtInit(void);
|
||||
extern int ExtPreInit(int argc,char **argv);
|
||||
|
|
|
@ -911,8 +911,7 @@ static void updateanimation (md2model *m, spritetype *tspr)
|
|||
}
|
||||
}
|
||||
|
||||
if (anim && ((long)spriteext[tspr->owner].mdanimcur) != anim->startframe ||
|
||||
(spriteext[tspr->owner].flags & SPREXT_NOMDANIM))
|
||||
if (anim && (((long)spriteext[tspr->owner].mdanimcur) != anim->startframe || (spriteext[tspr->owner].flags & SPREXT_NOMDANIM)))
|
||||
{
|
||||
//if (spriteext[tspr->owner].flags & SPREXT_NOMDANIM) OSD_Printf("SPREXT_NOMDANIM\n");
|
||||
//OSD_Printf("smooth launched ! oldanim %i new anim %i\n", spriteext[tspr->owner].mdanimcur, anim->startframe);
|
||||
|
@ -1428,7 +1427,7 @@ static int md3draw (md3model *m, spritetype *tspr)
|
|||
//PLAG : sorting stuff
|
||||
unsigned short tempus;
|
||||
void* vbotemp;
|
||||
point3d* vertexhandle;
|
||||
point3d* vertexhandle = NULL;
|
||||
unsigned short* indexhandle;
|
||||
|
||||
if (r_vbos && (m->vbos == NULL))
|
||||
|
|
|
@ -163,7 +163,7 @@ long r_vbos = 0;
|
|||
long r_vbocount = 64;
|
||||
|
||||
// model animation smoothing cvar
|
||||
long r_animsmoothing = 0;
|
||||
long r_animsmoothing = 1;
|
||||
|
||||
static float fogresult, ofogresult, fogcol[4];
|
||||
|
||||
|
|
|
@ -1770,16 +1770,16 @@ static void Keys3d(void)
|
|||
dax = wall[searchwall].x-wall[wall[searchwall].point2].x;
|
||||
day = wall[searchwall].y-wall[wall[searchwall].point2].y;
|
||||
dist = ksqrt(dax*dax+day*day);
|
||||
Bsprintf(msgbuf,"Wall %d: length:%ld lo:%d hi:%d",searchwall,dist,wall[searchwall].lotag,wall[searchwall].hitag);
|
||||
Bsprintf(msgbuf,"Wall %d: length:%ld lo:%d hi:%d ex:%d",searchwall,dist,wall[searchwall].lotag,wall[searchwall].hitag,wall[searchwall].extra);
|
||||
_message(msgbuf);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
Bsprintf(msgbuf,"Sector %d ceiling: lo:%s hi:%d",searchsector,ExtGetSectorCaption(searchsector),sector[searchsector].hitag);
|
||||
Bsprintf(msgbuf,"Sector %d ceiling: lo:%s hi:%d ex:%d",searchsector,ExtGetSectorCaption(searchsector),sector[searchsector].hitag,sector[searchsector].extra);
|
||||
_message(msgbuf);
|
||||
break;
|
||||
case 2:
|
||||
Bsprintf(msgbuf,"Sector %d floor: lo:%s hi:%d",searchsector,ExtGetSectorCaption(searchsector),sector[searchsector].hitag);
|
||||
Bsprintf(msgbuf,"Sector %d floor: lo:%s hi:%d ex:%d",searchsector,ExtGetSectorCaption(searchsector),sector[searchsector].hitag,sector[searchsector].extra);
|
||||
_message(msgbuf);
|
||||
break;
|
||||
case 3:
|
||||
|
@ -1787,7 +1787,7 @@ static void Keys3d(void)
|
|||
if (strlen(names[sprite[searchwall].picnum]) > 0)
|
||||
{
|
||||
if (sprite[searchwall].picnum==SECTOREFFECTOR)
|
||||
Bsprintf(msgbuf,"Sprite %d %s: lo:%d hi:%d",searchwall,SectorEffectorText(searchwall),sprite[searchwall].lotag,sprite[searchwall].hitag);
|
||||
Bsprintf(msgbuf,"Sprite %d %s: lo:%d hi:%d ex:%d",searchwall,SectorEffectorText(searchwall),sprite[searchwall].lotag,sprite[searchwall].hitag,sprite[searchwall].extra);
|
||||
else Bsprintf(msgbuf,"Sprite %d %s: lo:%d hi:%d ex:%d",searchwall,names[sprite[searchwall].picnum],sprite[searchwall].lotag,sprite[searchwall].hitag,sprite[searchwall].extra);
|
||||
}
|
||||
else Bsprintf(msgbuf,"Sprite %d picnum %d: lo:%d hi:%d ex:%d",searchwall,sprite[searchwall].picnum,sprite[searchwall].lotag,sprite[searchwall].hitag,sprite[searchwall].extra);
|
||||
|
@ -3014,9 +3014,7 @@ static void Keys3d(void)
|
|||
clockcnt = ((clockcnt+1)&15);
|
||||
|
||||
tempbuf[0] = 0;
|
||||
if ((bstatus&4) && (bstatus&2))
|
||||
Bsprintf(tempbuf,"PAN");
|
||||
else if (bstatus&4)
|
||||
if (bstatus&4)
|
||||
{
|
||||
if (bstatus&1) Bsprintf(tempbuf,"VIEW");
|
||||
else Bsprintf(tempbuf,"SHADE");
|
||||
|
@ -3573,7 +3571,7 @@ static void Keys2d(void)
|
|||
if (strlen(names[sprite[i].picnum]) > 0)
|
||||
{
|
||||
if (sprite[i].picnum==SECTOREFFECTOR)
|
||||
Bsprintf(tmpbuf,"Sprite %d %s: lo:%d hi:%d",i,SectorEffectorText(i),sprite[i].lotag,sprite[i].hitag);
|
||||
Bsprintf(tmpbuf,"Sprite %d %s: lo:%d hi:%d ex:%d",i,SectorEffectorText(i),sprite[i].lotag,sprite[i].hitag,sprite[i].extra);
|
||||
else Bsprintf(tmpbuf,"Sprite %d %s: lo:%d hi:%d ex:%d",i,names[sprite[i].picnum],sprite[i].lotag,sprite[i].hitag,sprite[i].extra);
|
||||
}
|
||||
else Bsprintf(tmpbuf,"Sprite %d picnum %d: lo:%d hi:%d ex:%d",i,sprite[i].picnum,sprite[i].lotag,sprite[i].hitag,sprite[i].extra);
|
||||
|
@ -3585,12 +3583,12 @@ static void Keys2d(void)
|
|||
dax = wall[linehighlight].x-wall[wall[linehighlight].point2].x;
|
||||
day = wall[linehighlight].y-wall[wall[linehighlight].point2].y;
|
||||
dist = ksqrt(dax*dax+day*day);
|
||||
Bsprintf(tempbuf,"Wall %d: length:%ld lo:%d hi:%d",linehighlight,dist,wall[linehighlight].lotag,wall[linehighlight].hitag);
|
||||
Bsprintf(tempbuf,"Wall %d: length:%ld lo:%d hi:%d ex:%d",linehighlight,dist,wall[linehighlight].lotag,wall[linehighlight].hitag,wall[linehighlight].extra);
|
||||
_printmessage16(tempbuf);
|
||||
}
|
||||
else if (cursectornum >= 0)
|
||||
{
|
||||
Bsprintf(tempbuf,"Sector %d: lo:%d hi:%d",cursectornum,sector[cursectornum].lotag,sector[cursectornum].hitag);
|
||||
Bsprintf(tempbuf,"Sector %d: lo:%d hi:%d ex:%d",cursectornum,sector[cursectornum].lotag,sector[cursectornum].hitag,sector[cursectornum].extra);
|
||||
_printmessage16(tempbuf);
|
||||
}
|
||||
else _printmessage16("");
|
||||
|
|
|
@ -854,7 +854,7 @@ void CONFIG_WriteSetup(void)
|
|||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLVBOs", r_vbos,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLVBOCount", r_vbocount,false,false);
|
||||
|
||||
// SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLAnimationSmoothing",r_animsmoothing,false,false);
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "GLAnimationSmoothing",r_animsmoothing,false,false);
|
||||
#endif
|
||||
#ifdef RENDERTYPEWIN
|
||||
SCRIPT_PutNumber(scripthandle, "Screen Setup", "MaxRefreshFreq",maxrefreshfreq,false,false);
|
||||
|
|
|
@ -52,7 +52,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <windows.h>
|
||||
#include <shellapi.h>
|
||||
extern int getversionfromwebsite(char *buffer);
|
||||
#define BUILDDATE 20070321
|
||||
#define BUILDDATE 20070413
|
||||
#define UPDATEINTERVAL 86400 // 24h
|
||||
#endif
|
||||
|
||||
|
@ -82,8 +82,9 @@ static struct strllist
|
|||
|
||||
char boardfilename[BMAX_PATH] = {0};
|
||||
char waterpal[768], slimepal[768], titlepal[768], drealms[768], endingpal[768], animpal[768];
|
||||
char firstdemofile[80] = { '\0' };
|
||||
int display_bonus_screen = 1, userconfiles = 0;
|
||||
static char firstdemofile[80] = { '\0' };
|
||||
int display_bonus_screen = 1;
|
||||
static int userconfiles = 0;
|
||||
|
||||
static int netparamcount = 0;
|
||||
static char **netparam = NULL;
|
||||
|
@ -105,9 +106,9 @@ static int nomorelogohack;
|
|||
static int sendmessagecommand = -1;
|
||||
|
||||
char defaultduke3dgrp[BMAX_PATH] = "duke3d.grp";
|
||||
char defaultconfilename[BMAX_PATH] = {"EDUKE.CON"};
|
||||
char *duke3dgrp = defaultduke3dgrp;
|
||||
char *confilename = defaultconfilename;
|
||||
static char defaultconfilename[BMAX_PATH] = {"EDUKE.CON"};
|
||||
static char *confilename = defaultconfilename;
|
||||
static char *duke3ddef = "duke3d.def";
|
||||
|
||||
extern long lastvisinc;
|
||||
|
@ -141,6 +142,10 @@ static void fakedomovethingscorrect(void);
|
|||
static int domovethings(void);
|
||||
static long playback(void);
|
||||
|
||||
static char recbuf[180];
|
||||
|
||||
extern void computergetinput(long snum, input *syn);
|
||||
|
||||
enum
|
||||
{
|
||||
T_EOF = -2,
|
||||
|
@ -377,7 +382,7 @@ inline int gametextpal(int x,int y,const char *t,int s,int p)
|
|||
return(gametext_(0,STARTALPHANUM, x,y,t,s,p,26,0, 0, xdim-1, ydim-1));
|
||||
}
|
||||
|
||||
inline int mpgametext(int y,const char *t,int s,int dabits)
|
||||
static inline int mpgametext(int y,const char *t,int s,int dabits)
|
||||
{
|
||||
if (xdim >= 640 && ydim >= 480)
|
||||
return(gametext_(1,STARTALPHANUM, 5,y,t,s,0,dabits,0, 0, xdim-1, ydim-1));
|
||||
|
@ -432,7 +437,6 @@ static void gamenumber(long x,long y,long n,char s)
|
|||
}
|
||||
#endif
|
||||
|
||||
char recbuf[180];
|
||||
static void allowtimetocorrecterrorswhenquitting(void)
|
||||
{
|
||||
long i, j, oldtotalclock;
|
||||
|
@ -967,8 +971,6 @@ void getpackets(void)
|
|||
}
|
||||
}
|
||||
|
||||
extern void computergetinput(long snum, input *syn);
|
||||
|
||||
void faketimerhandler(void)
|
||||
{
|
||||
long i, j, k;
|
||||
|
@ -1443,12 +1445,9 @@ int inventory(spritetype *s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int checkspriteflags(int iActor, int iType)
|
||||
inline int checkspriteflags(int iActor, int iType)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = (spriteflags[sprite[iActor].picnum]^actorspriteflags[iActor]);
|
||||
if (i & iType) return 1;
|
||||
if ((spriteflags[sprite[iActor].picnum]^actorspriteflags[iActor]) & iType) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1741,14 +1740,11 @@ static void weapon_amounts(struct player_struct *p,long x,long y,long u)
|
|||
|
||||
static void digitalnumber(long x,long y,long n,char s,char cs)
|
||||
{
|
||||
|
||||
short i, j, k, p, c;
|
||||
int i, j = 0, k, p, c;
|
||||
char b[10];
|
||||
|
||||
//ltoa(n,b,10);
|
||||
Bsnprintf(b,10,"%ld",n);
|
||||
i = Bstrlen(b);
|
||||
j = 0;
|
||||
|
||||
for (k=0;k<i;k++)
|
||||
{
|
||||
|
@ -1768,13 +1764,12 @@ static void digitalnumber(long x,long y,long n,char s,char cs)
|
|||
|
||||
void txdigitalnumber(int starttile, long x,long y,long n,int s,int pal,int cs,long x1, long y1, long x2, long y2)
|
||||
{
|
||||
int i, j, k, p, c;
|
||||
int i, j = 0, k, p, c;
|
||||
char b[10];
|
||||
|
||||
//ltoa(n,b,10);
|
||||
Bsnprintf(b,10,"%ld",n);
|
||||
i = Bstrlen(b);
|
||||
j = 0;
|
||||
|
||||
for (k=0;k<i;k++)
|
||||
{
|
||||
|
@ -1796,9 +1791,7 @@ void txdigitalnumber(int starttile, long x,long y,long n,int s,int pal,int cs,lo
|
|||
|
||||
static void displayinventory(struct player_struct *p)
|
||||
{
|
||||
short n, j, xoff, y;
|
||||
|
||||
j = xoff = 0;
|
||||
int n, j = 0, xoff = 0, y;
|
||||
|
||||
n = (p->jetpack_amount > 0)<<3;
|
||||
if (n&8) j++;
|
||||
|
@ -1825,9 +1818,9 @@ static void displayinventory(struct player_struct *p)
|
|||
|
||||
if (ud.screen_size == 4 && ud.drawweapon != 2)
|
||||
{
|
||||
xoff += 65;
|
||||
if (ud.multimode > 1)
|
||||
xoff += 56;
|
||||
else xoff += 65;
|
||||
xoff -= 9;
|
||||
}
|
||||
|
||||
while (j <= 9)
|
||||
|
@ -1871,9 +1864,7 @@ static void displayinventory(struct player_struct *p)
|
|||
|
||||
void displayfragbar(void)
|
||||
{
|
||||
short i, j;
|
||||
|
||||
j = 0;
|
||||
int i, j = 0;
|
||||
|
||||
for (i=connecthead;i>=0;i=connectpoint2[i])
|
||||
if (i > j) j = i;
|
||||
|
@ -1896,16 +1887,15 @@ void displayfragbar(void)
|
|||
static void coolgaugetext(int snum)
|
||||
{
|
||||
struct player_struct *p = &ps[snum];
|
||||
long i, j, o, ss, u;
|
||||
long i, j, o, ss = ud.screen_size, u;
|
||||
int permbit = 0;
|
||||
|
||||
if (ss < 4) return;
|
||||
|
||||
if (ps[snum].gm&MODE_MENU)
|
||||
if ((current_menu >= 400 && current_menu <= 405))
|
||||
return;
|
||||
|
||||
ss = ud.screen_size;
|
||||
if (ss < 4) return;
|
||||
|
||||
if (getrendermode() >= 3) pus = NUMPAGES; // JBF 20040101: always redraw in GL
|
||||
|
||||
if (ud.multimode > 1 && (gametype_flags[ud.coop] & GAMETYPE_FLAG_FRAGBAR))
|
||||
|
@ -2321,10 +2311,9 @@ static long frameval[AVERAGEFRAMES], framecnt = 0;
|
|||
|
||||
static void tics(void)
|
||||
{
|
||||
long i,j;
|
||||
long i = totalclock,j;
|
||||
char b[10];
|
||||
|
||||
i = totalclock;
|
||||
if (i != frameval[framecnt])
|
||||
{
|
||||
j=(timer*AVERAGEFRAMES)/(i-frameval[framecnt]);
|
||||
|
@ -2371,10 +2360,10 @@ static void coords(int snum)
|
|||
|
||||
if ((gametype_flags[ud.coop] & GAMETYPE_FLAG_FRAGBAR))
|
||||
{
|
||||
if (ud.multimode > 1 && ud.multimode < 5)
|
||||
y = 16;
|
||||
else if (ud.multimode > 4)
|
||||
if (ud.multimode > 4)
|
||||
y = 24;
|
||||
else if (ud.multimode > 1)
|
||||
y = 16;
|
||||
}
|
||||
sprintf(tempbuf,"X= %ld",ps[snum].posx);
|
||||
printext256(250L,y,31,-1,tempbuf,0);
|
||||
|
@ -2404,10 +2393,10 @@ static void coords(int snum)
|
|||
|
||||
static void operatefta(void)
|
||||
{
|
||||
long i, j, k, l;
|
||||
long i, j = 200-45, k, l;
|
||||
|
||||
if (ud.screen_size < 1) j = 200-8;
|
||||
|
||||
if (ud.screen_size > 0) j = 200-45;
|
||||
else j = 200-8;
|
||||
quotebot = min(quotebot,j);
|
||||
quotebotgoal = min(quotebotgoal,j);
|
||||
if (ps[myconnectindex].gm&MODE_TYPE) j -= 8;
|
||||
|
@ -3835,9 +3824,8 @@ static void SE40_Draw(int spnum,long x,long y,long z,int a,int h,long smoothrati
|
|||
|
||||
void se40code(long x,long y,long z,long a,long h, long smoothratio)
|
||||
{
|
||||
int i;
|
||||
int i= headspritestat[15];
|
||||
|
||||
i = headspritestat[15];
|
||||
while (i >= 0)
|
||||
{
|
||||
int t = sprite[i].lotag;
|
||||
|
@ -8209,7 +8197,7 @@ static void comlinehelp(void)
|
|||
"-map FILE\tUse user map FILE\n"
|
||||
"-name NAME\tUse NAME as multiplayer name\n"
|
||||
"-nD\t\tDump default gamevars to gamevars.txt\n"
|
||||
"-net PARAMETERS\tEnable network play (see documentation for PARAMETERS)\n"
|
||||
"-net PARAMETERS\tEnable network play (see documentation for parameters)\n"
|
||||
"-nm\t\tDisable music\n"
|
||||
"-ns\t\tDisable sound\n"
|
||||
"-qNUM\t\tUse NUM players for fake multiplayer (2-8)\n"
|
||||
|
@ -8465,8 +8453,8 @@ static int loadgroupfiles(const char *fn)
|
|||
{
|
||||
{ "include", T_INCLUDE },
|
||||
{ "#include", T_INCLUDE },
|
||||
{ "loadgrp", T_LOADGRP },
|
||||
{ "cachesize", T_CACHESIZE },
|
||||
{ "loadgrp", T_LOADGRP },
|
||||
{ "cachesize", T_CACHESIZE },
|
||||
};
|
||||
|
||||
script = scriptfile_fromfile((char *)fn);
|
||||
|
@ -9013,9 +9001,8 @@ static void checkcommandline(int argc,char **argv)
|
|||
|
||||
static void Logo(void)
|
||||
{
|
||||
short soundanm;
|
||||
int soundanm = 0;
|
||||
long logoflags=GetGameVar("LOGO_FLAGS",255, -1, -1);
|
||||
soundanm = 0;
|
||||
|
||||
ready2send = 0;
|
||||
|
||||
|
@ -9998,7 +9985,7 @@ void app_main(int argc,char **argv)
|
|||
initprintf("Using group file '%s' as main group file.\n", duke3dgrp);
|
||||
|
||||
getfilenames("autoload","*.grp");
|
||||
while (findfiles) { Bsprintf(tempbuf,"autoload/%s",findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; }
|
||||
while (findfiles) { Bsprintf(tempbuf,"autoload/%s",findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; }
|
||||
getfilenames("autoload","*.zip");
|
||||
while (findfiles) { Bsprintf(tempbuf,"autoload/%s",findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; }
|
||||
getfilenames("autoload","*.pk3");
|
||||
|
|
|
@ -4621,6 +4621,7 @@ static void AddDefaultDefinitions(void)
|
|||
AddDefinition("PROJ_YREPEAT",PROJ_YREPEAT,LABEL_DEFINE);
|
||||
}
|
||||
|
||||
|
||||
static void InitProjectiles(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -4824,7 +4825,7 @@ void loadefs(const char *filenam)
|
|||
"^2%s ^2WAS CHASED OFF OF %s^2'S PORCH",
|
||||
"^2%s ^2COULDN'T DANCE FAST ENOUGH FOR %s",
|
||||
"^2%s ^2TRIED TO OUTRUN %s^2'S ROCKET",
|
||||
"^2%s ^2FINALLY FOUND %s^2'S HIDDEN WMDS",
|
||||
"^2%s ^2FOUND %s^2'S HIDDEN WEAPONS OF MASS DESTRUCTION",
|
||||
"^2%s ^2WAS JUST TRYING TO HELP %s ^2TIE HIS SHOELACES",
|
||||
"^2%s^2's IGLOO WAS WRECKED BY %s",
|
||||
"^2%s ^2BECAME A STICKY FILM ON %s^2'S BOOTS",
|
||||
|
@ -4832,8 +4833,8 @@ void loadefs(const char *filenam)
|
|||
|
||||
"^2%s ^2WAS WALKED ALL OVER BY %s",
|
||||
"^2%s ^2WAS PICKED OFF BY %s",
|
||||
"^2%s ^2WENT QUAIL HUNTING WITH VICE PRESIDENT %s",
|
||||
"^2%s ^2ENDED UP WITH A FEW NEW HOLES FROM %s^2's CHAINGUN",
|
||||
"^2%s ^2SUCKED %s^2'S SHOTGUN",
|
||||
"^2%s ^2ENDED UP WITH A FEW NEW HOLES FROM %s^2'S CHAINGUN",
|
||||
"^2%s ^2WAS TURNED INTO %s^2 BRAND CHUNKY SALSA",
|
||||
"^2%s ^2FOUND A PRESENT FROM %s",
|
||||
"^2%s ^2WAS SCATHED BY %s^2'S SHRINK RAY",
|
||||
|
|
|
@ -3831,79 +3831,85 @@ static int parse(void)
|
|||
insptr++;
|
||||
g_sp->xoffset = 0;
|
||||
g_sp->yoffset = 0;
|
||||
// if(!gotz)
|
||||
|
||||
j = gc;
|
||||
|
||||
if (ceilingspace(g_sp->sectnum) || sector[g_sp->sectnum].lotag == 2)
|
||||
j = gc/6;
|
||||
else if (floorspace(g_sp->sectnum))
|
||||
j = 0;
|
||||
|
||||
if (hittype[g_i].cgg <= 0 || (sector[g_sp->sectnum].floorstat&2))
|
||||
{
|
||||
j = gc;
|
||||
getglobalz(g_i);
|
||||
hittype[g_i].cgg = 3;
|
||||
}
|
||||
else hittype[g_i].cgg --;
|
||||
|
||||
if (ceilingspace(g_sp->sectnum) || sector[g_sp->sectnum].lotag == 2)
|
||||
j = gc/6;
|
||||
else if (floorspace(g_sp->sectnum))
|
||||
j = 0;
|
||||
if (g_sp->z < (hittype[g_i].floorz-FOURSLEIGHT))
|
||||
{
|
||||
g_sp->zvel += j;
|
||||
g_sp->z+=g_sp->zvel;
|
||||
|
||||
if (hittype[g_i].cgg <= 0 || (sector[g_sp->sectnum].floorstat&2))
|
||||
{
|
||||
getglobalz(g_i);
|
||||
hittype[g_i].cgg = 6;
|
||||
}
|
||||
else hittype[g_i].cgg --;
|
||||
if (g_sp->zvel > 6144) g_sp->zvel = 6144;
|
||||
|
||||
if (g_sp->z < (hittype[g_i].floorz-FOURSLEIGHT))
|
||||
{
|
||||
g_sp->zvel += j;
|
||||
g_sp->z+=g_sp->zvel;
|
||||
|
||||
if (g_sp->zvel > 6144) g_sp->zvel = 6144;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_sp->z = hittype[g_i].floorz - FOURSLEIGHT;
|
||||
|
||||
if (badguy(g_sp) || (g_sp->picnum == APLAYER && g_sp->owner >= 0))
|
||||
{
|
||||
if (g_sp->zvel > 3084 && g_sp->extra <= 1)
|
||||
{
|
||||
if (g_sp->pal != 1 && g_sp->picnum != DRONE)
|
||||
{
|
||||
if (!(g_sp->picnum == APLAYER && g_sp->extra > 0))
|
||||
{
|
||||
guts(g_i,JIBS6,15,g_p);
|
||||
spritesound(SQUISHED,g_i);
|
||||
spawn(g_i,BLOODPOOL);
|
||||
}
|
||||
}
|
||||
|
||||
hittype[g_i].picnum = SHOTSPARK1;
|
||||
hittype[g_i].extra = 1;
|
||||
g_sp->zvel = 0;
|
||||
}
|
||||
else if (g_sp->zvel > 2048 && sector[g_sp->sectnum].lotag != 1)
|
||||
{
|
||||
j = g_sp->sectnum;
|
||||
pushmove(&g_sp->x,&g_sp->y,&g_sp->z,(short*)&j,128L,(4L<<8),(4L<<8),CLIPMASK0);
|
||||
if (j != g_sp->sectnum && j >= 0 && j < MAXSECTORS)
|
||||
changespritesect(g_i,j);
|
||||
|
||||
spritesound(THUD,g_i);
|
||||
}
|
||||
}
|
||||
if (sector[g_sp->sectnum].lotag == 1)
|
||||
switch (dynamictostatic[g_sp->picnum])
|
||||
{
|
||||
case OCTABRAIN__STATIC:
|
||||
case COMMANDER__STATIC:
|
||||
case DRONE__STATIC:
|
||||
break;
|
||||
default:
|
||||
g_sp->z += (24<<8);
|
||||
break;
|
||||
}
|
||||
else g_sp->zvel = 0;
|
||||
}
|
||||
|
||||
if (g_sp->z > (hittype[g_i].floorz-FOURSLEIGHT))
|
||||
if (g_sp->z > (hittype[g_i].floorz - FOURSLEIGHT))
|
||||
g_sp->z = (hittype[g_i].floorz - FOURSLEIGHT);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_sp->z = hittype[g_i].floorz - FOURSLEIGHT;
|
||||
|
||||
if (badguy(g_sp) || (g_sp->picnum == APLAYER && g_sp->owner >= 0))
|
||||
{
|
||||
if (g_sp->zvel > 3084 && g_sp->extra <= 1)
|
||||
{
|
||||
if (g_sp->pal != 1 && g_sp->picnum != DRONE)
|
||||
{
|
||||
if (!(g_sp->picnum == APLAYER && g_sp->extra > 0))
|
||||
{
|
||||
guts(g_i,JIBS6,15,g_p);
|
||||
spritesound(SQUISHED,g_i);
|
||||
spawn(g_i,BLOODPOOL);
|
||||
}
|
||||
}
|
||||
|
||||
hittype[g_i].picnum = SHOTSPARK1;
|
||||
hittype[g_i].extra = 1;
|
||||
g_sp->zvel = 0;
|
||||
}
|
||||
else if (g_sp->zvel > 2048 && sector[g_sp->sectnum].lotag != 1)
|
||||
{
|
||||
j = g_sp->sectnum;
|
||||
pushmove(&g_sp->x,&g_sp->y,&g_sp->z,(short*)&j,128L,(4L<<8),(4L<<8),CLIPMASK0);
|
||||
if (j != g_sp->sectnum && j >= 0 && j < MAXSECTORS)
|
||||
changespritesect(g_i,j);
|
||||
|
||||
spritesound(THUD,g_i);
|
||||
}
|
||||
}
|
||||
|
||||
if (g_sp->z > (hittype[g_i].floorz - FOURSLEIGHT))
|
||||
{
|
||||
getglobalz(g_i);
|
||||
if (hittype[g_i].floorz != sector[g_sp->sectnum].floorz)
|
||||
g_sp->z = (hittype[g_i].floorz - FOURSLEIGHT);
|
||||
}
|
||||
else if (sector[g_sp->sectnum].lotag == 1)
|
||||
{
|
||||
switch (dynamictostatic[g_sp->picnum])
|
||||
{
|
||||
case OCTABRAIN__STATIC:
|
||||
case COMMANDER__STATIC:
|
||||
case DRONE__STATIC:
|
||||
break;
|
||||
default:
|
||||
g_sp->z += (24<<8);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else g_sp->zvel = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case CON_ENDA:
|
||||
|
|
|
@ -387,8 +387,8 @@ void PlayMusic(char *_filename)
|
|||
{
|
||||
char *user = getenv("USERNAME");
|
||||
|
||||
if (user) Bsprintf(tempbuf,"duke3d-%s.mid.%d",user,getpid());
|
||||
else Bsprintf(tempbuf,"duke3d.mid.%d",getpid());
|
||||
if (user) Bsprintf(tempbuf,"duke3d-%s.%d.mid",user,getpid());
|
||||
else Bsprintf(tempbuf,"duke3d.%d.mid",getpid());
|
||||
|
||||
GetUnixPathFromEnvironment(filename, BMAX_PATH, tempbuf);
|
||||
|
||||
|
|
Loading…
Reference in a new issue