mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
- safety commit.
This commit is contained in:
parent
e42b0171b3
commit
558e04cb99
4 changed files with 18 additions and 22 deletions
|
@ -732,15 +732,15 @@ static void C_DrawNotifyText ()
|
||||||
if (!show_messages && NotifyStrings[i].PrintLevel != 128)
|
if (!show_messages && NotifyStrings[i].PrintLevel != 128)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
fixed_t alpha;
|
double alpha;
|
||||||
|
|
||||||
if (j < NOTIFYFADETIME)
|
if (j < NOTIFYFADETIME)
|
||||||
{
|
{
|
||||||
alpha = OPAQUE * j / NOTIFYFADETIME;
|
alpha = 1. * j / NOTIFYFADETIME;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alpha = OPAQUE;
|
alpha = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NotifyStrings[i].PrintLevel >= PRINTLEVELS)
|
if (NotifyStrings[i].PrintLevel >= PRINTLEVELS)
|
||||||
|
@ -752,23 +752,23 @@ static void C_DrawNotifyText ()
|
||||||
{
|
{
|
||||||
if (!center)
|
if (!center)
|
||||||
screen->DrawText (SmallFont, color, 0, line, NotifyStrings[i].Text,
|
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
|
else
|
||||||
screen->DrawText (SmallFont, color, (SCREENWIDTH -
|
screen->DrawText (SmallFont, color, (SCREENWIDTH -
|
||||||
SmallFont->StringWidth (NotifyStrings[i].Text)*CleanXfac)/2,
|
SmallFont->StringWidth (NotifyStrings[i].Text)*CleanXfac)/2,
|
||||||
line, NotifyStrings[i].Text, DTA_CleanNoMove, true,
|
line, NotifyStrings[i].Text, DTA_CleanNoMove, true,
|
||||||
DTA_Alpha, alpha, TAG_DONE);
|
DTA_AlphaF, alpha, TAG_DONE);
|
||||||
}
|
}
|
||||||
else if (con_scaletext == 0)
|
else if (con_scaletext == 0)
|
||||||
{
|
{
|
||||||
if (!center)
|
if (!center)
|
||||||
screen->DrawText (SmallFont, color, 0, line, NotifyStrings[i].Text,
|
screen->DrawText (SmallFont, color, 0, line, NotifyStrings[i].Text,
|
||||||
DTA_Alpha, alpha, TAG_DONE);
|
DTA_AlphaF, alpha, TAG_DONE);
|
||||||
else
|
else
|
||||||
screen->DrawText (SmallFont, color, (SCREENWIDTH -
|
screen->DrawText (SmallFont, color, (SCREENWIDTH -
|
||||||
SmallFont->StringWidth (NotifyStrings[i].Text))/2,
|
SmallFont->StringWidth (NotifyStrings[i].Text))/2,
|
||||||
line, NotifyStrings[i].Text,
|
line, NotifyStrings[i].Text,
|
||||||
DTA_Alpha, alpha, TAG_DONE);
|
DTA_AlphaF, alpha, TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -777,7 +777,7 @@ static void C_DrawNotifyText ()
|
||||||
DTA_VirtualWidth, screen->GetWidth() / 2,
|
DTA_VirtualWidth, screen->GetWidth() / 2,
|
||||||
DTA_VirtualHeight, screen->GetHeight() / 2,
|
DTA_VirtualHeight, screen->GetHeight() / 2,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_Alpha, alpha, TAG_DONE);
|
DTA_AlphaF, alpha, TAG_DONE);
|
||||||
else
|
else
|
||||||
screen->DrawText (SmallFont, color, (screen->GetWidth() / 2 -
|
screen->DrawText (SmallFont, color, (screen->GetWidth() / 2 -
|
||||||
SmallFont->StringWidth (NotifyStrings[i].Text))/2,
|
SmallFont->StringWidth (NotifyStrings[i].Text))/2,
|
||||||
|
@ -785,7 +785,7 @@ static void C_DrawNotifyText ()
|
||||||
DTA_VirtualWidth, screen->GetWidth() / 2,
|
DTA_VirtualWidth, screen->GetWidth() / 2,
|
||||||
DTA_VirtualHeight, screen->GetHeight() / 2,
|
DTA_VirtualHeight, screen->GetHeight() / 2,
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_Alpha, alpha, TAG_DONE);
|
DTA_AlphaF, alpha, TAG_DONE);
|
||||||
}
|
}
|
||||||
line += lineadv;
|
line += lineadv;
|
||||||
canskip = false;
|
canskip = false;
|
||||||
|
@ -865,7 +865,7 @@ void C_DrawConsole (bool hw2d)
|
||||||
DTA_DestWidth, screen->GetWidth(),
|
DTA_DestWidth, screen->GetWidth(),
|
||||||
DTA_DestHeight, screen->GetHeight(),
|
DTA_DestHeight, screen->GetHeight(),
|
||||||
DTA_ColorOverlay, conshade,
|
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,
|
DTA_Masked, false,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
if (conline && visheight < screen->GetHeight())
|
if (conline && visheight < screen->GetHeight())
|
||||||
|
|
|
@ -1340,7 +1340,7 @@ static int PatchSound (int soundNum)
|
||||||
else CHECKKEY ("Zero/One", info->singularity)
|
else CHECKKEY ("Zero/One", info->singularity)
|
||||||
else CHECKKEY ("Value", info->priority)
|
else CHECKKEY ("Value", info->priority)
|
||||||
else CHECKKEY ("Zero 1", info->link)
|
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 ("Neg. One 2", info->volume)
|
||||||
else CHECKKEY ("Zero 2", info->data)
|
else CHECKKEY ("Zero 2", info->data)
|
||||||
else CHECKKEY ("Zero 3", info->usefulness)
|
else CHECKKEY ("Zero 3", info->usefulness)
|
||||||
|
|
|
@ -2366,19 +2366,15 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
||||||
{
|
{
|
||||||
FTraceResults trace;
|
FTraceResults trace;
|
||||||
|
|
||||||
angle_t ang = players[player].mo->_f_angle() >> ANGLETOFINESHIFT;
|
DAngle ang = players[player].mo->Angles.Yaw;
|
||||||
angle_t pitch = (angle_t)(players[player].mo->_f_pitch()) >> ANGLETOFINESHIFT;
|
DAngle pitch = players[player].mo->Angles.Pitch;
|
||||||
fixed_t vx = FixedMul (finecosine[pitch], finecosine[ang]);
|
double c = pitch.Cos();
|
||||||
fixed_t vy = FixedMul (finecosine[pitch], finesine[ang]);
|
DVector3 vec(c * ang.Cos(), c * ang.Sin(), -pitch.Sin);
|
||||||
fixed_t vz = -finesine[pitch];
|
|
||||||
|
|
||||||
s = ReadString (stream);
|
s = ReadString (stream);
|
||||||
|
|
||||||
if (Trace (players[player].mo->_f_X(), players[player].mo->_f_Y(),
|
if (Trace (players[player].mo->PosPlusZ(players[player].mo->Height/2), players[player].mo->Sector,
|
||||||
players[player].mo->_f_Top() - (players[player].mo->_f_height()>>2),
|
vec, 172., 0, ML_BLOCKEVERYTHING, players[player].mo, trace, TRACE_NoSky))
|
||||||
players[player].mo->Sector,
|
|
||||||
vx, vy, vz, 172*FRACUNIT, 0, ML_BLOCKEVERYTHING, players[player].mo,
|
|
||||||
trace, TRACE_NoSky))
|
|
||||||
{
|
{
|
||||||
if (trace.HitType == TRACE_HitWall)
|
if (trace.HitType == TRACE_HitWall)
|
||||||
{
|
{
|
||||||
|
|
|
@ -884,7 +884,7 @@ void ReadCompatibleUserInfo(FArchive &arc, userinfo_t &info)
|
||||||
BYTE team;
|
BYTE team;
|
||||||
int aimdist, color, colorset, skin, gender;
|
int aimdist, color, colorset, skin, gender;
|
||||||
bool neverswitch;
|
bool neverswitch;
|
||||||
//fixed_t movebob, stillbob; These were never serialized!
|
//fxed_t movebob, stillbob; These were never serialized!
|
||||||
//int playerclass; "
|
//int playerclass; "
|
||||||
|
|
||||||
info.Reset();
|
info.Reset();
|
||||||
|
|
Loading…
Reference in a new issue