- safety commit.

This commit is contained in:
Christoph Oelckers 2016-03-26 01:03:02 +01:00
parent e42b0171b3
commit 558e04cb99
4 changed files with 18 additions and 22 deletions

View file

@ -732,15 +732,15 @@ static void C_DrawNotifyText ()
if (!show_messages && NotifyStrings[i].PrintLevel != 128)
continue;
fixed_t alpha;
double alpha;
if (j < NOTIFYFADETIME)
{
alpha = OPAQUE * j / NOTIFYFADETIME;
alpha = 1. * j / NOTIFYFADETIME;
}
else
{
alpha = OPAQUE;
alpha = 1;
}
if (NotifyStrings[i].PrintLevel >= PRINTLEVELS)
@ -752,23 +752,23 @@ static void C_DrawNotifyText ()
{
if (!center)
screen->DrawText (SmallFont, color, 0, line, NotifyStrings[i].Text,
DTA_CleanNoMove, true, DTA_Alpha, alpha, TAG_DONE);
DTA_CleanNoMove, true, DTA_AlphaF, alpha, TAG_DONE);
else
screen->DrawText (SmallFont, color, (SCREENWIDTH -
SmallFont->StringWidth (NotifyStrings[i].Text)*CleanXfac)/2,
line, NotifyStrings[i].Text, DTA_CleanNoMove, true,
DTA_Alpha, alpha, TAG_DONE);
DTA_AlphaF, alpha, TAG_DONE);
}
else if (con_scaletext == 0)
{
if (!center)
screen->DrawText (SmallFont, color, 0, line, NotifyStrings[i].Text,
DTA_Alpha, alpha, TAG_DONE);
DTA_AlphaF, alpha, TAG_DONE);
else
screen->DrawText (SmallFont, color, (SCREENWIDTH -
SmallFont->StringWidth (NotifyStrings[i].Text))/2,
line, NotifyStrings[i].Text,
DTA_Alpha, alpha, TAG_DONE);
DTA_AlphaF, alpha, TAG_DONE);
}
else
{
@ -777,7 +777,7 @@ static void C_DrawNotifyText ()
DTA_VirtualWidth, screen->GetWidth() / 2,
DTA_VirtualHeight, screen->GetHeight() / 2,
DTA_KeepRatio, true,
DTA_Alpha, alpha, TAG_DONE);
DTA_AlphaF, alpha, TAG_DONE);
else
screen->DrawText (SmallFont, color, (screen->GetWidth() / 2 -
SmallFont->StringWidth (NotifyStrings[i].Text))/2,
@ -785,7 +785,7 @@ static void C_DrawNotifyText ()
DTA_VirtualWidth, screen->GetWidth() / 2,
DTA_VirtualHeight, screen->GetHeight() / 2,
DTA_KeepRatio, true,
DTA_Alpha, alpha, TAG_DONE);
DTA_AlphaF, alpha, TAG_DONE);
}
line += lineadv;
canskip = false;
@ -865,7 +865,7 @@ void C_DrawConsole (bool hw2d)
DTA_DestWidth, screen->GetWidth(),
DTA_DestHeight, screen->GetHeight(),
DTA_ColorOverlay, conshade,
DTA_Alpha, (hw2d && gamestate != GS_FULLCONSOLE) ? FLOAT2FIXED(con_alpha) : FRACUNIT,
DTA_AlphaF, (hw2d && gamestate != GS_FULLCONSOLE) ? (double)con_alpha : 1.,
DTA_Masked, false,
TAG_DONE);
if (conline && visheight < screen->GetHeight())

View file

@ -1340,7 +1340,7 @@ static int PatchSound (int soundNum)
else CHECKKEY ("Zero/One", info->singularity)
else CHECKKEY ("Value", info->priority)
else CHECKKEY ("Zero 1", info->link)
else CHECKKEY ("Neg. One 1", info->_f_pitch())
else CHECKKEY ("Neg. One 1", info->pitch)
else CHECKKEY ("Neg. One 2", info->volume)
else CHECKKEY ("Zero 2", info->data)
else CHECKKEY ("Zero 3", info->usefulness)

View file

@ -2366,19 +2366,15 @@ void Net_DoCommand (int type, BYTE **stream, int player)
{
FTraceResults trace;
angle_t ang = players[player].mo->_f_angle() >> ANGLETOFINESHIFT;
angle_t pitch = (angle_t)(players[player].mo->_f_pitch()) >> ANGLETOFINESHIFT;
fixed_t vx = FixedMul (finecosine[pitch], finecosine[ang]);
fixed_t vy = FixedMul (finecosine[pitch], finesine[ang]);
fixed_t vz = -finesine[pitch];
DAngle ang = players[player].mo->Angles.Yaw;
DAngle pitch = players[player].mo->Angles.Pitch;
double c = pitch.Cos();
DVector3 vec(c * ang.Cos(), c * ang.Sin(), -pitch.Sin);
s = ReadString (stream);
if (Trace (players[player].mo->_f_X(), players[player].mo->_f_Y(),
players[player].mo->_f_Top() - (players[player].mo->_f_height()>>2),
players[player].mo->Sector,
vx, vy, vz, 172*FRACUNIT, 0, ML_BLOCKEVERYTHING, players[player].mo,
trace, TRACE_NoSky))
if (Trace (players[player].mo->PosPlusZ(players[player].mo->Height/2), players[player].mo->Sector,
vec, 172., 0, ML_BLOCKEVERYTHING, players[player].mo, trace, TRACE_NoSky))
{
if (trace.HitType == TRACE_HitWall)
{

View file

@ -884,7 +884,7 @@ void ReadCompatibleUserInfo(FArchive &arc, userinfo_t &info)
BYTE team;
int aimdist, color, colorset, skin, gender;
bool neverswitch;
//fixed_t movebob, stillbob; These were never serialized!
//fxed_t movebob, stillbob; These were never serialized!
//int playerclass; "
info.Reset();