mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
*yawn*
git-svn-id: https://svn.eduke32.com/eduke32@117 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
48ad421eb9
commit
e316013c1d
4 changed files with 16 additions and 28 deletions
|
@ -402,10 +402,10 @@ static int defsparser(scriptfile *script)
|
||||||
{
|
{
|
||||||
int tile1,tile2,xsiz,ysiz,i;
|
int tile1,tile2,xsiz,ysiz,i;
|
||||||
|
|
||||||
if (scriptfile_getsymbol(script,&tile1)) break;
|
if (scriptfile_getnumber(script,&tile1)) break;
|
||||||
if (scriptfile_getsymbol(script,&tile2)) break;
|
if (scriptfile_getnumber(script,&tile2)) break;
|
||||||
if (scriptfile_getsymbol(script,&xsiz)) break;
|
if (scriptfile_getnumber(script,&xsiz)) break;
|
||||||
if (scriptfile_getsymbol(script,&ysiz)) break;
|
if (scriptfile_getnumber(script,&ysiz)) break;
|
||||||
if (tile2 < tile1) {
|
if (tile2 < tile1) {
|
||||||
initprintf("Warning: backwards tile range on line %s:%d\n", script->filename, scriptfile_getlinum(script,cmdtokptr));
|
initprintf("Warning: backwards tile range on line %s:%d\n", script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||||
i = tile2;
|
i = tile2;
|
||||||
|
@ -424,6 +424,7 @@ static int defsparser(scriptfile *script)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case T_DEFINEMODEL:
|
case T_DEFINEMODEL:
|
||||||
|
|
|
@ -7619,7 +7619,7 @@ void checkcommandline(int argc,char **argv)
|
||||||
|
|
||||||
else if( *c == 'D')
|
else if( *c == 'D')
|
||||||
{
|
{
|
||||||
FILE * fp=fopenfrompath("gamevars.txt","w");
|
FILE * fp=fopen("gamevars.txt","w");
|
||||||
InitGameVars();
|
InitGameVars();
|
||||||
DumpGameVars(fp);
|
DumpGameVars(fp);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
|
@ -4069,16 +4069,16 @@ SKIPJIBS:
|
||||||
|
|
||||||
case CON_CANSEESPR:
|
case CON_CANSEESPR:
|
||||||
{
|
{
|
||||||
long var1, var2, rvar;
|
long lVar1, lVar2, lVar3;
|
||||||
|
|
||||||
insptr++;
|
insptr++;
|
||||||
|
|
||||||
var1 = GetGameVarID(*insptr++,g_i,g_p);
|
lVar1 = GetGameVarID(*insptr++,g_i,g_p);
|
||||||
var2 = GetGameVarID(*insptr++,g_i,g_p);
|
lVar2 = GetGameVarID(*insptr++,g_i,g_p);
|
||||||
rvar = *insptr++;
|
lVar3 = *insptr++;
|
||||||
|
|
||||||
SetGameVarID(rvar, cansee(sprite[var1].x,sprite[var1].y,sprite[var1].z,sprite[var1].sectnum,
|
SetGameVarID(lVar3, cansee(sprite[lVar1].x,sprite[lVar1].y,sprite[lVar1].z,sprite[lVar1].sectnum,
|
||||||
sprite[var2].x,sprite[var2].y,sprite[var2].z,sprite[var2].sectnum), g_i, g_p);
|
sprite[lVar2].x,sprite[lVar2].y,sprite[lVar2].z,sprite[lVar2].sectnum), g_i, g_p);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,33 +154,20 @@ void hitscantrail(long x1, long y1, long z1, long x2, long y2, long z2, short an
|
||||||
long xv, yv, zv, n, j, i;
|
long xv, yv, zv, n, j, i;
|
||||||
short sect = -1;
|
short sect = -1;
|
||||||
|
|
||||||
/* mathematical bullshit */
|
|
||||||
|
|
||||||
x1 += (sintable[(348+ang+512)&2047]/projectile[atwith].offset);
|
x1 += (sintable[(348+ang+512)&2047]/projectile[atwith].offset);
|
||||||
y1 += (sintable[(ang+348)&2047]/projectile[atwith].offset);
|
y1 += (sintable[(ang+348)&2047]/projectile[atwith].offset);
|
||||||
|
|
||||||
/* find the distance between our player's projectile firing position and the impact point */
|
n = (FindDistance2D(x1-x2,y1-y2))>>8;
|
||||||
|
|
||||||
n = (FindDistance2D(x1-x2,y1-y2))/256;
|
|
||||||
|
|
||||||
/* apply an offset if needed, defined in CONs */
|
|
||||||
|
|
||||||
z1 += (projectile[atwith].toffset<<8)+1024;
|
z1 += (projectile[atwith].toffset<<8)+1024;
|
||||||
|
|
||||||
/* figure out how much distance to put between each sprite */
|
|
||||||
|
|
||||||
xv = (x2-x1)/n;
|
xv = (x2-x1)/n;
|
||||||
yv = (y2-y1)/n;
|
yv = (y2-y1)/n;
|
||||||
zv = (z2-z1)/n;
|
zv = (z2-z1)/n;
|
||||||
|
|
||||||
// Bsprintf(tempbuf,"%ld, %ld, %ld (%ld)",xv,yv,zv,n);
|
x1 += xv>>2;
|
||||||
// AddLog(tempbuf);
|
y1 += yv>>2;
|
||||||
|
z1 += zv>>2;
|
||||||
x1 += xv/4;
|
|
||||||
y1 += yv/4;
|
|
||||||
z1 += zv/4;
|
|
||||||
|
|
||||||
/* spawn the trail sprites */
|
|
||||||
|
|
||||||
for(i=0;i<projectile[atwith].tnum;i++)
|
for(i=0;i<projectile[atwith].tnum;i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue