mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-05-30 00:41:19 +00:00
* Updated to ZDoom 4136:
- Fixed: spynext/prev were unreliable with player prediction. - Fixed: The changemap CCMD did not work for maps not defined by MAPINFO. - Fixed: When adding a forwardmove value, P_Bob() needs to do the same pitch-dependent scaling as P_ForwardThrust(). - Changed the "notrelevant" checks in R_RenderMaskedSegRange() to not include equality in their comparison operators. Fixes one map (http://forum.zdoom.org/viewtopic.php?f=2&t=34082); might break others. Maybe. [This does not concern the OpenGL renderer.] - Fixed: info CCMD listed bounce flags twice, under separate names. - Skip the MF2_PASSMOBJ height checks in PIT_CheckThing() for ripper missiles. - Fixed: Because P_OpenMapData() now reopens the containing file for the map, P_LoadGLNodes() needs a new check for if the map came from a regular wad. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1527 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
f8da6b2de2
commit
a6b89e2b6a
11 changed files with 46 additions and 28 deletions
|
@ -489,7 +489,7 @@ void G_ChangeLevel(const char *levelname, int position, int flags, int nextSkill
|
|||
}
|
||||
else if (strncmp(levelname, "enDSeQ", 6) != 0)
|
||||
{
|
||||
nextinfo = FindLevelInfo (levelname);
|
||||
nextinfo = FindLevelInfo (levelname, false);
|
||||
if (nextinfo != NULL)
|
||||
{
|
||||
level_info_t *nextredir = nextinfo->CheckLevelRedirect();
|
||||
|
@ -655,17 +655,14 @@ void G_DoCompleted (void)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (strncmp (nextlevel, "enDSeQ", 6) == 0)
|
||||
level_info_t *nextinfo = FindLevelInfo (nextlevel, false);
|
||||
if (nextinfo == NULL || strncmp (nextlevel, "enDSeQ", 6) == 0)
|
||||
{
|
||||
wminfo.next = nextlevel;
|
||||
wminfo.LName1 = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
|
||||
level_info_t *nextinfo = FindLevelInfo (nextlevel);
|
||||
wminfo.next = nextinfo->mapname;
|
||||
wminfo.LName1 = TexMan[TexMan.CheckForTexture(nextinfo->pname, FTexture::TEX_MiscPatch)];
|
||||
}
|
||||
|
|
|
@ -515,7 +515,7 @@ void G_InitLevelLocals (void);
|
|||
void G_AirControlChanged ();
|
||||
|
||||
cluster_info_t *FindClusterInfo (int cluster);
|
||||
level_info_t *FindLevelInfo (const char *mapname);
|
||||
level_info_t *FindLevelInfo (const char *mapname, bool allowdefault=true);
|
||||
level_info_t *FindLevelByNum (int num);
|
||||
level_info_t *CheckLevelRedirect (level_info_t *info);
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ static int FindWadLevelInfo (const char *name)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
level_info_t *FindLevelInfo (const char *mapname)
|
||||
level_info_t *FindLevelInfo (const char *mapname, bool allowdefault)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -90,7 +90,7 @@ level_info_t *FindLevelInfo (const char *mapname)
|
|||
{
|
||||
return &wadlevelinfos[i];
|
||||
}
|
||||
else
|
||||
else if (allowdefault)
|
||||
{
|
||||
if (TheDefaultLevelInfo.LevelName.IsEmpty())
|
||||
{
|
||||
|
@ -100,6 +100,7 @@ level_info_t *FindLevelInfo (const char *mapname)
|
|||
}
|
||||
return &TheDefaultLevelInfo;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -901,7 +901,7 @@ bool P_LoadGLNodes(MapData * map)
|
|||
char path[256];
|
||||
int li;
|
||||
int lumpfile = Wads.GetLumpFile(map->lumpnum);
|
||||
bool mapinwad = map->file == Wads.GetFileReader(lumpfile);
|
||||
bool mapinwad = map->InWad;
|
||||
FileReader * fr = map->file;
|
||||
FResourceFile * f_gwa = NULL;
|
||||
|
||||
|
|
|
@ -905,13 +905,17 @@ bool PIT_CheckThing (AActor *thing, FCheckPosition &tm)
|
|||
// you can use a scrolling floor to move scenery items underneath a bridge.
|
||||
if ((tm.thing->flags2 & MF2_PASSMOBJ || thing->flags4 & MF4_ACTLIKEBRIDGE) && !(i_compatflags & COMPATF_NO_PASSMOBJ))
|
||||
{ // check if a mobj passed over/under another object
|
||||
if (tm.thing->flags3 & thing->flags3 & MF3_DONTOVERLAP)
|
||||
{ // Some things prefer not to overlap each other, if possible
|
||||
return unblocking;
|
||||
}
|
||||
if ((tm.thing->z >= topz) || (tm.thing->z + tm.thing->height <= thing->z))
|
||||
if (!(tm.thing->flags & MF_MISSILE) ||
|
||||
!(tm.thing->flags2 & MF2_RIP) ||
|
||||
(thing->flags5 & MF5_DONTRIP) ||
|
||||
(tm.thing->flags6 & MF6_NOBOSSRIP) && (thing->flags2 & MF2_BOSS))
|
||||
{
|
||||
return true;
|
||||
if (tm.thing->flags3 & thing->flags3 & MF3_DONTOVERLAP)
|
||||
{ // Some things prefer not to overlap each other, if possible
|
||||
return unblocking;
|
||||
}
|
||||
if ((tm.thing->z >= topz) || (tm.thing->z + tm.thing->height <= thing->z))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2878,7 +2882,7 @@ extern FRandom pr_bounce;
|
|||
bool P_BounceActor (AActor *mo, AActor *BlockingMobj, bool ontop)
|
||||
{
|
||||
if (mo && BlockingMobj && ((mo->BounceFlags & BOUNCE_AllActors)
|
||||
|| ((mo->flags & MF_MISSILE) && (BlockingMobj->flags2 & MF2_REFLECTIVE))
|
||||
|| ((mo->flags & MF_MISSILE) && (!(mo->flags2 & MF2_RIP) || (BlockingMobj->flags5 & MF5_DONTRIP) || ((mo->flags6 & MF6_NOBOSSRIP) && (BlockingMobj->flags2 & MF2_BOSS))) && (BlockingMobj->flags2 & MF2_REFLECTIVE))
|
||||
|| ((BlockingMobj->player == NULL) && (!(BlockingMobj->flags3 & MF3_ISMONSTER)))
|
||||
))
|
||||
{
|
||||
|
|
|
@ -6100,9 +6100,9 @@ void PrintMiscActorInfo(AActor *query)
|
|||
Printf("\n\tflags6: %x", query->flags6);
|
||||
for (flagi = 0; flagi <= 31; flagi++)
|
||||
if (query->flags6 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags6));
|
||||
Printf("\nBounce style: %x\nBounce factors: f:%f, w:%f\nBounce flags: %x",
|
||||
Printf("\nBounce flags: %x\nBounce factors: f:%f, w:%f",
|
||||
query->BounceFlags, FIXED2FLOAT(query->bouncefactor),
|
||||
FIXED2FLOAT(query->wallbouncefactor), query->BounceFlags);
|
||||
FIXED2FLOAT(query->wallbouncefactor));
|
||||
/*for (flagi = 0; flagi < 31; flagi++)
|
||||
if (query->BounceFlags & 1<<flagi) Printf(" %s", flagnamesb[flagi]);*/
|
||||
Printf("\nRender style = %i:%s, alpha %f\nRender flags: %x",
|
||||
|
|
|
@ -304,6 +304,7 @@ MapData *P_OpenMapData(const char * mapname)
|
|||
// As such any special handling for other types of lumps is skipped.
|
||||
map->MapLumps[0].Reader = map->file = Wads.ReopenLumpNum(lump_name);
|
||||
map->Encrypted = Wads.IsEncryptedFile(lump_name);
|
||||
map->InWad = true;
|
||||
|
||||
if (map->Encrypted)
|
||||
{ // If it's encrypted, then it's a Blood file, presumably a map.
|
||||
|
|
|
@ -37,6 +37,7 @@ struct MapData
|
|||
bool HasBehavior;
|
||||
bool Encrypted;
|
||||
bool isText;
|
||||
bool InWad;
|
||||
int lumpnum;
|
||||
FileReader * file;
|
||||
FResourceFile * resource;
|
||||
|
@ -50,6 +51,7 @@ struct MapData
|
|||
HasBehavior = false;
|
||||
Encrypted = false;
|
||||
isText = false;
|
||||
InWad = false;
|
||||
}
|
||||
|
||||
~MapData()
|
||||
|
|
|
@ -1579,8 +1579,16 @@ void P_ForwardThrust (player_t *player, angle_t angle, fixed_t move)
|
|||
// reduced at a regular rate, even on ice (where the player coasts).
|
||||
//
|
||||
|
||||
void P_Bob (player_t *player, angle_t angle, fixed_t move)
|
||||
void P_Bob (player_t *player, angle_t angle, fixed_t move, bool forward)
|
||||
{
|
||||
if (forward
|
||||
&& (player->mo->waterlevel || (player->mo->flags & MF_NOGRAVITY))
|
||||
&& player->mo->pitch != 0)
|
||||
{
|
||||
angle_t pitch = (angle_t)player->mo->pitch >> ANGLETOFINESHIFT;
|
||||
move = FixedMul (move, finecosine[pitch]);
|
||||
}
|
||||
|
||||
angle >>= ANGLETOFINESHIFT;
|
||||
|
||||
player->velx += FixedMul(move, finecosine[angle]);
|
||||
|
@ -1773,8 +1781,8 @@ void P_MovePlayer (player_t *player)
|
|||
fm = FixedMul (fm, player->mo->Speed);
|
||||
sm = FixedMul (sm, player->mo->Speed);
|
||||
|
||||
// When crouching speed and bobbing have to be reduced
|
||||
if (player->morphTics==0 && player->crouchfactor != FRACUNIT)
|
||||
// When crouching, speed and bobbing have to be reduced
|
||||
if (player->morphTics == 0 && player->crouchfactor != FRACUNIT)
|
||||
{
|
||||
fm = FixedMul(fm, player->crouchfactor);
|
||||
sm = FixedMul(sm, player->crouchfactor);
|
||||
|
@ -1786,12 +1794,12 @@ void P_MovePlayer (player_t *player)
|
|||
|
||||
if (forwardmove)
|
||||
{
|
||||
P_Bob (player, mo->angle, (cmd->ucmd.forwardmove * bobfactor) >> 8);
|
||||
P_Bob (player, mo->angle, (cmd->ucmd.forwardmove * bobfactor) >> 8, true);
|
||||
P_ForwardThrust (player, mo->angle, forwardmove);
|
||||
}
|
||||
if (sidemove)
|
||||
{
|
||||
P_Bob (player, mo->angle-ANG90, (cmd->ucmd.sidemove * bobfactor) >> 8);
|
||||
P_Bob (player, mo->angle-ANG90, (cmd->ucmd.sidemove * bobfactor) >> 8, false);
|
||||
P_SideThrust (player, mo->angle, sidemove);
|
||||
}
|
||||
|
||||
|
@ -2569,9 +2577,14 @@ void P_UnPredictPlayer ()
|
|||
if (player->cheats & CF_PREDICTING)
|
||||
{
|
||||
AActor *act = player->mo;
|
||||
AActor *savedcamera = player->camera;
|
||||
|
||||
*player = PredictionPlayerBackup;
|
||||
|
||||
// Restore the camera instead of using the backup's copy, because spynext/prev
|
||||
// could cause it to change during prediction.
|
||||
player->camera = savedcamera;
|
||||
|
||||
act->UnlinkFromWorld ();
|
||||
memcpy (&act->x, PredictionActorBackup, sizeof(AActor)-((BYTE *)&act->x-(BYTE *)act));
|
||||
|
||||
|
|
|
@ -378,12 +378,12 @@ void R_RenderMaskedSegRange (drawseg_t *ds, int x1, int x2)
|
|||
goto clearfog;
|
||||
}
|
||||
|
||||
if ((fake3D & FAKE3D_CLIPBOTTOM) && textop <= sclipBottom - viewz)
|
||||
if ((fake3D & FAKE3D_CLIPBOTTOM) && textop < sclipBottom - viewz)
|
||||
{
|
||||
notrelevant = true;
|
||||
goto clearfog;
|
||||
}
|
||||
if ((fake3D & FAKE3D_CLIPTOP) && textop - texheight >= sclipTop - viewz)
|
||||
if ((fake3D & FAKE3D_CLIPTOP) && textop - texheight > sclipTop - viewz)
|
||||
{
|
||||
notrelevant = true;
|
||||
goto clearfog;
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
// This file was automatically generated by the
|
||||
// updaterevision tool. Do not edit by hand.
|
||||
|
||||
#define ZD_SVN_REVISION_STRING "4129"
|
||||
#define ZD_SVN_REVISION_NUMBER 4129
|
||||
#define ZD_SVN_REVISION_STRING "4136"
|
||||
#define ZD_SVN_REVISION_NUMBER 4136
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue