updatesectorz() -> updatesector()

I now have a clue about updatesectorz() breaking things. :o


git-svn-id: https://svn.eduke32.com/eduke32@376 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-12-02 06:00:49 +00:00
parent 36f69beeb6
commit fb06419c82
9 changed files with 31 additions and 7022 deletions

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

File diff suppressed because it is too large Load diff

View file

@ -480,7 +480,7 @@ SKIPWALLCHECK:
ps[p].posy = ps[p].oposy;
ps[p].posz = ps[p].oposz;
ps[p].ang = ps[p].oang;
updatesectorz(ps[p].posx,ps[p].posy,ps[p].posz,&ps[p].cursectnum);
updatesector(ps[p].posx,ps[p].posy,&ps[p].cursectnum);
setpal(&ps[p]);
k = headspritestat[1];
@ -809,7 +809,7 @@ void movefta(void)
{
px = ps[p].oposx+64-(TRAND&127);
py = ps[p].oposy+64-(TRAND&127);
updatesectorz(px,py,ps[p].oposz,&psect);
updatesector(px,py,&psect);
if (psect == -1)
{
i = nexti;
@ -817,7 +817,7 @@ void movefta(void)
}
sx = s->x+64-(TRAND&127);
sy = s->y+64-(TRAND&127);
updatesectorz(px,py,ps[p].oposz,&ssect);
updatesector(px,py,&ssect);
if (ssect == -1)
{
i = nexti;
@ -4127,7 +4127,7 @@ void moveactors(void)
ps[p].posz = ps[p].oposz;
ps[p].ang = ps[p].oang;
updatesectorz(ps[p].posx,ps[p].posy,ps[p].posz,&ps[p].cursectnum);
updatesector(ps[p].posx,ps[p].posy,&ps[p].cursectnum);
setpal(&ps[p]);
j = headspritestat[1];
@ -5719,7 +5719,7 @@ void moveeffectors(void) //STATNUM 3
if (sprite[ps[p].i].extra > 0)
{
k = ps[p].cursectnum;
updatesectorz(ps[p].posx,ps[p].posy,ps[p].posz,&k);
updatesector(ps[p].posx,ps[p].posy,&k);
if ((k == -1 && ud.clipping == 0) || (k == s->sectnum && ps[p].cursectnum != s->sectnum))
{
ps[p].posx = s->x;
@ -5801,7 +5801,7 @@ void moveeffectors(void) //STATNUM 3
if (sprite[ps[p].i].extra > 0)
{
k = ps[p].cursectnum;
updatesectorz(ps[p].posx,ps[p].posy,ps[p].posz,&k);
updatesector(ps[p].posx,ps[p].posy,&k);
if ((k == -1 && ud.clipping == 0) || (k == s->sectnum && ps[p].cursectnum != s->sectnum))
{
ps[p].oposx = ps[p].posx = s->x;
@ -5820,7 +5820,7 @@ void moveeffectors(void) //STATNUM 3
if (sprite[j].statnum == 1 && badguy(&sprite[j]) && sprite[j].picnum != SECTOREFFECTOR && sprite[j].picnum != LOCATORS)
{
k = sprite[j].sectnum;
updatesectorz(sprite[j].x,sprite[j].y,sprite[j].z,&k);
updatesector(sprite[j].x,sprite[j].y,&k);
if (sprite[j].extra >= 0 && k == s->sectnum)
{
gutsdir(&sprite[j],JIBS6,72,myconnectindex);
@ -5900,7 +5900,7 @@ void moveeffectors(void) //STATNUM 3
if (sprite[ps[p].i].extra > 0)
{
k = ps[p].cursectnum;
updatesectorz(ps[p].posx,ps[p].posy,ps[p].posz,&k);
updatesector(ps[p].posx,ps[p].posy,&k);
if ((k == -1 && ud.clipping == 0) || (k == s->sectnum && ps[p].cursectnum != s->sectnum))
{
ps[p].posx = s->x;
@ -5969,7 +5969,7 @@ void moveeffectors(void) //STATNUM 3
if (sprite[ps[p].i].extra > 0)
{
k = ps[p].cursectnum;
updatesectorz(ps[p].posx,ps[p].posy,ps[p].posz,&k);
updatesector(ps[p].posx,ps[p].posy,&k);
if ((k == -1 && ud.clipping == 0) || (k == s->sectnum && ps[p].cursectnum != s->sectnum))
{
ps[p].posx = s->x;
@ -5994,7 +5994,7 @@ void moveeffectors(void) //STATNUM 3
// if(sprite[j].sectnum != s->sectnum)
{
k = sprite[j].sectnum;
updatesectorz(sprite[j].x,sprite[j].y,sprite[j].z,&k);
updatesector(sprite[j].x,sprite[j].y,&k);
if (sprite[j].extra >= 0 && k == s->sectnum)
{
gutsdir(&sprite[j],JIBS6,24,myconnectindex);

View file

@ -4673,16 +4673,16 @@ short spawn(short j, short pn)
short s1;
s1 = sp->sectnum;
updatesectorz(sp->x+108,sp->y+108,sp->z,&s1);
updatesector(sp->x+108,sp->y+108,&s1);
if (s1 >= 0 && sector[s1].floorz == sector[sp->sectnum].floorz)
{
updatesectorz(sp->x-108,sp->y-108,sp->z,&s1);
updatesector(sp->x-108,sp->y-108,&s1);
if (s1 >= 0 && sector[s1].floorz == sector[sp->sectnum].floorz)
{
updatesectorz(sp->x+108,sp->y-108,sp->z,&s1);
updatesector(sp->x+108,sp->y-108,&s1);
if (s1 >= 0 && sector[s1].floorz == sector[sp->sectnum].floorz)
{
updatesectorz(sp->x-108,sp->y+108,sp->z,&s1);
updatesector(sp->x-108,sp->y+108,&s1);
if (s1 >= 0 && sector[s1].floorz != sector[sp->sectnum].floorz)
{
sp->xrepeat = sp->yrepeat = 0;
@ -4904,16 +4904,16 @@ short spawn(short j, short pn)
short s1;
s1 = sp->sectnum;
updatesectorz(sp->x+84,sp->y+84,sp->z,&s1);
updatesector(sp->x+84,sp->y+84,&s1);
if (s1 >= 0 && sector[s1].floorz == sector[sp->sectnum].floorz)
{
updatesectorz(sp->x-84,sp->y-84,sp->z,&s1);
updatesector(sp->x-84,sp->y-84,&s1);
if (s1 >= 0 && sector[s1].floorz == sector[sp->sectnum].floorz)
{
updatesectorz(sp->x+84,sp->y-84,sp->z,&s1);
updatesector(sp->x+84,sp->y-84,&s1);
if (s1 >= 0 && sector[s1].floorz == sector[sp->sectnum].floorz)
{
updatesectorz(sp->x-84,sp->y+84,sp->z,&s1);
updatesector(sp->x-84,sp->y+84,&s1);
if (s1 >= 0 && sector[s1].floorz != sector[sp->sectnum].floorz)
{
sp->xrepeat = sp->yrepeat = 0;
@ -10632,7 +10632,7 @@ void fakedomovethings(void)
x = myx+(sintable[(myang+512)&2047]>>5);
y = myy+(sintable[myang&2047]>>5);
tempsect = psect;
updatesectorz(x,y,myz,&tempsect);
updatesector(x,y,&tempsect);
if (tempsect >= 0)
{
k = getflorzofslope(psect,x,y);
@ -10683,7 +10683,7 @@ void fakedomovethings(void)
clipmove(&myx,&myy,&myz,&mycursectnum,0,0,164L,(4L<<8),(4L<<8),CLIPMASK0);
}
updatesectorz(myx,myy,myz,&mycursectnum);
updatesector(myx,myy,&mycursectnum);
pushmove(&myx,&myy,&myz,&mycursectnum,128L,(4L<<8),(20L<<8),CLIPMASK0);
myhoriz = 100;

View file

@ -4130,7 +4130,7 @@ SKIPJIBS:
ps[g_p].posy = ps[g_p].oposy;
ps[g_p].posz = ps[g_p].oposz;
ps[g_p].ang = ps[g_p].oang;
updatesectorz(ps[g_p].posx,ps[g_p].posy,ps[g_p].posz,&ps[g_p].cursectnum);
updatesector(ps[g_p].posx,ps[g_p].posy,&ps[g_p].cursectnum);
setpal(&ps[g_p]);
j = headspritestat[1];
@ -5246,7 +5246,7 @@ SKIPJIBS:
g_sp->x = hittype[g_i].bposx = ps[g_p].bobposx = ps[g_p].oposx = ps[g_p].posx;
g_sp->y = hittype[g_i].bposy = ps[g_p].bobposy = ps[g_p].oposy =ps[g_p].posy;
g_sp->z = hittype[g_i].bposy = ps[g_p].oposz =ps[g_p].posz;
updatesectorz(ps[g_p].posx,ps[g_p].posy,ps[g_p].posz+PHEIGHT,&ps[g_p].cursectnum);
updatesector(ps[g_p].posx,ps[g_p].posy,&ps[g_p].cursectnum);
setsprite(ps[g_p].i,ps[g_p].posx,ps[g_p].posy,ps[g_p].posz+PHEIGHT);
g_sp->cstat = 257;

View file

@ -3352,7 +3352,7 @@ void processinput(short snum)
x = p->posx+(sintable[(p->ang+512)&2047]>>5);
y = p->posy+(sintable[p->ang&2047]>>5);
tempsect = psect;
updatesectorz(x,y,p->posz,&tempsect);
updatesector(x,y,&tempsect);
if (tempsect >= 0)
{
k = getflorzofslope(psect,x,y);
@ -3698,7 +3698,7 @@ void processinput(short snum)
p->horiz = 100;
p->horizoff = 0;
updatesectorz(p->posx,p->posy,p->posz,&p->cursectnum);
updatesector(p->posx,p->posy,&p->cursectnum);
pushmove(&p->posx,&p->posy,&p->posz,&p->cursectnum,128L,(4L<<8),(20L<<8),CLIPMASK0);
@ -4434,7 +4434,7 @@ HORIZONLY:
j = 0;
p->posx += p->posxv>>14;
p->posy += p->posyv>>14;
updatesectorz(p->posx,p->posy,p->posz,&p->cursectnum);
updatesector(p->posx,p->posy,&p->cursectnum);
changespritesect(pi,p->cursectnum);
}
else

View file

@ -1341,7 +1341,7 @@ void resetpspritevars(char g)
hittype[i].bposz = ps[j].oposz = ps[j].posz = s->z;
ps[j].oang = ps[j].ang = s->ang;
updatesectorz(s->x,s->y,s->z+PHEIGHT,&ps[j].cursectnum);
updatesector(s->x,s->y,&ps[j].cursectnum);
j = connectpoint2[j];

View file

@ -1673,7 +1673,7 @@ void checkhitwall(short spr,short dawallnum,long x,long y,long z,short atwith)
//case W_FORCEFIELD+2:
wal->extra = 1; // tell the forces to animate
case BIGFORCE__STATIC:
updatesectorz(x,y,z,&sn);
updatesector(x,y,&sn);
if (sn < 0) return;
if (atwith == -1)
@ -1706,7 +1706,7 @@ void checkhitwall(short spr,short dawallnum,long x,long y,long z,short atwith)
return;
case GLASS__STATIC:
updatesectorz(x,y,z,&sn);
updatesector(x,y,&sn);
if (sn < 0) return;
wal->overpicnum=GLASS2;
lotsofglass(spr,dawallnum,10);
@ -1722,7 +1722,7 @@ void checkhitwall(short spr,short dawallnum,long x,long y,long z,short atwith)
spritesound(GLASS_BREAKING,i);
return;
case STAINGLASS1__STATIC:
updatesectorz(x,y,z,&sn);
updatesector(x,y,&sn);
if (sn < 0) return;
lotsofcolourglass(spr,dawallnum,80);
wal->cstat = 0;
@ -2472,7 +2472,7 @@ void checkhitsprite(short i,short sn)
ps[p].posz = ps[p].oposz;
ps[p].ang = ps[p].oang;
updatesectorz(ps[p].posx,ps[p].posy,ps[p].posz,&ps[p].cursectnum);
updatesector(ps[p].posx,ps[p].posy,&ps[p].cursectnum);
setpal(&ps[p]);
j = headspritestat[1];
@ -3458,7 +3458,7 @@ CLEARCAMERAS:
p->ang = p->oang;
p->newowner = -1;
updatesectorz(p->posx,p->posy,p->posz,&p->cursectnum);
updatesector(p->posx,p->posy,&p->cursectnum);
setpal(p);