- fixed: P_RailAttack did not make adjustments for the shooter's floorclip.

This commit is contained in:
Christoph Oelckers 2017-01-21 10:55:19 +01:00
parent 5158b1c337
commit 19df603f92
2 changed files with 7 additions and 1 deletions

View file

@ -432,10 +432,16 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
StatusBar->Destroy(); StatusBar->Destroy();
StatusBar = NULL; StatusBar = NULL;
} }
auto cls = PClass::FindClass("DoomStatusBar");
if (bTitleLevel) if (bTitleLevel)
{ {
StatusBar = new DBaseStatusBar (0); StatusBar = new DBaseStatusBar (0);
} }
else if (cls && gameinfo.gametype == GAME_Doom)
{
StatusBar = (DBaseStatusBar*)cls->CreateNew();
}
else if (SBarInfoScript[SCRIPT_CUSTOM] != NULL) else if (SBarInfoScript[SCRIPT_CUSTOM] != NULL)
{ {
int cstype = SBarInfoScript[SCRIPT_CUSTOM]->GetGameType(); int cstype = SBarInfoScript[SCRIPT_CUSTOM]->GetGameType();

View file

@ -5011,7 +5011,7 @@ void P_RailAttack(FRailParams *p)
DAngle angle = source->Angles.Yaw + p->angleoffset; DAngle angle = source->Angles.Yaw + p->angleoffset;
DVector3 vec(DRotator(-pitch, angle, angle)); DVector3 vec(DRotator(-pitch, angle, angle));
double shootz = source->Center() - source->FloatSpeed + p->offset_z; double shootz = source->Center() - source->FloatSpeed + p->offset_z - source->Floorclip;
if (!(p->flags & RAF_CENTERZ)) if (!(p->flags & RAF_CENTERZ))
{ {