mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +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
|
else
|
||||||
{
|
{
|
||||||
tex = sides[ffloor->master->sidenum[0]].GetTexture(side_t::mid);
|
tex = ffloor->master->sidedef[0]->GetTexture(side_t::mid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#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 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&128) && !(flags & FF_SOLID)) flags |= FF_FLOOD|FF_SEETHROUGH|FF_SHOOTTHROUGH;
|
||||||
if (param2&512) flags |= FF_FADEWALLS;
|
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)
|
if (!tex.Exists() && alpha<255)
|
||||||
{
|
{
|
||||||
alpha=clamp(-tex.GetIndex(), 0, 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);
|
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.
|
// 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())
|
if (!line->sidedef[0]->GetTexture(side_t::top).isValid())
|
||||||
sides[line->sidenum[0]].SetTexture(side_t::top, FNullTextureID());
|
line->sidedef[0]->SetTexture(side_t::top, FNullTextureID());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5086,14 +5086,6 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z,
|
||||||
|
|
||||||
i = GetDefaultByType (type)->flags3;
|
i = GetDefaultByType (type)->flags3;
|
||||||
|
|
||||||
if (i & MF3_FLOORHUGGER)
|
|
||||||
{
|
|
||||||
z = ONFLOORZ;
|
|
||||||
}
|
|
||||||
else if (i & MF3_CEILINGHUGGER)
|
|
||||||
{
|
|
||||||
z = ONCEILINGZ;
|
|
||||||
}
|
|
||||||
if (z != ONFLOORZ && z != ONCEILINGZ)
|
if (z != ONFLOORZ && z != ONCEILINGZ)
|
||||||
{
|
{
|
||||||
// Doom spawns missiles 4 units lower than hitscan attacks for players.
|
// Doom spawns missiles 4 units lower than hitscan attacks for players.
|
||||||
|
@ -5127,6 +5119,12 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z,
|
||||||
|
|
||||||
MissileActor->velx = FixedMul (vx, speed);
|
MissileActor->velx = FixedMul (vx, speed);
|
||||||
MissileActor->vely = FixedMul (vy, speed);
|
MissileActor->vely = FixedMul (vy, speed);
|
||||||
|
if (th->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER))
|
||||||
|
{
|
||||||
|
MissileActor->velz = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
MissileActor->velz = FixedMul (vz, speed);
|
MissileActor->velz = FixedMul (vz, speed);
|
||||||
|
|
||||||
if (MissileActor->flags4 & MF4_SPECTRAL)
|
if (MissileActor->flags4 & MF4_SPECTRAL)
|
||||||
|
|
Loading…
Reference in a new issue