- lotsofglass - final function in spawn.cpp

This commit is contained in:
Christoph Oelckers 2020-11-02 22:29:02 +01:00
parent 4add2b5839
commit 24cfd841f2
3 changed files with 5 additions and 10 deletions

View file

@ -227,9 +227,4 @@ inline void neartag(int32_t xs, int32_t ys, int32_t zs, int16_t sectnum, int16
*neartagsprite = nts == -1 ? nullptr : &hittype[nts];
}
inline void lotsofglass(DDukeActor *act, int wallnum, int cnt)
{
lotsofglass(act ? act->GetIndex() : -1, wallnum, cnt);
}
END_DUKE_NS

View file

@ -179,7 +179,7 @@ DDukeActor* EGS(short whatsect, int s_x, int s_y, int s_z, short s_pn, signed ch
void ceilingglass(DDukeActor* snum, int sectnum, int cnt);
void spriteglass(DDukeActor* snum, int cnt);
void lotsofcolourglass(DDukeActor* snum, int wallNum, int cnt);
void lotsofglass(int snum, int wallnum, int cnt);
void lotsofglass(DDukeActor* snum, int wallnum, int cnt);
void checkplayerhurt_d(struct player_struct* p, const Collision& coll);
void checkplayerhurt_r(struct player_struct* p, const Collision& coll);

View file

@ -530,7 +530,7 @@ void initcrane(DDukeActor* actj, DDukeActor* acti, int CRANEPOLE)
}
tempwallptr += 3;
sp->owner = -1;
acti->SetOwner(nullptr);
sp->extra = 8;
changespritestat(acti, STAT_STANDABLE);
}
@ -1107,11 +1107,11 @@ void spawneffector(DDukeActor* actor)
//
//---------------------------------------------------------------------------
void lotsofglass(int i, int wallnum, int n)
void lotsofglass(DDukeActor *actor, int wallnum, int n)
{
int j, xv, yv, z, x1, y1, a;
short sect;
auto sp = &sprite[i];
auto sp = &actor->s;
sect = -1;
@ -1151,7 +1151,7 @@ void lotsofglass(int i, int wallnum, int n)
if (z < -(32 << 8) || z >(32 << 8))
z = sp->z - (32 << 8) + (krand() & ((64 << 8) - 1));
a = sp->ang - 1024;
EGS(sp->sectnum, x1, y1, z, TILE_GLASSPIECES + (j % 3), -32, 36, 36, a, 32 + (krand() & 63), -(krand() & 1023), &hittype[i], 5);
EGS(sp->sectnum, x1, y1, z, TILE_GLASSPIECES + (j % 3), -32, 36, 36, a, 32 + (krand() & 63), -(krand() & 1023), actor, 5);
}
}
}