mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
23cc7da268
8 changed files with 54 additions and 24 deletions
|
@ -1791,8 +1791,14 @@ void G_ReadSnapshots (PNGHandle *png)
|
|||
DWORD snapver;
|
||||
|
||||
arc << snapver;
|
||||
arc << namelen;
|
||||
arc.Read (mapname, namelen);
|
||||
if (SaveVersion < 4508)
|
||||
{
|
||||
arc << namelen;
|
||||
arc.Read(mapname, namelen);
|
||||
mapname[namelen] = 0;
|
||||
MapName = mapname;
|
||||
}
|
||||
else arc << MapName;
|
||||
TheDefaultLevelInfo.snapshotVer = snapver;
|
||||
TheDefaultLevelInfo.snapshot = new FCompressedMemFile;
|
||||
TheDefaultLevelInfo.snapshot->Serialize (arc);
|
||||
|
|
|
@ -345,8 +345,8 @@ void UpdateJoystickMenu(IJoystickConfig *selected)
|
|||
for(unsigned i=0;i<opt->mItems.Size();i++)
|
||||
{
|
||||
delete opt->mItems[i];
|
||||
opt->mItems.Clear();
|
||||
}
|
||||
opt->mItems.Clear();
|
||||
|
||||
int i;
|
||||
int itemnum = -1;
|
||||
|
|
|
@ -8880,7 +8880,22 @@ scriptwait:
|
|||
break;
|
||||
|
||||
case PCD_STRLEN:
|
||||
STACK(1) = SDWORD(strlen(FBehavior::StaticLookupString (STACK(1))));
|
||||
{
|
||||
const char *str = FBehavior::StaticLookupString(STACK(1));
|
||||
if (str != NULL)
|
||||
{
|
||||
STACK(1) = SDWORD(strlen(str));
|
||||
break;
|
||||
}
|
||||
|
||||
static bool StrlenInvalidPrintedAlready = false;
|
||||
if (!StrlenInvalidPrintedAlready)
|
||||
{
|
||||
Printf(PRINT_BOLD, "Warning: ACS function strlen called with invalid string argument.\n");
|
||||
StrlenInvalidPrintedAlready = true;
|
||||
}
|
||||
STACK(1) = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_GETCVAR:
|
||||
|
|
|
@ -74,7 +74,6 @@ EXTERN_CVAR (Bool, show_obituaries)
|
|||
|
||||
|
||||
FName MeansOfDeath;
|
||||
bool FriendlyFire;
|
||||
|
||||
//
|
||||
// GET STUFF
|
||||
|
@ -198,10 +197,8 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgf
|
|||
if (inflictor && inflictor->player && inflictor->player->mo != inflictor)
|
||||
MeansOfDeath = NAME_None;
|
||||
|
||||
if (multiplayer && !deathmatch)
|
||||
FriendlyFire = true;
|
||||
friendly = (self->player != attacker->player && self->IsTeammate(attacker));
|
||||
|
||||
friendly = FriendlyFire;
|
||||
mod = MeansOfDeath;
|
||||
message = NULL;
|
||||
messagename = NULL;
|
||||
|
@ -271,8 +268,6 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker, int dmgf
|
|||
{
|
||||
if (friendly)
|
||||
{
|
||||
attacker->player->fragcount -= 2;
|
||||
attacker->player->frags[attacker->player - players]++;
|
||||
self = attacker;
|
||||
gender = self->player->userinfo.GetGender();
|
||||
mysnprintf (gendermessage, countof(gendermessage), "OB_FRIENDLY%c", '1' + (pr_obituary() & 3));
|
||||
|
@ -470,12 +465,21 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags)
|
|||
if ((dmflags2 & DF2_YES_LOSEFRAG) && deathmatch)
|
||||
player->fragcount--;
|
||||
|
||||
++source->player->fragcount;
|
||||
++source->player->spreecount;
|
||||
if (this->IsTeammate(source))
|
||||
{
|
||||
source->player->fragcount--;
|
||||
}
|
||||
else
|
||||
{
|
||||
++source->player->fragcount;
|
||||
++source->player->spreecount;
|
||||
}
|
||||
|
||||
if (source->player->morphTics)
|
||||
{ // Make a super chicken
|
||||
source->GiveInventoryType (RUNTIME_CLASS(APowerWeaponLevel2));
|
||||
}
|
||||
|
||||
if (deathmatch && cl_showsprees)
|
||||
{
|
||||
const char *spreemsg;
|
||||
|
@ -1024,7 +1028,6 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
|||
}
|
||||
|
||||
MeansOfDeath = mod;
|
||||
FriendlyFire = false;
|
||||
// [RH] Andy Baker's Stealth monsters
|
||||
if (target->flags & MF_STEALTH)
|
||||
{
|
||||
|
@ -1221,8 +1224,6 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
|||
((player && player != source->player) || (!player && target != source)) &&
|
||||
target->IsTeammate (source))
|
||||
{
|
||||
if (player)
|
||||
FriendlyFire = true;
|
||||
if (rawdamage < TELEFRAG_DAMAGE) //Use the original damage to check for telefrag amount. Don't let the now-amplified damagetypes do it.
|
||||
{ // Still allow telefragging :-(
|
||||
damage = (int)((float)damage * level.teamdamage);
|
||||
|
|
|
@ -1013,6 +1013,10 @@ bool PIT_CheckThing(AActor *thing, FCheckPosition &tm)
|
|||
bool solid;
|
||||
int damage;
|
||||
|
||||
// don't clip against self
|
||||
if (thing == tm.thing)
|
||||
return true;
|
||||
|
||||
if (!((thing->flags & (MF_SOLID | MF_SPECIAL | MF_SHOOTABLE)) || thing->flags6 & MF6_TOUCHY))
|
||||
return true; // can't hit thing
|
||||
|
||||
|
@ -1020,10 +1024,6 @@ bool PIT_CheckThing(AActor *thing, FCheckPosition &tm)
|
|||
if (abs(thing->x - tm.x) >= blockdist || abs(thing->y - tm.y) >= blockdist)
|
||||
return true;
|
||||
|
||||
// don't clip against self
|
||||
if (thing == tm.thing)
|
||||
return true;
|
||||
|
||||
if ((thing->flags2 | tm.thing->flags2) & MF2_THRUACTORS)
|
||||
return true;
|
||||
|
||||
|
|
|
@ -1562,12 +1562,15 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SkullPop)
|
|||
if (player != NULL)
|
||||
{
|
||||
player->mo = mo;
|
||||
if (player->camera == self)
|
||||
{
|
||||
player->camera = mo;
|
||||
}
|
||||
player->damagecount = 32;
|
||||
}
|
||||
for (int i = 0; i < MAXPLAYERS; ++i)
|
||||
{
|
||||
if (playeringame[i] && players[i].camera == self)
|
||||
{
|
||||
players[i].camera = mo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
|
@ -309,7 +309,7 @@ FDInputJoystick::~FDInputJoystick()
|
|||
{
|
||||
Joy_GenerateButtonEvents(Axes[0].ButtonValue, 0, 2, KEY_JOYAXIS1PLUS);
|
||||
}
|
||||
else
|
||||
else if (Axes.Size() > 1)
|
||||
{
|
||||
Joy_GenerateButtonEvents(Axes[1].ButtonValue, 0, 4, KEY_JOYAXIS1PLUS);
|
||||
for (i = 2; i < Axes.Size(); ++i)
|
||||
|
|
|
@ -396,3 +396,8 @@ A53AE580A4AF2B5D0B0893F86914781E // TNT: Evilution map31
|
|||
{
|
||||
setthingflags 470 2016
|
||||
}
|
||||
|
||||
D0139194F7817BF06F3988DFC47DB38D // Whispers of Satan map29
|
||||
{
|
||||
nopassover
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue