mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- backported some changes from GZDoom:
- fixed: Floor and ceiling hugger projectiles should not be spawned with ONFLOORZ or ONCEILINGZ because that will make them ignore the actual floor height if it differs from the sector's floor. - fixed: Floor and ceiling huggers spawned by a player did not get their vertical velocity set to 0. - some sidenum related changes in inactive 3D floor code. SVN r1802 (trunk)
This commit is contained in:
parent
14a42bbada
commit
5bd22ca864
3 changed files with 11 additions and 13 deletions
|
@ -291,7 +291,7 @@ FTextureID DBaseDecal::StickToWall (side_t *wall, fixed_t x, fixed_t y, F3DFloor
|
|||
}
|
||||
else
|
||||
{
|
||||
tex = sides[ffloor->master->sidenum[0]].GetTexture(side_t::mid);
|
||||
tex = ffloor->master->sidedef[0]->GetTexture(side_t::mid);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -210,7 +210,7 @@ static int P_Set3DFloor(line_t * line, int param,int param2, int alpha)
|
|||
// if flooding is used the floor must be non-solid and is automatically made shootthrough and seethrough
|
||||
if ((param2&128) && !(flags & FF_SOLID)) flags |= FF_FLOOD|FF_SEETHROUGH|FF_SHOOTTHROUGH;
|
||||
if (param2&512) flags |= FF_FADEWALLS;
|
||||
FTextureID tex = sides[line->sidenum[0]].GetTexture(side_t::top);
|
||||
FTextureID tex = line->sidedef[0]->GetTexture(side_t::top);
|
||||
if (!tex.Exists() && alpha<255)
|
||||
{
|
||||
alpha=clamp(-tex.GetIndex(), 0, 255);
|
||||
|
@ -222,8 +222,8 @@ static int P_Set3DFloor(line_t * line, int param,int param2, int alpha)
|
|||
P_Add3DFloor(ss, sec, line, flags, alpha);
|
||||
}
|
||||
// To be 100% safe this should be done even if the alpha by texture value isn't used.
|
||||
if (!sides[line->sidenum[0]].GetTexture(side_t::top).isValid())
|
||||
sides[line->sidenum[0]].SetTexture(side_t::top, FNullTextureID());
|
||||
if (!line->sidedef[0]->GetTexture(side_t::top).isValid())
|
||||
line->sidedef[0]->SetTexture(side_t::top, FNullTextureID());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -5086,14 +5086,6 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z,
|
|||
|
||||
i = GetDefaultByType (type)->flags3;
|
||||
|
||||
if (i & MF3_FLOORHUGGER)
|
||||
{
|
||||
z = ONFLOORZ;
|
||||
}
|
||||
else if (i & MF3_CEILINGHUGGER)
|
||||
{
|
||||
z = ONCEILINGZ;
|
||||
}
|
||||
if (z != ONFLOORZ && z != ONCEILINGZ)
|
||||
{
|
||||
// Doom spawns missiles 4 units lower than hitscan attacks for players.
|
||||
|
@ -5127,7 +5119,13 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z,
|
|||
|
||||
MissileActor->velx = FixedMul (vx, speed);
|
||||
MissileActor->vely = FixedMul (vy, speed);
|
||||
MissileActor->velz = FixedMul (vz, speed);
|
||||
if (th->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER))
|
||||
{
|
||||
MissileActor->velz = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
MissileActor->velz = FixedMul (vz, speed);
|
||||
|
||||
if (MissileActor->flags4 & MF4_SPECTRAL)
|
||||
MissileActor->health = -1;
|
||||
|
|
Loading…
Reference in a new issue