mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- use ints in hitscan wrapper as well.
This commit is contained in:
parent
de7a06bea4
commit
f95af3368b
5 changed files with 19 additions and 17 deletions
|
@ -5105,7 +5105,7 @@ int dodge(DDukeActor* actor)
|
||||||
int furthestangle(DDukeActor *actor, int angs)
|
int furthestangle(DDukeActor *actor, int angs)
|
||||||
{
|
{
|
||||||
auto s = actor->s;
|
auto s = actor->s;
|
||||||
short j, hitsect, hitwall, furthest_angle, angincs;
|
int j, hitsect, hitwall, furthest_angle, angincs;
|
||||||
int hx, hy, hz, d, greatestd;
|
int hx, hy, hz, d, greatestd;
|
||||||
DDukeActor* dd;
|
DDukeActor* dd;
|
||||||
|
|
||||||
|
@ -5139,7 +5139,7 @@ int furthestangle(DDukeActor *actor, int angs)
|
||||||
int furthestcanseepoint(DDukeActor *actor, DDukeActor* tosee, int* dax, int* day)
|
int furthestcanseepoint(DDukeActor *actor, DDukeActor* tosee, int* dax, int* day)
|
||||||
{
|
{
|
||||||
auto s = actor->s;
|
auto s = actor->s;
|
||||||
short j, hitsect, hitwall, angincs;
|
int j, hitsect, hitwall, angincs;
|
||||||
int hx, hy, hz, d, da;//, d, cd, ca,tempx,tempy,cx,cy;
|
int hx, hy, hz, d, da;//, d, cd, ca,tempx,tempy,cx,cy;
|
||||||
DDukeActor* dd;
|
DDukeActor* dd;
|
||||||
|
|
||||||
|
|
|
@ -196,11 +196,13 @@ inline void getzrange_ex(int x, int y, int z, int16_t sectnum, int32_t* ceilz, C
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int hitscan(int x, int y, int z, int16_t sectnum, int32_t vx, int32_t vy, int32_t vz,
|
inline int hitscan(int x, int y, int z, int16_t sectnum, int32_t vx, int32_t vy, int32_t vz,
|
||||||
short* hitsect, short* hitwall, DDukeActor** hitspr, int* hitx, int* hity, int* hitz, uint32_t cliptype)
|
int* hitsect, int* hitwall, DDukeActor** hitspr, int* hitx, int* hity, int* hitz, uint32_t cliptype)
|
||||||
{
|
{
|
||||||
short hitsprt;
|
short hitsprt, hitsct, hitwal;
|
||||||
int res = ::hitscan(x, y, z, sectnum, vx, vy, vz, hitsect, hitwall, &hitsprt, hitx, hity, hitz, cliptype);
|
int res = ::hitscan(x, y, z, sectnum, vx, vy, vz, &hitsct, &hitwal, &hitsprt, hitx, hity, hitz, cliptype);
|
||||||
if (hitspr) *hitspr = hitsprt == -1 ? nullptr : &hittype[hitsprt];
|
if (hitspr) *hitspr = hitsprt == -1 ? nullptr : &hittype[hitsprt];
|
||||||
|
if (hitsect) *hitsect = hitsct;
|
||||||
|
if (hitwall) *hitwall = hitwal;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -170,8 +170,8 @@ int hits(DDukeActor* actor)
|
||||||
{
|
{
|
||||||
auto sp = actor->s;
|
auto sp = actor->s;
|
||||||
int sx, sy, sz;
|
int sx, sy, sz;
|
||||||
short sect;
|
int sect;
|
||||||
short hw;
|
int hw;
|
||||||
int zoff;
|
int zoff;
|
||||||
DDukeActor* d;
|
DDukeActor* d;
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ int hitasprite(DDukeActor* actor, DDukeActor** hitsp)
|
||||||
{
|
{
|
||||||
auto sp = actor->s;
|
auto sp = actor->s;
|
||||||
int sx, sy, sz, zoff;
|
int sx, sy, sz, zoff;
|
||||||
short sect, hw;
|
int sect, hw;
|
||||||
|
|
||||||
if (badguy(actor))
|
if (badguy(actor))
|
||||||
zoff = (42 << 8);
|
zoff = (42 << 8);
|
||||||
|
@ -217,7 +217,7 @@ int hitasprite(DDukeActor* actor, DDukeActor** hitsp)
|
||||||
int hitawall(struct player_struct* p, int* hitw)
|
int hitawall(struct player_struct* p, int* hitw)
|
||||||
{
|
{
|
||||||
int sx, sy, sz;
|
int sx, sy, sz;
|
||||||
short sect, hitw1;
|
int sect, hitw1;
|
||||||
DDukeActor* d;
|
DDukeActor* d;
|
||||||
|
|
||||||
hitscan(p->pos.x, p->pos.y, p->pos.z, p->cursectnum,
|
hitscan(p->pos.x, p->pos.y, p->pos.z, p->cursectnum,
|
||||||
|
@ -1006,7 +1006,7 @@ void shootbloodsplat(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i
|
||||||
spritetype* const s = actor->s;
|
spritetype* const s = actor->s;
|
||||||
int sect = s->sectnum;
|
int sect = s->sectnum;
|
||||||
int zvel;
|
int zvel;
|
||||||
short hitsect, hitwall;
|
int hitsect, hitwall;
|
||||||
int hitx, hity, hitz;
|
int hitx, hity, hitz;
|
||||||
DDukeActor* d;
|
DDukeActor* d;
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ static void shootknee(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
||||||
auto s = actor->s;
|
auto s = actor->s;
|
||||||
int sect = s->sectnum;
|
int sect = s->sectnum;
|
||||||
int zvel;
|
int zvel;
|
||||||
short hitsect, hitwall;
|
int hitsect, hitwall;
|
||||||
int hitx, hity, hitz;
|
int hitx, hity, hitz;
|
||||||
DDukeActor* hitsprt;
|
DDukeActor* hitsprt;
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
|
||||||
auto s = actor->s;
|
auto s = actor->s;
|
||||||
int sect = s->sectnum;
|
int sect = s->sectnum;
|
||||||
int zvel;
|
int zvel;
|
||||||
short hitsect, hitwall;
|
int hitsect, hitwall;
|
||||||
int hitx, hity, hitz;
|
int hitx, hity, hitz;
|
||||||
DDukeActor* hitact;
|
DDukeActor* hitact;
|
||||||
|
|
||||||
|
@ -841,7 +841,7 @@ static void shootlaser(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
||||||
spritetype* const s = actor->s;
|
spritetype* const s = actor->s;
|
||||||
int sect = s->sectnum;
|
int sect = s->sectnum;
|
||||||
int zvel;
|
int zvel;
|
||||||
short hitsect, hitwall, j;
|
int hitsect, hitwall, j;
|
||||||
int hitx, hity, hitz;
|
int hitx, hity, hitz;
|
||||||
DDukeActor* hitsprt;
|
DDukeActor* hitsprt;
|
||||||
|
|
||||||
|
@ -912,7 +912,7 @@ static void shootgrowspark(DDukeActor* actor, int p, int sx, int sy, int sz, int
|
||||||
auto s = actor->s;
|
auto s = actor->s;
|
||||||
int sect = s->sectnum;
|
int sect = s->sectnum;
|
||||||
int zvel;
|
int zvel;
|
||||||
short hitsect, hitwall, k;
|
int hitsect, hitwall, k;
|
||||||
int hitx, hity, hitz;
|
int hitx, hity, hitz;
|
||||||
DDukeActor* hitsprt;
|
DDukeActor* hitsprt;
|
||||||
|
|
||||||
|
@ -2002,7 +2002,7 @@ int operateTripbomb(int snum)
|
||||||
auto p = &ps[snum];
|
auto p = &ps[snum];
|
||||||
|
|
||||||
int sx, sy, sz;
|
int sx, sy, sz;
|
||||||
short sect, hw;
|
int sect, hw;
|
||||||
DDukeActor* hitsprt;
|
DDukeActor* hitsprt;
|
||||||
|
|
||||||
hitscan(p->pos.x, p->pos.y, p->pos.z,
|
hitscan(p->pos.x, p->pos.y, p->pos.z,
|
||||||
|
|
|
@ -88,7 +88,7 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
|
||||||
spritetype* const s = actor->s;
|
spritetype* const s = actor->s;
|
||||||
int sect = s->sectnum;
|
int sect = s->sectnum;
|
||||||
int zvel;
|
int zvel;
|
||||||
short hitsect, hitwall;
|
int hitsect, hitwall;
|
||||||
int hitx, hity, hitz;
|
int hitx, hity, hitz;
|
||||||
DDukeActor* hitsprt;
|
DDukeActor* hitsprt;
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
|
||||||
auto s = actor->s;
|
auto s = actor->s;
|
||||||
int sect = s->sectnum;
|
int sect = s->sectnum;
|
||||||
int zvel;
|
int zvel;
|
||||||
short hitsect, hitwall;
|
int hitsect, hitwall;
|
||||||
int hitx, hity, hitz;
|
int hitx, hity, hitz;
|
||||||
DDukeActor* hitsprt;
|
DDukeActor* hitsprt;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue