mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-24 12:51:09 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
aad509c800
11 changed files with 81 additions and 15 deletions
|
@ -367,7 +367,7 @@ int FIWadManager::CheckIWAD (const char *doomwaddir, WadStuff *wads)
|
|||
// Under UNIX OSes, the search path is:
|
||||
// 1. Current directory
|
||||
// 2. $DOOMWADDIR
|
||||
// 3. $HOME/.zdoom
|
||||
// 3. $HOME/.config/zdoom
|
||||
// 4. The share directory defined at compile time (/usr/local/share/zdoom)
|
||||
//
|
||||
// The search path can be altered by editing the IWADSearch.Directories
|
||||
|
@ -516,9 +516,19 @@ int FIWadManager::IdentifyVersion (TArray<FString> &wadfiles, const char *iwad,
|
|||
I_FatalError ("Cannot find a game IWAD (doom.wad, doom2.wad, heretic.wad, etc.).\n"
|
||||
"Did you install ZDoom properly? You can do either of the following:\n"
|
||||
"\n"
|
||||
#if defined(_WIN32)
|
||||
"1. Place one or more of these wads in the same directory as ZDoom.\n"
|
||||
"2. Edit your zdoom-username.ini and add the directories of your iwads\n"
|
||||
"to the list beneath [IWADSearch.Directories]");
|
||||
#elif defined(__APPLE__)
|
||||
"1. Place one or more of these wads in ~/Library/Application Support/zdoom/\n"
|
||||
"2. Edit your ~/Library/Preferences/zdoom.ini and add the directories\n"
|
||||
"of your iwads to the list beneath [IWADSearch.Directories]");
|
||||
#else
|
||||
"1. Place one or more of these wads in ~/.config/zdoom/.\n"
|
||||
"2. Edit your ~/.config/zdoom/zdoom.ini and add the directories of your\n"
|
||||
"iwads to the list beneath [IWADSearch.Directories]");
|
||||
#endif
|
||||
}
|
||||
|
||||
pickwad = 0;
|
||||
|
|
|
@ -1048,3 +1048,14 @@ CCMD (playerinfo)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
userinfo_t::~userinfo_t()
|
||||
{
|
||||
TMapIterator<FName, FBaseCVar *> it(*this);
|
||||
TMap<FName, FBaseCVar *>::Pair *pair;
|
||||
|
||||
while (it.NextPair(pair))
|
||||
{
|
||||
delete pair->Value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -260,6 +260,8 @@ enum
|
|||
|
||||
struct userinfo_t : TMap<FName,FBaseCVar *>
|
||||
{
|
||||
~userinfo_t();
|
||||
|
||||
int GetAimDist() const
|
||||
{
|
||||
if (dmflags2 & DF2_NOAUTOAIM)
|
||||
|
|
|
@ -898,7 +898,7 @@ IMPLEMENT_CLASS(DSaveMenu)
|
|||
DSaveMenu::DSaveMenu(DMenu *parent, FListMenuDescriptor *desc)
|
||||
: DLoadSaveMenu(parent, desc)
|
||||
{
|
||||
strcpy (NewSaveNode.Title, "<New Save Game>");
|
||||
strcpy (NewSaveNode.Title, GStrings["NEWSAVE"]);
|
||||
NewSaveNode.bNoDelete = true;
|
||||
SaveGames.Insert(0, &NewSaveNode);
|
||||
TopItem = 0;
|
||||
|
|
|
@ -256,11 +256,20 @@ static void CopyPlayer (player_t *dst, player_t *src, const char *name)
|
|||
{
|
||||
// The userinfo needs to be saved for real players, but it
|
||||
// needs to come from the save for bots.
|
||||
userinfo_t uibackup = dst->userinfo;
|
||||
userinfo_t uibackup;
|
||||
userinfo_t uibackup2;
|
||||
|
||||
uibackup.TransferFrom(dst->userinfo);
|
||||
uibackup2.TransferFrom(src->userinfo);
|
||||
|
||||
int chasecam = dst->cheats & CF_CHASECAM; // Remember the chasecam setting
|
||||
bool attackdown = dst->attackdown;
|
||||
bool usedown = dst->usedown;
|
||||
*dst = *src;
|
||||
|
||||
|
||||
dst->~player_t(); // ensure that the userinfo in dst does not contain anything before copying everything over.
|
||||
*dst = *src; // To avoid memory leaks at this point the userinfo in src must be empty which is taken care of by the TransferFrom call above.
|
||||
|
||||
dst->cheats |= chasecam;
|
||||
|
||||
if (dst->isbot)
|
||||
|
@ -276,10 +285,11 @@ static void CopyPlayer (player_t *dst, player_t *src, const char *name)
|
|||
}
|
||||
bglobal.botnum++;
|
||||
bglobal.botingame[dst - players] = true;
|
||||
dst->userinfo.TransferFrom(uibackup2);
|
||||
}
|
||||
else
|
||||
{
|
||||
dst->userinfo = uibackup;
|
||||
dst->userinfo.TransferFrom(uibackup);
|
||||
}
|
||||
// Validate the skin
|
||||
dst->userinfo.SkinNumChanged(R_FindSkin(skins[dst->userinfo.GetSkin()].name, dst->CurrentPlayerClass));
|
||||
|
|
|
@ -639,12 +639,21 @@ void P_SectorDamage(int tag, int amount, FName type, const PClass *protectClass,
|
|||
{
|
||||
next = actor->snext;
|
||||
// Only affect actors touching the 3D floor
|
||||
if (actor->z + actor->height > sec->floorplane.ZatPoint(actor->x, actor->y))
|
||||
fixed_t z1 = sec->floorplane.ZatPoint(actor->x, actor->y);
|
||||
fixed_t z2 = sec->ceilingplane.ZatPoint(actor->x, actor->y);
|
||||
if (z2 < z1)
|
||||
{
|
||||
// Account for Vavoom-style 3D floors
|
||||
fixed_t zz = z1;
|
||||
z1 = z2;
|
||||
z2 = zz;
|
||||
}
|
||||
if (actor->z + actor->height > z1)
|
||||
{
|
||||
// If DAMAGE_IN_AIR is used, anything not beneath the 3D floor will be
|
||||
// damaged (so, anything touching it or above it). Other 3D floors between
|
||||
// the actor and this one will not stop this effect.
|
||||
if ((flags & DAMAGE_IN_AIR) || actor->z <= sec->ceilingplane.ZatPoint(actor->x, actor->y))
|
||||
if ((flags & DAMAGE_IN_AIR) || actor->z <= z2)
|
||||
{
|
||||
// Here we pass the DAMAGE_IN_AIR flag to disable the floor check, since it
|
||||
// only works with the real sector's floor. We did the appropriate height checks
|
||||
|
|
|
@ -309,7 +309,6 @@ player_t::player_t()
|
|||
ConversationFaceTalker(0)
|
||||
{
|
||||
memset (&cmd, 0, sizeof(cmd));
|
||||
memset (&userinfo, 0, sizeof(userinfo));
|
||||
memset (frags, 0, sizeof(frags));
|
||||
memset (psprites, 0, sizeof(psprites));
|
||||
memset (&skill, 0, sizeof(skill));
|
||||
|
|
|
@ -174,7 +174,15 @@ void R_InitPlanes ()
|
|||
void R_DeinitPlanes ()
|
||||
{
|
||||
fakeActive = 0;
|
||||
R_ClearPlanes(false);
|
||||
|
||||
// do not use R_ClearPlanes because at this point the screen pointer is no longer valid.
|
||||
for (int i = 0; i <= MAXVISPLANES; i++) // new code -- killough
|
||||
{
|
||||
for (*freehead = visplanes[i], visplanes[i] = NULL; *freehead; )
|
||||
{
|
||||
freehead = &(*freehead)->next;
|
||||
}
|
||||
}
|
||||
for (visplane_t *pl = freetail; pl != NULL; )
|
||||
{
|
||||
visplane_t *next = pl->next;
|
||||
|
@ -490,7 +498,7 @@ void R_MapColoredPlane (int y, int x1)
|
|||
|
||||
void R_ClearPlanes (bool fullclear)
|
||||
{
|
||||
int i, max;
|
||||
int i;
|
||||
|
||||
// Don't clear fake planes if not doing a full clear.
|
||||
if (!fullclear)
|
||||
|
@ -516,7 +524,6 @@ void R_ClearPlanes (bool fullclear)
|
|||
}
|
||||
else
|
||||
{
|
||||
max = fullclear ? MAXVISPLANES : MAXVISPLANES-1;
|
||||
for (i = 0; i <= MAXVISPLANES; i++) // new code -- killough
|
||||
{
|
||||
for (*freehead = visplanes[i], visplanes[i] = NULL; *freehead; )
|
||||
|
@ -524,10 +531,7 @@ void R_ClearPlanes (bool fullclear)
|
|||
freehead = &(*freehead)->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fullclear)
|
||||
{
|
||||
// opening / clipping determination
|
||||
clearbufshort (floorclip, viewwidth, viewheight);
|
||||
// [RH] clip ceiling to console bottom
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
#include "m_bbox.h"
|
||||
#include "r_data/r_translate.h"
|
||||
#include "p_trace.h"
|
||||
#include "gstrings.h"
|
||||
|
||||
|
||||
static FRandom pr_camissile ("CustomActorfire");
|
||||
|
@ -2133,6 +2134,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Print)
|
|||
ACTION_PARAM_FLOAT(time, 1);
|
||||
ACTION_PARAM_NAME(fontname, 2);
|
||||
|
||||
if (text[0] == '$') text = GStrings(text+1);
|
||||
if (self->CheckLocalView (consoleplayer) ||
|
||||
(self->target!=NULL && self->target->CheckLocalView (consoleplayer)))
|
||||
{
|
||||
|
@ -2171,6 +2173,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PrintBold)
|
|||
float saved = con_midtime;
|
||||
FFont *font = NULL;
|
||||
|
||||
if (text[0] == '$') text = GStrings(text+1);
|
||||
if (fontname != NAME_None)
|
||||
{
|
||||
font = V_GetFont(fontname);
|
||||
|
@ -2196,11 +2199,13 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Log)
|
|||
{
|
||||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_STRING(text, 0);
|
||||
|
||||
if (text[0] == '$') text = GStrings(text+1);
|
||||
Printf("%s\n", text);
|
||||
ACTION_SET_RESULT(false); // Prints should never set the result for inventory state chains!
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//=========================================================================
|
||||
//
|
||||
// A_LogInt
|
||||
//
|
||||
|
|
|
@ -361,3 +361,18 @@ F481922F4881F74760F3C0437FD5EDD0 // map03
|
|||
// still set when returning to the origin map.
|
||||
linkfrozenprops
|
||||
}
|
||||
|
||||
D62DCA9EC226DE49108D5DD9271F7631 // Cheogsh 2 map04
|
||||
{
|
||||
// Stuff in megasphere cage is positioned too low
|
||||
setthingz 1640 528
|
||||
setthingz 1641 528
|
||||
setthingz 1642 528
|
||||
setthingz 1643 528
|
||||
setthingz 1644 528
|
||||
setthingz 1645 528
|
||||
setthingz 1646 528
|
||||
setthingz 1647 528
|
||||
setthingz 1648 528
|
||||
setthingz 1649 528
|
||||
}
|
|
@ -112,6 +112,7 @@ PD_YELLOWCO = "You need a yellow card to activate this object";
|
|||
PD_BLUESO = "You need a blue skull to activate this object";
|
||||
PD_REDSO = "You need a red skull to activate this object";
|
||||
PD_YELLOWSO = "You need a yellow skull to activate this object";
|
||||
NEWSAVE = "<New Save Game>";
|
||||
GGSAVED = "game saved.";
|
||||
HUSTR_MSGU = "[Message unsent]";
|
||||
PICKUP_PISTOL_DROPPED = "Picked up a pistol.";
|
||||
|
|
Loading…
Reference in a new issue