mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- clean out some stuff
This commit is contained in:
parent
b84158ecec
commit
712d28ff40
5 changed files with 9 additions and 16 deletions
|
@ -1133,7 +1133,9 @@ static inline void hit_set(HitInfoBase *hit, sectortype* sect, walltype* wal, DC
|
|||
hit->hitSector = sect;
|
||||
hit->hitWall = wal;
|
||||
hit->hitActor = actor;
|
||||
hit->set_int_hitpos(x, y, z);
|
||||
hit->hitpos.X = x * inttoworld;
|
||||
hit->hitpos.Y = y * inttoworld;
|
||||
hit->hitpos.Z = z * zinttoworld;
|
||||
}
|
||||
|
||||
static int32_t hitscan_hitsectcf=-1;
|
||||
|
@ -1212,7 +1214,8 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
|
|||
if (startsect == nullptr)
|
||||
return -1;
|
||||
|
||||
hitinfo. set_int_hitpos_xy(hitscangoal.X, hitscangoal.Y);
|
||||
hitinfo.hitpos.X = hitscangoal.X * inttoworld;
|
||||
hitinfo.hitpos.Y = hitscangoal.Y * inttoworld;
|
||||
|
||||
BFSSectorSearch search(startsect);
|
||||
while (auto sec = search.GetNext())
|
||||
|
@ -1282,10 +1285,7 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
|
|||
auto v = hitinfo.int_hitpos();
|
||||
if (try_facespr_intersect(actor, *sv, vx, vy, vz, &v, 0))
|
||||
{
|
||||
hitinfo.hitSector = sec;
|
||||
hitinfo.hitWall = nullptr;
|
||||
hitinfo.hitActor = actor;
|
||||
hitinfo.set_int_hitpos(v.X, v.Y, v.Z);
|
||||
hit_set(&hitinfo, sec, nullptr, actor, v.X, v.Y, v.Z);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -352,13 +352,6 @@ struct HitInfoBase
|
|||
return { int(hitpos.X * worldtoint), int(hitpos.Y * worldtoint), int(hitpos.Z * zworldtoint), };
|
||||
}
|
||||
|
||||
void set_int_hitpos(int x, int y, int z)
|
||||
{
|
||||
hitpos.X = x * inttoworld;
|
||||
hitpos.Y = y * inttoworld;
|
||||
hitpos.Z = z * zinttoworld;
|
||||
}
|
||||
|
||||
void set_int_hitpos_xy(int x, int y)
|
||||
{
|
||||
hitpos.X = x * inttoworld;
|
||||
|
|
|
@ -3039,7 +3039,7 @@ HORIZONLY:
|
|||
if (ud.clipping)
|
||||
{
|
||||
p->player_add_int_xy({ p->vel.X >> 14, p->vel.Y >> 14 });
|
||||
updatesector(p->player_int_pos().X, p->player_int_pos().Y, &p->cursector);
|
||||
updatesector(p->pos, &p->cursector);
|
||||
ChangeActorSect(pact, p->cursector);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -625,7 +625,7 @@ struct PLAYER
|
|||
DVector3 si; // save player interp position for PlayerSprite
|
||||
DAngle siang;
|
||||
|
||||
vec2_t vect, ovect, slide_vect; // these need floatification, but must be done together.
|
||||
vec2_t vect, ovect, slide_vect; // these need floatification, but must be done together. vect is in 14.18 format!
|
||||
int friction;
|
||||
int16_t slide_ang; // todo: floatify
|
||||
int slide_dec;
|
||||
|
|
|
@ -2001,7 +2001,7 @@ void DoPlayerMove(PLAYER* pp)
|
|||
pp->opos.XY() = pp->pos.XY();
|
||||
}
|
||||
pp->add_int_ppos_XY({ pp->vect.X >> 14, pp->vect.Y >> 14 });
|
||||
updatesector(pp->int_ppos().X, pp->int_ppos().Y, §);
|
||||
updatesector(pp->pos, §);
|
||||
if (sect != nullptr)
|
||||
pp->cursector = sect;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue