- move, fakebubbaspawn and destroyit.

This commit is contained in:
Christoph Oelckers 2020-10-22 23:41:07 +02:00
parent a6f9673403
commit e6e53d1954
5 changed files with 123 additions and 120 deletions

View file

@ -3809,14 +3809,14 @@ void moveeffectors_d(void) //STATNUM 3
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// //
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void move_d(int g_i, int g_p, int g_x) void move_d(DDukeActor *actor, int g_p, int g_x)
{ {
auto g_sp = &sprite[g_i]; auto g_sp = &actor->s;
auto g_t = hittype[g_i].temp_data; auto g_t = actor->temp_data;
int l; int l;
short goalang, angdif; short goalang, angdif;
int daxvel; int daxvel;
@ -3875,11 +3875,11 @@ void move_d(int g_i, int g_p, int g_x)
if (g_t[1] == 0 || a == 0) if (g_t[1] == 0 || a == 0)
{ {
if ((badguy(g_sp) && g_sp->extra <= 0) || (hittype[g_i].bposx != g_sp->x) || (hittype[g_i].bposy != g_sp->y)) if ((badguy(actor) && g_sp->extra <= 0) || (actor->bposx != g_sp->x) || (actor->bposy != g_sp->y))
{ {
hittype[g_i].bposx = g_sp->x; actor->bposx = g_sp->x;
hittype[g_i].bposy = g_sp->y; actor->bposy = g_sp->y;
setsprite(g_i, g_sp->x, g_sp->y, g_sp->z); setsprite(actor, g_sp->pos);
} }
return; return;
} }
@ -3890,14 +3890,14 @@ void move_d(int g_i, int g_p, int g_x)
if (a & getv) g_sp->zvel += ((*(moveptr + 1) << 4) - g_sp->zvel) >> 1; if (a & getv) g_sp->zvel += ((*(moveptr + 1) << 4) - g_sp->zvel) >> 1;
if (a & dodgebullet) if (a & dodgebullet)
dodge(&hittype[g_i]); dodge(actor);
if (g_sp->picnum != APLAYER) if (g_sp->picnum != APLAYER)
alterang(a, &hittype[g_i], g_p); alterang(a, actor, g_p);
if (g_sp->xvel > -6 && g_sp->xvel < 6) g_sp->xvel = 0; if (g_sp->xvel > -6 && g_sp->xvel < 6) g_sp->xvel = 0;
a = badguy(g_sp); a = badguy(actor);
if (g_sp->xvel || g_sp->zvel) if (g_sp->xvel || g_sp->zvel)
{ {
@ -3907,14 +3907,14 @@ void move_d(int g_i, int g_p, int g_x)
{ {
if (g_sp->picnum == COMMANDER) if (g_sp->picnum == COMMANDER)
{ {
hittype[g_i].floorz = l = getflorzofslope(g_sp->sectnum, g_sp->x, g_sp->y); actor->floorz = l = getflorzofslope(g_sp->sectnum, g_sp->x, g_sp->y);
if (g_sp->z > (l - (8 << 8))) if (g_sp->z > (l - (8 << 8)))
{ {
if (g_sp->z > (l - (8 << 8))) g_sp->z = l - (8 << 8); if (g_sp->z > (l - (8 << 8))) g_sp->z = l - (8 << 8);
g_sp->zvel = 0; g_sp->zvel = 0;
} }
hittype[g_i].ceilingz = l = getceilzofslope(g_sp->sectnum, g_sp->x, g_sp->y); actor->ceilingz = l = getceilzofslope(g_sp->sectnum, g_sp->x, g_sp->y);
if ((g_sp->z - l) < (80 << 8)) if ((g_sp->z - l) < (80 << 8))
{ {
g_sp->z = l + (80 << 8); g_sp->z = l + (80 << 8);
@ -3925,13 +3925,13 @@ void move_d(int g_i, int g_p, int g_x)
{ {
if (g_sp->zvel > 0) if (g_sp->zvel > 0)
{ {
hittype[g_i].floorz = l = getflorzofslope(g_sp->sectnum, g_sp->x, g_sp->y); actor->floorz = l = getflorzofslope(g_sp->sectnum, g_sp->x, g_sp->y);
if (g_sp->z > (l - (30 << 8))) if (g_sp->z > (l - (30 << 8)))
g_sp->z = l - (30 << 8); g_sp->z = l - (30 << 8);
} }
else else
{ {
hittype[g_i].ceilingz = l = getceilzofslope(g_sp->sectnum, g_sp->x, g_sp->y); actor->ceilingz = l = getceilzofslope(g_sp->sectnum, g_sp->x, g_sp->y);
if ((g_sp->z - l) < (50 << 8)) if ((g_sp->z - l) < (50 << 8))
{ {
g_sp->z = l + (50 << 8); g_sp->z = l + (50 << 8);
@ -3942,8 +3942,8 @@ void move_d(int g_i, int g_p, int g_x)
} }
else if (g_sp->picnum != ORGANTIC) else if (g_sp->picnum != ORGANTIC)
{ {
if (g_sp->zvel > 0 && hittype[g_i].floorz < g_sp->z) if (g_sp->zvel > 0 && actor->floorz < g_sp->z)
g_sp->z = hittype[g_i].floorz; g_sp->z = actor->floorz;
if (g_sp->zvel < 0) if (g_sp->zvel < 0)
{ {
l = getceilzofslope(g_sp->sectnum, g_sp->x, g_sp->y); l = getceilzofslope(g_sp->sectnum, g_sp->x, g_sp->y);
@ -3956,8 +3956,8 @@ void move_d(int g_i, int g_p, int g_x)
} }
} }
else if (g_sp->picnum == APLAYER) else if (g_sp->picnum == APLAYER)
if ((g_sp->z - hittype[g_i].ceilingz) < (32 << 8)) if ((g_sp->z - actor->ceilingz) < (32 << 8))
g_sp->z = hittype[g_i].ceilingz + (32 << 8); g_sp->z = actor->ceilingz + (32 << 8);
daxvel = g_sp->xvel; daxvel = g_sp->xvel;
angdif = g_sp->ang; angdif = g_sp->ang;
@ -3983,22 +3983,23 @@ void move_d(int g_i, int g_p, int g_x)
} }
else if (g_sp->picnum != DRONE && g_sp->picnum != SHARK && g_sp->picnum != COMMANDER) else if (g_sp->picnum != DRONE && g_sp->picnum != SHARK && g_sp->picnum != COMMANDER)
{ {
if (hittype[g_i].bposz != g_sp->z || (ud.multimode < 2 && ud.player_skill < 2)) if (actor->bposz != g_sp->z || (ud.multimode < 2 && ud.player_skill < 2))
{ {
if ((g_t[0] & 1) || ps[g_p].actorsqu == &hittype[g_i]) return; if ((g_t[0] & 1) || ps[g_p].actorsqu == actor) return;
else daxvel <<= 1; else daxvel <<= 1;
} }
else else
{ {
if ((g_t[0] & 3) || ps[g_p].actorsqu == &hittype[g_i]) return; if ((g_t[0] & 3) || ps[g_p].actorsqu == actor) return;
else daxvel <<= 2; else daxvel <<= 2;
} }
} }
} }
hittype[g_i].movflag = fi.movesprite(g_i, Collision coll;
actor->movflag = movesprite_ex(actor,
(daxvel * (sintable[(angdif + 512) & 2047])) >> 14, (daxvel * (sintable[(angdif + 512) & 2047])) >> 14,
(daxvel * (sintable[angdif & 2047])) >> 14, g_sp->zvel, CLIPMASK0); (daxvel * (sintable[angdif & 2047])) >> 14, g_sp->zvel, CLIPMASK0, coll);
} }
if (a) if (a)
@ -4008,10 +4009,17 @@ void move_d(int g_i, int g_p, int g_x)
else g_sp->shade += (sector[g_sp->sectnum].floorshade - g_sp->shade) >> 1; else g_sp->shade += (sector[g_sp->sectnum].floorshade - g_sp->shade) >> 1;
if (sector[g_sp->sectnum].floorpicnum == MIRROR) if (sector[g_sp->sectnum].floorpicnum == MIRROR)
deletesprite(g_i); deletesprite(actor);
} }
} }
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
void fall_d(int g_i, int g_p) void fall_d(int g_i, int g_p)
{ {
fall_common(&hittype[g_i], g_p, JIBS6, DRONE, BLOODPOOL, SHOTSPARK1, SQUISHED, THUD, nullptr); fall_common(&hittype[g_i], g_p, JIBS6, DRONE, BLOODPOOL, SHOTSPARK1, SQUISHED, THUD, nullptr);

View file

@ -3709,15 +3709,14 @@ int adjustfall(DDukeActor *actor, int c)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void move_r(int g_i, int g_p, int g_x) void move_r(DDukeActor *actor, int g_p, int g_x)
{ {
auto g_sp = &sprite[g_i]; auto g_t = actor->temp_data;
auto g_t = hittype[g_i].temp_data;
int l; int l;
short a, goalang, angdif; short goalang, angdif;
int daxvel; int daxvel;
a = g_sp->hitag; int a = g_sp->hitag;
if (a == -1) a = 0; if (a == -1) a = 0;
@ -3832,13 +3831,13 @@ void move_r(int g_i, int g_p, int g_x)
if (g_t[1] == 0 || a == 0) if (g_t[1] == 0 || a == 0)
{ {
if ((badguy(g_sp) && g_sp->extra <= 0) || (hittype[g_i].bposx != g_sp->x) || (hittype[g_i].bposy != g_sp->y)) if ((badguy(actor) && g_sp->extra <= 0) || (actor->bposx != g_sp->x) || (actor->bposy != g_sp->y))
{ {
hittype[g_i].bposx = g_sp->x; actor->bposx = g_sp->x;
hittype[g_i].bposy = g_sp->y; actor->bposy = g_sp->y;
setsprite(g_i, g_sp->x, g_sp->y, g_sp->z); setsprite(actor, g_sp->pos);
} }
if (badguy(g_sp) && g_sp->extra <= 0) if (badguy(actor) && g_sp->extra <= 0)
{ {
if (sector[g_sp->sectnum].ceilingstat & 1) if (sector[g_sp->sectnum].ceilingstat & 1)
{ {
@ -3865,14 +3864,14 @@ void move_r(int g_i, int g_p, int g_x)
if (a & getv) g_sp->zvel += ((*(moveptr + 1) << 4) - g_sp->zvel) >> 1; if (a & getv) g_sp->zvel += ((*(moveptr + 1) << 4) - g_sp->zvel) >> 1;
if (a & dodgebullet) if (a & dodgebullet)
dodge(&hittype[g_i]); dodge(actor);
if (g_sp->picnum != APLAYER) if (g_sp->picnum != APLAYER)
alterang(a, &hittype[g_i], g_p); alterang(a, actor, g_p);
if (g_sp->xvel > -6 && g_sp->xvel < 6) g_sp->xvel = 0; if (g_sp->xvel > -6 && g_sp->xvel < 6) g_sp->xvel = 0;
a = badguy(g_sp); a = badguy(actor);
if (g_sp->xvel || g_sp->zvel) if (g_sp->xvel || g_sp->zvel)
{ {
@ -3882,7 +3881,7 @@ void move_r(int g_i, int g_p, int g_x)
{ {
if (g_sp->zvel > 0) if (g_sp->zvel > 0)
{ {
hittype[g_i].floorz = l = getflorzofslope(g_sp->sectnum, g_sp->x, g_sp->y); actor->floorz = l = getflorzofslope(g_sp->sectnum, g_sp->x, g_sp->y);
if (isRRRA()) if (isRRRA())
{ {
if (g_sp->z > (l - (28 << 8))) if (g_sp->z > (l - (28 << 8)))
@ -3896,7 +3895,7 @@ void move_r(int g_i, int g_p, int g_x)
} }
else else
{ {
hittype[g_i].ceilingz = l = getceilzofslope(g_sp->sectnum, g_sp->x, g_sp->y); actor->ceilingz = l = getceilzofslope(g_sp->sectnum, g_sp->x, g_sp->y);
if ((g_sp->z - l) < (50 << 8)) if ((g_sp->z - l) < (50 << 8))
{ {
g_sp->z = l + (50 << 8); g_sp->z = l + (50 << 8);
@ -3904,8 +3903,8 @@ void move_r(int g_i, int g_p, int g_x)
} }
} }
} }
if (g_sp->zvel > 0 && hittype[g_i].floorz < g_sp->z) if (g_sp->zvel > 0 && actor->floorz < g_sp->z)
g_sp->z = hittype[g_i].floorz; g_sp->z = actor->floorz;
if (g_sp->zvel < 0) if (g_sp->zvel < 0)
{ {
l = getceilzofslope(g_sp->sectnum, g_sp->x, g_sp->y); l = getceilzofslope(g_sp->sectnum, g_sp->x, g_sp->y);
@ -3917,8 +3916,8 @@ void move_r(int g_i, int g_p, int g_x)
} }
} }
else if (g_sp->picnum == APLAYER) else if (g_sp->picnum == APLAYER)
if ((g_sp->z - hittype[g_i].ceilingz) < (32 << 8)) if ((g_sp->z - actor->ceilingz) < (32 << 8))
g_sp->z = hittype[g_i].ceilingz + (32 << 8); g_sp->z = actor->ceilingz + (32 << 8);
daxvel = g_sp->xvel; daxvel = g_sp->xvel;
angdif = g_sp->ang; angdif = g_sp->ang;
@ -3946,14 +3945,14 @@ void move_r(int g_i, int g_p, int g_x)
(!isRRRA() && g_sp->picnum != DRONE && g_sp->picnum != SHARK && g_sp->picnum != UFO1_RR (!isRRRA() && g_sp->picnum != DRONE && g_sp->picnum != SHARK && g_sp->picnum != UFO1_RR
&& g_sp->picnum != UFO2 && g_sp->picnum != UFO3 && g_sp->picnum != UFO4 && g_sp->picnum != UFO5)) && g_sp->picnum != UFO2 && g_sp->picnum != UFO3 && g_sp->picnum != UFO4 && g_sp->picnum != UFO5))
{ {
if (hittype[g_i].bposz != g_sp->z || (ud.multimode < 2 && ud.player_skill < 2)) if (actor->bposz != g_sp->z || (ud.multimode < 2 && ud.player_skill < 2))
{ {
if ((g_t[0] & 1) || ps[g_p].actorsqu == &hittype[g_i]) return; if ((g_t[0] & 1) || ps[g_p].actorsqu == actor) return;
else daxvel <<= 1; else daxvel <<= 1;
} }
else else
{ {
if ((g_t[0] & 3) || ps[g_p].actorsqu == &hittype[g_i]) return; if ((g_t[0] & 3) || ps[g_p].actorsqu == actor) return;
else daxvel <<= 2; else daxvel <<= 2;
} }
} }
@ -3984,9 +3983,10 @@ void move_r(int g_i, int g_p, int g_x)
} }
} }
hittype[g_i].movflag = fi.movesprite(g_i, Collision coll;
actor->movflag = movesprite_ex(actor,
(daxvel * (sintable[(angdif + 512) & 2047])) >> 14, (daxvel * (sintable[(angdif + 512) & 2047])) >> 14,
(daxvel * (sintable[angdif & 2047])) >> 14, g_sp->zvel, CLIPMASK0); (daxvel * (sintable[angdif & 2047])) >> 14, g_sp->zvel, CLIPMASK0, coll);
} }
if (a) if (a)
@ -4005,11 +4005,11 @@ void move_r(int g_i, int g_p, int g_x)
else g_sp->shade += (sector[g_sp->sectnum].floorshade - g_sp->shade) >> 1; else g_sp->shade += (sector[g_sp->sectnum].floorshade - g_sp->shade) >> 1;
if (sector[g_sp->sectnum].floorpicnum == MIRROR) if (sector[g_sp->sectnum].floorpicnum == MIRROR)
deletesprite(g_i); deletesprite(actor);
} }
} }
void fakebubbaspawn(int g_i, int g_p) void fakebubbaspawn(DDukeActor *g_i, int g_p)
{ {
fakebubba_spawn++; fakebubba_spawn++;
switch (fakebubba_spawn) switch (fakebubba_spawn)
@ -4017,17 +4017,17 @@ void fakebubbaspawn(int g_i, int g_p)
default: default:
break; break;
case 1: case 1:
fi.spawn(g_i, PIG); spawn(g_i, PIG);
break; break;
case 2: case 2:
fi.spawn(g_i, MINION); spawn(g_i, MINION);
break; break;
case 3: case 3:
fi.spawn(g_i, CHEER); spawn(g_i, CHEER);
break; break;
case 4: case 4:
fi.spawn(g_i, VIXEN); spawn(g_i, VIXEN);
operateactivators(666, ps[g_p].i); operateactivators(666, ps[g_p].GetActor()->GetIndex());
break; break;
} }
} }
@ -4126,56 +4126,51 @@ void fall_r(int g_i, int g_p)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void destroyit(int g_i) void destroyit(DDukeActor *actor)
{ {
auto g_sp = &sprite[g_i];
spritetype* js;
int lotag, hitag; int lotag, hitag;
int k, jj;
int wi, wj; int wi, wj;
int spr; DDukeActor* spr;
int wallstart2, wallend2; int wallstart2, wallend2;
int sectnum; int sectnum;
int wallstart, wallend; int wallstart, wallend;
hitag = 0; hitag = 0;
SectIterator it1(g_sp->sectnum); DukeSectIterator it1(actor->s.sectnum);
while ((k = it1.NextIndex()) >= 0) while (auto a2 = it1.Next())
{ {
auto sj = &sprite[k]; if (a2->s.picnum == RRTILE63)
if (sj->picnum == RRTILE63)
{ {
lotag = sj->lotag; lotag = a2->s.lotag;
spr = k; spr = a2;
if (sj->hitag) if (a2->s.hitag)
hitag = sj->hitag; hitag = a2->s.hitag;
} }
} }
StatIterator it(STAT_DESTRUCT); DukeStatIterator it(STAT_DESTRUCT);
while ((jj = it.NextIndex()) >= 0) while (auto a2 = it.Next())
{ {
js = &sprite[jj]; int it_sect = a2->s.sectnum;
if (hitag) if (hitag && hitag == a2->s.hitag)
if (hitag == js->hitag) {
DukeSectIterator its(it_sect);
while (auto a3 = its.Next())
{ {
SectIterator it(js->sectnum); if (a3->s.picnum == DESTRUCTO)
while ((k = it.NextIndex()) >= 0)
{ {
if (sprite[k].picnum == DESTRUCTO) a3->picnum = SHOTSPARK1;
{ a3->extra = 1;
hittype[k].picnum = SHOTSPARK1;
hittype[k].extra = 1;
}
} }
} }
if (sprite[spr].sectnum != js->sectnum) }
if (lotag == js->lotag) if (spr->s.sectnum != it_sect)
if (lotag == a2->s.lotag)
{ {
sectnum = sprite[spr].sectnum; sectnum = spr->s.sectnum;
wallstart = sector[sectnum].wallptr; wallstart = sector[sectnum].wallptr;
wallend = wallstart + sector[sectnum].wallnum; wallend = wallstart + sector[sectnum].wallnum;
wallstart2 = sector[js->sectnum].wallptr; wallstart2 = sector[it_sect].wallptr;
wallend2 = wallstart2 + sector[js->sectnum].wallnum; wallend2 = wallstart2 + sector[it_sect].wallnum;
for (wi = wallstart, wj = wallstart2; wi < wallend; wi++, wj++) for (wi = wallstart, wj = wallstart2; wi < wallend; wi++, wj++)
{ {
wall[wi].picnum = wall[wj].picnum; wall[wi].picnum = wall[wj].picnum;
@ -4191,33 +4186,33 @@ void destroyit(int g_i)
wall[wall[wi].nextwall].cstat = 0; wall[wall[wi].nextwall].cstat = 0;
} }
} }
sector[sectnum].floorz = sector[js->sectnum].floorz; sector[sectnum].floorz = sector[it_sect].floorz;
sector[sectnum].ceilingz = sector[js->sectnum].ceilingz; sector[sectnum].ceilingz = sector[it_sect].ceilingz;
sector[sectnum].ceilingstat = sector[js->sectnum].ceilingstat; sector[sectnum].ceilingstat = sector[it_sect].ceilingstat;
sector[sectnum].floorstat = sector[js->sectnum].floorstat; sector[sectnum].floorstat = sector[it_sect].floorstat;
sector[sectnum].ceilingpicnum = sector[js->sectnum].ceilingpicnum; sector[sectnum].ceilingpicnum = sector[it_sect].ceilingpicnum;
sector[sectnum].ceilingheinum = sector[js->sectnum].ceilingheinum; sector[sectnum].ceilingheinum = sector[it_sect].ceilingheinum;
sector[sectnum].ceilingshade = sector[js->sectnum].ceilingshade; sector[sectnum].ceilingshade = sector[it_sect].ceilingshade;
sector[sectnum].ceilingpal = sector[js->sectnum].ceilingpal; sector[sectnum].ceilingpal = sector[it_sect].ceilingpal;
sector[sectnum].ceilingxpanning = sector[js->sectnum].ceilingxpanning; sector[sectnum].ceilingxpanning = sector[it_sect].ceilingxpanning;
sector[sectnum].ceilingypanning = sector[js->sectnum].ceilingypanning; sector[sectnum].ceilingypanning = sector[it_sect].ceilingypanning;
sector[sectnum].floorpicnum = sector[js->sectnum].floorpicnum; sector[sectnum].floorpicnum = sector[it_sect].floorpicnum;
sector[sectnum].floorheinum = sector[js->sectnum].floorheinum; sector[sectnum].floorheinum = sector[it_sect].floorheinum;
sector[sectnum].floorshade = sector[js->sectnum].floorshade; sector[sectnum].floorshade = sector[it_sect].floorshade;
sector[sectnum].floorpal = sector[js->sectnum].floorpal; sector[sectnum].floorpal = sector[it_sect].floorpal;
sector[sectnum].floorxpanning = sector[js->sectnum].floorxpanning; sector[sectnum].floorxpanning = sector[it_sect].floorxpanning;
sector[sectnum].floorypanning = sector[js->sectnum].floorypanning; sector[sectnum].floorypanning = sector[it_sect].floorypanning;
sector[sectnum].visibility = sector[js->sectnum].visibility; sector[sectnum].visibility = sector[it_sect].visibility;
sectorextra[sectnum] = sectorextra[js->sectnum]; // TRANSITIONAL: at least rename this. sectorextra[sectnum] = sectorextra[it_sect]; // TRANSITIONAL: at least rename this.
sector[sectnum].lotag = sector[js->sectnum].lotag; sector[sectnum].lotag = sector[it_sect].lotag;
sector[sectnum].hitag = sector[js->sectnum].hitag; sector[sectnum].hitag = sector[it_sect].hitag;
sector[sectnum].extra = sector[js->sectnum].extra; sector[sectnum].extra = sector[it_sect].extra;
} }
} }
it1.Reset(g_sp->sectnum); it1.Reset(actor->s.sectnum);
while ((k = it.NextIndex()) >= 0) while (auto a2 = it.Next())
{ {
switch (sprite[k].picnum) switch (a2->s.picnum)
{ {
case DESTRUCTO: case DESTRUCTO:
case RRTILE63: case RRTILE63:
@ -4226,7 +4221,7 @@ void destroyit(int g_i)
case COOT: case COOT:
break; break;
default: default:
deletesprite(k); deletesprite(a2);
break; break;
} }
} }

View file

@ -84,8 +84,8 @@ void respawnhitag_d(spritetype* g_sp);
void respawnhitag_r(spritetype* g_sp); void respawnhitag_r(spritetype* g_sp);
void checktimetosleep_d(int g_i); void checktimetosleep_d(int g_i);
void checktimetosleep_r(int g_i); void checktimetosleep_r(int g_i);
void move_d(int g_i, int g_p, int g_x); void move_d(DDukeActor* g_i, int g_p, int g_x);
void move_r(int g_i, int g_p, int g_x); void move_r(DDukeActor* g_i, int g_p, int g_x);
int spawn_d(int j, int pn); int spawn_d(int j, int pn);
int spawn_r(int j, int pn); int spawn_r(int j, int pn);
void incur_damage_d(struct player_struct* p); void incur_damage_d(struct player_struct* p);

View file

@ -99,7 +99,7 @@ struct Dispatcher
bool (*spawnweapondebris)(int picnum, int dnum); bool (*spawnweapondebris)(int picnum, int dnum);
void (*respawnhitag)(spritetype* g_sp); void (*respawnhitag)(spritetype* g_sp);
void (*checktimetosleep)(int g_i); void (*checktimetosleep)(int g_i);
void (*move)(int g_i, int g_p, int g_x); void (*move)(DDukeActor* g_i, int g_p, int g_x);
int (*spawn)(int j, int pn); int (*spawn)(int j, int pn);
// player // player

View file

@ -82,9 +82,9 @@ struct ParseState
int furthestcanseepoint(DDukeActor* i, DDukeActor* ts, int* dax, int* day); int furthestcanseepoint(DDukeActor* i, DDukeActor* ts, int* dax, int* day);
bool ifsquished(DDukeActor* i, int p); bool ifsquished(DDukeActor* i, int p);
void fakebubbaspawn(int g_i, int g_p); void fakebubbaspawn(DDukeActor* g_i, int g_p);
void tearitup(int sect); void tearitup(int sect);
void destroyit(int g_i); void destroyit(DDukeActor* actor);
void mamaspawn(int g_i); void mamaspawn(int g_i);
void forceplayerangle(int snum); void forceplayerangle(int snum);
@ -1631,7 +1631,7 @@ int ParseState::parse(void)
break; break;
case concmd_fakebubba: case concmd_fakebubba:
insptr++; insptr++;
fakebubbaspawn(g_i, g_p); fakebubbaspawn(g_ac, g_p);
break; break;
case concmd_rndmove: case concmd_rndmove:
@ -2006,7 +2006,7 @@ int ParseState::parse(void)
break; break;
case concmd_destroyit: case concmd_destroyit:
insptr++; insptr++;
destroyit(g_i); destroyit(g_ac);
break; break;
case concmd_iseat: // move out to player_r. case concmd_iseat: // move out to player_r.
insptr++; insptr++;
@ -3705,7 +3705,7 @@ void LoadActor(int i, int p, int x)
} }
else else
{ {
fi.move(i, p, x); fi.move(s.g_ac, p, x);
if (g_sp->statnum == 1) if (g_sp->statnum == 1)
{ {
@ -3816,7 +3816,7 @@ void execute(int i,int p,int x)
} }
else else
{ {
fi.move(i, p, x); fi.move(s.g_ac, p, x);
if (g_sp->statnum == STAT_ACTOR) if (g_sp->statnum == STAT_ACTOR)
{ {