Merge branch 'maint' into maint_1.8

This commit is contained in:
Christoph Oelckers 2013-06-26 20:23:15 +02:00
commit 119bcd7686
18 changed files with 136 additions and 97 deletions

1
.gitignore vendored
View file

@ -3,6 +3,7 @@
*.suo *.suo
*.pdb *.pdb
*.ilk *.ilk
*.aps
/Release /Release
/wadsrc_wad /wadsrc_wad
*.user *.user

View file

@ -505,7 +505,7 @@ endif( BACKPATCH )
get_target_property( UPDATEREVISION_EXE updaterevision LOCATION ) get_target_property( UPDATEREVISION_EXE updaterevision LOCATION )
add_custom_target( revision_check ALL add_custom_target( revision_check ALL
COMMAND ${UPDATEREVISION_EXE} . src/gitinfo.h COMMAND ${UPDATEREVISION_EXE} src/gitinfo.h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS updaterevision ) DEPENDS updaterevision )

View file

@ -265,7 +265,7 @@ enum
// --- mobj.flags5 --- // --- mobj.flags5 ---
/* = 0x00000001, */ MF5_DONTDRAIN = 0x00000001, // cannot be drained health from.
/* = 0x00000002, */ /* = 0x00000002, */
MF5_NODROPOFF = 0x00000004, // cannot drop off under any circumstances. MF5_NODROPOFF = 0x00000004, // cannot drop off under any circumstances.
/* = 0x00000008, */ /* = 0x00000008, */

View file

@ -80,6 +80,7 @@ enum
CP_SETACTIVATION, CP_SETACTIVATION,
CP_SECTORFLOOROFFSET, CP_SECTORFLOOROFFSET,
CP_SETWALLYSCALE, CP_SETWALLYSCALE,
CP_SETTHINGZ,
}; };
// EXTERNAL FUNCTION PROTOTYPES -------------------------------------------- // EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
@ -89,6 +90,7 @@ enum
// PRIVATE FUNCTION PROTOTYPES --------------------------------------------- // PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
// EXTERNAL DATA DECLARATIONS ---------------------------------------------- // EXTERNAL DATA DECLARATIONS ----------------------------------------------
extern TArray<FMapThing> MapThingsConverted;
// PUBLIC DATA DEFINITIONS ------------------------------------------------- // PUBLIC DATA DEFINITIONS -------------------------------------------------
@ -294,6 +296,15 @@ void ParseCompatibility()
sc.MustGetFloat(); sc.MustGetFloat();
CompatParams.Push(FLOAT2FIXED(sc.Float)); CompatParams.Push(FLOAT2FIXED(sc.Float));
} }
else if (sc.Compare("setthingz"))
{
if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size();
CompatParams.Push(CP_SETTHINGZ);
sc.MustGetNumber();
CompatParams.Push(sc.Number);
sc.MustGetFloat();
CompatParams.Push(FLOAT2FIXED(sc.Float));
}
else else
{ {
sc.UnGet(); sc.UnGet();
@ -497,6 +508,16 @@ void SetCompatibilityParams()
i += 5; i += 5;
break; break;
} }
case CP_SETTHINGZ:
{
// When this is called, the things haven't been spawned yet so we can alter the position inside the MapThings array.
if ((unsigned)CompatParams[i+1] < MapThingsConverted.Size())
{
MapThingsConverted[CompatParams[i+1]].z = CompatParams[i+2];
}
i += 3;
break;
}
} }
} }
} }

View file

@ -115,6 +115,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw)
angle_t slope; angle_t slope;
player_t *player; player_t *player;
AActor *linetarget; AActor *linetarget;
int actualdamage;
ACTION_PARAM_START(9); ACTION_PARAM_START(9);
ACTION_PARAM_SOUND(fullsound, 0); ACTION_PARAM_SOUND(fullsound, 0);
@ -151,7 +152,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw)
return; return;
} }
P_LineAttack (self, angle, Range, slope, damage, NAME_Melee, pufftype, false, &linetarget); P_LineAttack (self, angle, Range, slope, damage, NAME_Melee, pufftype, false, &linetarget, &actualdamage);
if (!linetarget) if (!linetarget)
{ {
@ -180,8 +181,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw)
} }
} }
if (LifeSteal) if (LifeSteal && !(linetarget->flags5 & MF5_DONTDRAIN))
P_GiveBody (self, (damage * LifeSteal) >> FRACBITS); P_GiveBody (self, (actualdamage * LifeSteal) >> FRACBITS);
S_Sound (self, CHAN_WEAPON, hitsound, 1, ATTN_NORM); S_Sound (self, CHAN_WEAPON, hitsound, 1, ATTN_NORM);

View file

@ -240,6 +240,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_GauntletAttack)
player_t *player; player_t *player;
const PClass *pufftype; const PClass *pufftype;
AActor *linetarget; AActor *linetarget;
int actualdamage = 0;
if (NULL == (player = self->player)) if (NULL == (player = self->player))
{ {
@ -273,7 +274,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_GauntletAttack)
pufftype = PClass::FindClass("GauntletPuff1"); pufftype = PClass::FindClass("GauntletPuff1");
} }
slope = P_AimLineAttack (self, angle, dist, &linetarget); slope = P_AimLineAttack (self, angle, dist, &linetarget);
P_LineAttack (self, angle, dist, slope, damage, NAME_Melee, pufftype, false, &linetarget); P_LineAttack (self, angle, dist, slope, damage, NAME_Melee, pufftype, false, &linetarget, &actualdamage);
if (!linetarget) if (!linetarget)
{ {
if (pr_gatk() > 64) if (pr_gatk() > 64)
@ -298,7 +299,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_GauntletAttack)
} }
if (power) if (power)
{ {
P_GiveBody (self, damage>>1); if (!(linetarget->flags5 & MF5_DONTDRAIN)) P_GiveBody (self, actualdamage>>1);
S_Sound (self, CHAN_AUTO, "weapons/gauntletspowhit", 1, ATTN_NORM); S_Sound (self, CHAN_AUTO, "weapons/gauntletspowhit", 1, ATTN_NORM);
} }
else else

View file

@ -96,10 +96,10 @@ const char* GameInfoBorders[] =
strcpy(gameinfo.key, sc.String); \ strcpy(gameinfo.key, sc.String); \
} }
#define GAMEINFOKEY_STRINGARRAY(key, variable, length) \ #define GAMEINFOKEY_STRINGARRAY(key, variable, length, clear) \
else if(nextKey.CompareNoCase(variable) == 0) \ else if(nextKey.CompareNoCase(variable) == 0) \
{ \ { \
gameinfo.key.Clear(); \ if (clear) gameinfo.key.Clear(); \
do \ do \
{ \ { \
sc.MustGetToken(TK_StringConst); \ sc.MustGetToken(TK_StringConst); \
@ -282,8 +282,10 @@ void FMapInfoParser::ParseGameInfo()
} }
// Insert valid keys here. // Insert valid keys here.
GAMEINFOKEY_CSTRING(titlePage, "titlePage", 8) GAMEINFOKEY_CSTRING(titlePage, "titlePage", 8)
GAMEINFOKEY_STRINGARRAY(creditPages, "creditPage", 8) GAMEINFOKEY_STRINGARRAY(creditPages, "addcreditPage", 8, false)
GAMEINFOKEY_STRINGARRAY(PlayerClasses, "playerclasses", 0) GAMEINFOKEY_STRINGARRAY(creditPages, "CreditPage", 8, true)
GAMEINFOKEY_STRINGARRAY(PlayerClasses, "addplayerclasses", 0, false)
GAMEINFOKEY_STRINGARRAY(PlayerClasses, "playerclasses", 0, true)
GAMEINFOKEY_STRING(titleMusic, "titleMusic") GAMEINFOKEY_STRING(titleMusic, "titleMusic")
GAMEINFOKEY_FLOAT(titleTime, "titleTime") GAMEINFOKEY_FLOAT(titleTime, "titleTime")
GAMEINFOKEY_FLOAT(advisoryTime, "advisoryTime") GAMEINFOKEY_FLOAT(advisoryTime, "advisoryTime")
@ -291,8 +293,9 @@ void FMapInfoParser::ParseGameInfo()
GAMEINFOKEY_STRING(chatSound, "chatSound") GAMEINFOKEY_STRING(chatSound, "chatSound")
GAMEINFOKEY_STRING(finaleMusic, "finaleMusic") GAMEINFOKEY_STRING(finaleMusic, "finaleMusic")
GAMEINFOKEY_CSTRING(finaleFlat, "finaleFlat", 8) GAMEINFOKEY_CSTRING(finaleFlat, "finaleFlat", 8)
GAMEINFOKEY_STRINGARRAY(finalePages, "finalePage", 8) GAMEINFOKEY_STRINGARRAY(finalePages, "finalePage", 8, true)
GAMEINFOKEY_STRINGARRAY(infoPages, "infoPage", 8) GAMEINFOKEY_STRINGARRAY(infoPages, "addinfoPage", 8, false)
GAMEINFOKEY_STRINGARRAY(infoPages, "infoPage", 8, true)
GAMEINFOKEY_CSTRING(PauseSign, "pausesign", 8) GAMEINFOKEY_CSTRING(PauseSign, "pausesign", 8)
GAMEINFOKEY_STRING(quitSound, "quitSound") GAMEINFOKEY_STRING(quitSound, "quitSound")
GAMEINFOKEY_CSTRING(borderFlat, "borderFlat", 8) GAMEINFOKEY_CSTRING(borderFlat, "borderFlat", 8)
@ -321,7 +324,8 @@ void FMapInfoParser::ParseGameInfo()
GAMEINFOKEY_INT(defaultdropstyle, "defaultdropstyle") GAMEINFOKEY_INT(defaultdropstyle, "defaultdropstyle")
GAMEINFOKEY_CSTRING(Endoom, "endoom", 8) GAMEINFOKEY_CSTRING(Endoom, "endoom", 8)
GAMEINFOKEY_INT(player5start, "player5start") GAMEINFOKEY_INT(player5start, "player5start")
GAMEINFOKEY_STRINGARRAY(quitmessages, "quitmessages", 0) GAMEINFOKEY_STRINGARRAY(quitmessages, "addquitmessages", 0, false)
GAMEINFOKEY_STRINGARRAY(quitmessages, "quitmessages", 0, true)
GAMEINFOKEY_STRING(mTitleColor, "menufontcolor_title") GAMEINFOKEY_STRING(mTitleColor, "menufontcolor_title")
GAMEINFOKEY_STRING(mFontColor, "menufontcolor_label") GAMEINFOKEY_STRING(mFontColor, "menufontcolor_label")
GAMEINFOKEY_STRING(mFontColorValue, "menufontcolor_value") GAMEINFOKEY_STRING(mFontColorValue, "menufontcolor_value")

View file

@ -657,14 +657,13 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags)
FState *diestate = NULL; FState *diestate = NULL;
FName damagetype = (inflictor && inflictor->DeathType != NAME_None) ? inflictor->DeathType : DamageType;
if (damagetype != NAME_None) if (DamageType != NAME_None)
{ {
diestate = FindState (NAME_Death, damagetype, true); diestate = FindState (NAME_Death, DamageType, true);
if (diestate == NULL) if (diestate == NULL)
{ {
if (damagetype == NAME_Ice) if (DamageType == NAME_Ice)
{ // If an actor doesn't have an ice death, we can still give them a generic one. { // If an actor doesn't have an ice death, we can still give them a generic one.
if (!deh.NoAutofreeze && !(flags4 & MF4_NOICEDEATH) && (player || (flags3 & MF3_ISMONSTER))) if (!deh.NoAutofreeze && !(flags4 & MF4_NOICEDEATH) && (player || (flags3 & MF3_ISMONSTER)))
@ -683,9 +682,9 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags)
// Don't pass on a damage type this actor cannot handle. // Don't pass on a damage type this actor cannot handle.
// (most importantly, prevent barrels from passing on ice damage.) // (most importantly, prevent barrels from passing on ice damage.)
// Massacre must be preserved though. // Massacre must be preserved though.
if (damagetype != NAME_Massacre) if (DamageType != NAME_Massacre)
{ {
damagetype = NAME_None; DamageType = NAME_None;
} }
if ((health < gibhealth || flags4 & MF4_EXTREMEDEATH) && !(flags4 & MF4_NOEXTREMEDEATH)) if ((health < gibhealth || flags4 & MF4_EXTREMEDEATH) && !(flags4 & MF4_NOEXTREMEDEATH))
@ -1263,7 +1262,7 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
// If the damaging player has the power of drain, give the player 50% of the damage // If the damaging player has the power of drain, give the player 50% of the damage
// done in health. // done in health.
if ( source && source->player && source->player->cheats & CF_DRAIN) if ( source && source->player && source->player->cheats & CF_DRAIN && !(target->flags5 & MF5_DONTDRAIN))
{ {
if (!target->player || target->player != source->player) if (!target->player || target->player != source->player)
{ {
@ -1278,6 +1277,10 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
if (target->health <= 0) if (target->health <= 0)
{ // Death { // Death
target->special1 = damage; target->special1 = damage;
// use inflictor's death type if it got one.
if (inflictor && inflictor->DeathType != NAME_None) mod = inflictor->DeathType;
// check for special fire damage or ice damage deaths // check for special fire damage or ice damage deaths
if (mod == NAME_Fire) if (mod == NAME_Fire)
{ {

View file

@ -460,8 +460,8 @@ enum // P_LineAttack flags
LAF_NORANDOMPUFFZ = 2 LAF_NORANDOMPUFFZ = 2
}; };
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, const PClass *pufftype, int flags = 0, AActor **victim = NULL); AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, const PClass *pufftype, int flags = 0, AActor **victim = NULL, int *actualdamage = NULL);
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, FName pufftype, int flags = 0, AActor **victim = NULL); AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, FName pufftype, int flags = 0, AActor **victim = NULL, int *actualdamage = NULL);
void P_TraceBleed (int damage, fixed_t x, fixed_t y, fixed_t z, AActor *target, angle_t angle, int pitch); void P_TraceBleed (int damage, fixed_t x, fixed_t y, fixed_t z, AActor *target, angle_t angle, int pitch);
void P_TraceBleed (int damage, AActor *target, angle_t angle, int pitch); void P_TraceBleed (int damage, AActor *target, angle_t angle, int pitch);
void P_TraceBleed (int damage, AActor *target, AActor *missile); // missile version void P_TraceBleed (int damage, AActor *target, AActor *missile); // missile version

View file

@ -3496,7 +3496,7 @@ static ETraceStatus CheckForSpectral (FTraceResults &res, void *userdata)
//========================================================================== //==========================================================================
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
int pitch, int damage, FName damageType, const PClass *pufftype, int flags, AActor **victim) int pitch, int damage, FName damageType, const PClass *pufftype, int flags, AActor **victim, int *actualdamage)
{ {
fixed_t vx, vy, vz, shootz; fixed_t vx, vy, vz, shootz;
FTraceResults trace; FTraceResults trace;
@ -3514,6 +3514,10 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
{ {
*victim = NULL; *victim = NULL;
} }
if (actualdamage != NULL)
{
*actualdamage = 0;
}
angle >>= ANGLETOFINESHIFT; angle >>= ANGLETOFINESHIFT;
pitch = (angle_t)(pitch) >> ANGLETOFINESHIFT; pitch = (angle_t)(pitch) >> ANGLETOFINESHIFT;
@ -3684,6 +3688,10 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
killPuff = true; killPuff = true;
} }
newdam = P_DamageMobj (trace.Actor, puff ? puff : t1, t1, damage, damageType, dmgflags); newdam = P_DamageMobj (trace.Actor, puff ? puff : t1, t1, damage, damageType, dmgflags);
if (actualdamage != NULL)
{
*actualdamage = newdam;
}
} }
if (!(puffDefaults != NULL && puffDefaults->flags3&MF3_BLOODLESSIMPACT)) if (!(puffDefaults != NULL && puffDefaults->flags3&MF3_BLOODLESSIMPACT))
{ {
@ -3741,7 +3749,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
} }
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
int pitch, int damage, FName damageType, FName pufftype, int flags, AActor **victim) int pitch, int damage, FName damageType, FName pufftype, int flags, AActor **victim, int *actualdamage)
{ {
const PClass * type = PClass::FindClass(pufftype); const PClass * type = PClass::FindClass(pufftype);
if (victim != NULL) if (victim != NULL)
@ -3754,7 +3762,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
} }
else else
{ {
return P_LineAttack(t1, angle, distance, pitch, damage, damageType, type, flags, victim); return P_LineAttack(t1, angle, distance, pitch, damage, damageType, type, flags, victim, actualdamage);
} }
return NULL; return NULL;
} }

View file

@ -270,6 +270,10 @@ void AActor::Serialize (FArchive &arc)
<< meleethreshold << meleethreshold
<< meleerange << meleerange
<< DamageType; << DamageType;
if (SaveVersion >= 4501)
{
arc << DamageTypeReceived;
}
if (SaveVersion >= 3237) if (SaveVersion >= 3237)
{ {
arc arc

View file

@ -208,8 +208,6 @@ static cheatseq_t HereticCheats[] =
{ CheatPonce, 0, 0, 0, {CHT_HEALTH,0}, Cht_Generic }, { CheatPonce, 0, 0, 0, {CHT_HEALTH,0}, Cht_Generic },
{ CheatSkel, 0, 0, 0, {CHT_KEYS,0}, Cht_Generic }, { CheatSkel, 0, 0, 0, {CHT_KEYS,0}, Cht_Generic },
{ CheatChicken, 0, 0, 0, {CHT_MORPH,0}, Cht_Generic }, { CheatChicken, 0, 0, 0, {CHT_MORPH,0}, Cht_Generic },
{ CheatAmmo, 0, 0, 0, {CHT_TAKEWEAPS,0}, Cht_Generic },
{ CheatGod, 0, 0, 0, {CHT_NOWUDIE,0}, Cht_Generic },
{ CheatMassacre, 0, 0, 0, {CHT_MASSACRE,0}, Cht_Generic }, { CheatMassacre, 0, 0, 0, {CHT_MASSACRE,0}, Cht_Generic },
{ CheatEngage, 0, 1, 0, {0,0}, Cht_ChangeLevel }, { CheatEngage, 0, 1, 0, {0,0}, Cht_ChangeLevel },
{ CheatPowerup1[0], 0, 0, 0, {CHT_GIMMIEA,0}, Cht_Generic }, { CheatPowerup1[0], 0, 0, 0, {CHT_GIMMIEA,0}, Cht_Generic },
@ -223,6 +221,8 @@ static cheatseq_t HereticCheats[] =
{ CheatPowerup1[8], 0, 0, 0, {CHT_GIMMIEI,0}, Cht_Generic }, { CheatPowerup1[8], 0, 0, 0, {CHT_GIMMIEI,0}, Cht_Generic },
{ CheatPowerup1[9], 0, 0, 0, {CHT_GIMMIEJ,0}, Cht_Generic }, { CheatPowerup1[9], 0, 0, 0, {CHT_GIMMIEJ,0}, Cht_Generic },
{ CheatPowerup1[10], 0, 0, 0, {CHT_GIMMIEZ,0}, Cht_Generic }, { CheatPowerup1[10], 0, 0, 0, {CHT_GIMMIEZ,0}, Cht_Generic },
{ CheatAmmo, 0, 0, 0, {CHT_TAKEWEAPS,0}, Cht_Generic },
{ CheatGod, 0, 0, 0, {CHT_NOWUDIE,0}, Cht_Generic },
}; };
static cheatseq_t HexenCheats[] = static cheatseq_t HexenCheats[] =
@ -270,7 +270,6 @@ static cheatseq_t StrifeCheats[] =
static cheatseq_t ChexCheats[] = static cheatseq_t ChexCheats[] =
{ {
{ CheatMus, 0, 1, 0, {0,0}, Cht_Music },
{ CheatKimHyers, 0, 1, 0, {0,0}, Cht_MyPos }, { CheatKimHyers, 0, 1, 0, {0,0}, Cht_MyPos },
{ CheatShrrill, 0, 0, 0, {0,0}, Cht_AutoMap }, { CheatShrrill, 0, 0, 0, {0,0}, Cht_AutoMap },
{ CheatDavidBrus, 0, 0, 0, {CHT_IDDQD,0}, Cht_Generic }, { CheatDavidBrus, 0, 0, 0, {CHT_IDDQD,0}, Cht_Generic },
@ -284,7 +283,8 @@ static cheatseq_t ChexCheats[] =
{ CheatDigitalCafe, 0, 0, 0, {CHT_BEHOLDA,0}, Cht_Generic }, { CheatDigitalCafe, 0, 0, 0, {CHT_BEHOLDA,0}, Cht_Generic },
{ CheatJoshuaStorms, 0, 0, 0, {CHT_BEHOLDL,0}, Cht_Generic }, { CheatJoshuaStorms, 0, 0, 0, {CHT_BEHOLDL,0}, Cht_Generic },
{ CheatJoelKoenigs, 0, 0, 0, {CHT_CHAINSAW,0}, Cht_Generic }, { CheatJoelKoenigs, 0, 0, 0, {CHT_CHAINSAW,0}, Cht_Generic },
{ CheatLeeSnyder, 0, 1, 0, {0,0}, Cht_ChangeLevel } { CheatLeeSnyder, 0, 1, 0, {0,0}, Cht_ChangeLevel },
{ CheatMus, 0, 1, 0, {0,0}, Cht_Music },
}; };
static cheatseq_t SpecialCheats[] = static cheatseq_t SpecialCheats[] =
@ -342,8 +342,8 @@ bool ST_Responder (event_t *ev)
else else
{ {
static cheatseq_t *cheatlists[] = { DoomCheats, HereticCheats, HexenCheats, StrifeCheats, ChexCheats, SpecialCheats }; static cheatseq_t *cheatlists[] = { DoomCheats, HereticCheats, HexenCheats, StrifeCheats, ChexCheats, SpecialCheats };
static int counts[] = { countof(DoomCheats), countof(HereticCheats), countof(HexenCheats), static int counts[] = { countof(DoomCheats), countof(HereticCheats)-2, countof(HexenCheats),
countof(StrifeCheats), countof(ChexCheats), countof(SpecialCheats) }; countof(StrifeCheats), countof(ChexCheats)-1, countof(SpecialCheats) };
for (size_t i=0; i<countof(cheatlists); i++) for (size_t i=0; i<countof(cheatlists); i++)
{ {

View file

@ -1388,6 +1388,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
angle_t angle; angle_t angle;
int pitch; int pitch;
AActor * linetarget; AActor * linetarget;
int actualdamage;
if (!norandom) Damage *= (pr_cwpunch()%8+1); if (!norandom) Damage *= (pr_cwpunch()%8+1);
@ -1404,13 +1405,13 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
if (!PuffType) PuffType = PClass::FindClass(NAME_BulletPuff); if (!PuffType) PuffType = PClass::FindClass(NAME_BulletPuff);
int puffFlags = LAF_ISMELEEATTACK | (flags & CPF_NORANDOMPUFFZ)? LAF_NORANDOMPUFFZ : 0; int puffFlags = LAF_ISMELEEATTACK | (flags & CPF_NORANDOMPUFFZ)? LAF_NORANDOMPUFFZ : 0;
P_LineAttack (self, angle, Range, pitch, Damage, NAME_Melee, PuffType, puffFlags, &linetarget); P_LineAttack (self, angle, Range, pitch, Damage, NAME_Melee, PuffType, puffFlags, &linetarget, &actualdamage);
// turn to face target // turn to face target
if (linetarget) if (linetarget)
{ {
if (LifeSteal) if (LifeSteal && !(linetarget->flags5 & MF5_DONTDRAIN))
P_GiveBody (self, (Damage * LifeSteal) >> FRACBITS); P_GiveBody (self, (actualdamage * LifeSteal) >> FRACBITS);
if (weapon != NULL) if (weapon != NULL)
{ {

View file

@ -182,6 +182,7 @@ static FFlagDef ActorFlags[]=
DEFINE_FLAG(MF4, NOSKIN, AActor, flags4), DEFINE_FLAG(MF4, NOSKIN, AActor, flags4),
DEFINE_FLAG(MF4, BOSSDEATH, AActor, flags4), DEFINE_FLAG(MF4, BOSSDEATH, AActor, flags4),
DEFINE_FLAG(MF5, DONTDRAIN, AActor, flags5),
DEFINE_FLAG(MF5, NODROPOFF, AActor, flags5), DEFINE_FLAG(MF5, NODROPOFF, AActor, flags5),
DEFINE_FLAG(MF5, COUNTSECRET, AActor, flags5), DEFINE_FLAG(MF5, COUNTSECRET, AActor, flags5),
DEFINE_FLAG(MF5, NODAMAGE, AActor, flags5), DEFINE_FLAG(MF5, NODAMAGE, AActor, flags5),

View file

@ -76,7 +76,7 @@ const char *GetVersionString();
// Use 4500 as the base git save version, since it's higher than the // Use 4500 as the base git save version, since it's higher than the
// SVN revision ever got. // SVN revision ever got.
#define SAVEVER 4500 #define SAVEVER 4501
#define SAVEVERSTRINGIFY2(x) #x #define SAVEVERSTRINGIFY2(x) #x
#define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x) #define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x)

View file

@ -14,6 +14,11 @@
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#ifdef _WIN32
#define popen _popen
#define pclose _pclose
#endif
// Used to strip newline characters from lines read by fgets. // Used to strip newline characters from lines read by fgets.
void stripnl(char *str) void stripnl(char *str)
{ {
@ -29,17 +34,16 @@ void stripnl(char *str)
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
char *name; char vertag[64], lastlog[64], lasthash[64], *hash = NULL;
char vertag[64], lastlog[64], lasthash[64], run[256], *hash = NULL;
FILE *stream = NULL; FILE *stream = NULL;
int gotrev = 0, needupdate = 1; int gotrev = 0, needupdate = 1;
vertag[0] = '\0'; vertag[0] = '\0';
lastlog[0] = '\0'; lastlog[0] = '\0';
if (argc != 3) if (argc != 2)
{ {
fprintf(stderr, "Usage: %s <repository directory> <path to gitinfo.h>\n", argv[0]); fprintf(stderr, "Usage: %s <path to gitinfo.h>\n", argv[0]);
return 1; return 1;
} }
@ -47,33 +51,19 @@ int main(int argc, char **argv)
// on a tag, it returns that tag. Otherwise it returns <most recent tag>-<number of // on a tag, it returns that tag. Otherwise it returns <most recent tag>-<number of
// commits since the tag>-<short hash>. // commits since the tag>-<short hash>.
// Use git log to get the time of the latest commit in ISO 8601 format and its full hash. // Use git log to get the time of the latest commit in ISO 8601 format and its full hash.
sprintf(run, "git describe --tags && git log -1 --format=%%ai*%%H", argv[1]); stream = popen("git describe --tags && git log -1 --format=%ai*%H", "r");
if ((name = tempnam(NULL, "gitout")) != NULL)
if (NULL != stream)
{ {
#ifdef __APPLE__ if (fgets(vertag, sizeof vertag, stream) == vertag &&
// tempnam will return errno of 2 even though it is successful for our purposes. fgets(lastlog, sizeof lastlog, stream) == lastlog)
errno = 0;
#endif
if((stream = freopen(name, "w+b", stdout)) != NULL &&
system(run) == 0 &&
errno == 0 &&
fseek(stream, 0, SEEK_SET) == 0 &&
fgets(vertag, sizeof vertag, stream) == vertag &&
fgets(lastlog, sizeof lastlog, stream) == lastlog)
{ {
stripnl(vertag); stripnl(vertag);
stripnl(lastlog); stripnl(lastlog);
gotrev = 1; gotrev = 1;
} }
}
if (stream != NULL) pclose(stream);
{
fclose(stream);
remove(name);
}
if (name != NULL)
{
free(name);
} }
if (gotrev) if (gotrev)
@ -95,7 +85,7 @@ int main(int argc, char **argv)
hash = lastlog + 1; hash = lastlog + 1;
} }
stream = fopen (argv[2], "r"); stream = fopen (argv[1], "r");
if (stream != NULL) if (stream != NULL)
{ {
if (!gotrev) if (!gotrev)
@ -119,7 +109,7 @@ int main(int argc, char **argv)
if (needupdate) if (needupdate)
{ {
stream = fopen (argv[2], "w"); stream = fopen (argv[1], "w");
if (stream == NULL) if (stream == NULL)
{ {
return 1; return 1;
@ -135,11 +125,11 @@ int main(int argc, char **argv)
"#define GIT_TIME \"%s\"\n", "#define GIT_TIME \"%s\"\n",
hash, vertag, hash, lastlog); hash, vertag, hash, lastlog);
fclose(stream); fclose(stream);
fprintf(stderr, "%s updated to commit %s.\n", argv[2], vertag); fprintf(stderr, "%s updated to commit %s.\n", argv[1], vertag);
} }
else else
{ {
fprintf (stderr, "%s is up to date at commit %s.\n", argv[2], vertag); fprintf (stderr, "%s is up to date at commit %s.\n", argv[1], vertag);
} }
return 0; return 0;

View file

@ -1,5 +1,31 @@
6DC9F6CCEAE7A91AEC48EBE506F22BC4 // void.wad MAP01 6DC9F6CCEAE7A91AEC48EBE506F22BC4 // void.wad MAP01
{ {
// Slightly squash the pillars in the starting room with "stimpacks"
// floating on them so that they can be obtained.
sectorflooroffset 62 -8
setwallyscale 286 front bot 1.090909
setwallyscale 287 front bot 1.090909
setwallyscale 288 front bot 1.090909
setwallyscale 289 front bot 1.090909
sectorflooroffset 63 -8
setwallyscale 290 front bot 1.090909
setwallyscale 291 front bot 1.090909
setwallyscale 292 front bot 1.090909
setwallyscale 293 front bot 1.090909
sectorflooroffset 118 -8
setwallyscale 710 front bot 1.090909
setwallyscale 711 front bot 1.090909
setwallyscale 712 front bot 1.090909
setwallyscale 713 front bot 1.090909
sectorflooroffset 119 -8
setwallyscale 714 front bot 1.090909
setwallyscale 715 front bot 1.090909
setwallyscale 716 front bot 1.090909
setwallyscale 717 front bot 1.090909
setslopeoverflow setslopeoverflow
} }
@ -306,34 +332,6 @@ F481922F4881F74760F3C0437FD5EDD0 // map03
setactivation 455 16 // SPAC_Push setactivation 455 16 // SPAC_Push
} }
6DC9F6CCEAE7A91AEC48EBE506F22BC4 // Void
{
// Slightly squash the pillars in the starting room with "stimpacks"
// floating on them so that they can be obtained.
sectorflooroffset 62 -8
setwallyscale 286 front bot 1.090909
setwallyscale 287 front bot 1.090909
setwallyscale 288 front bot 1.090909
setwallyscale 289 front bot 1.090909
sectorflooroffset 63 -8
setwallyscale 290 front bot 1.090909
setwallyscale 291 front bot 1.090909
setwallyscale 292 front bot 1.090909
setwallyscale 293 front bot 1.090909
sectorflooroffset 118 -8
setwallyscale 710 front bot 1.090909
setwallyscale 711 front bot 1.090909
setwallyscale 712 front bot 1.090909
setwallyscale 713 front bot 1.090909
sectorflooroffset 119 -8
setwallyscale 714 front bot 1.090909
setwallyscale 715 front bot 1.090909
setwallyscale 716 front bot 1.090909
setwallyscale 717 front bot 1.090909
}
65A1EB4C87386F290816660A52932FF1 // Master Levels, garrison.wad 65A1EB4C87386F290816660A52932FF1 // Master Levels, garrison.wad
{ {
@ -349,3 +347,9 @@ F481922F4881F74760F3C0437FD5EDD0 // map03
setlinespecial 397 NoiseAlert 0 0 0 0 0 setlinespecial 397 NoiseAlert 0 0 0 0 0
setlinespecial 411 NoiseAlert 0 0 0 0 0 setlinespecial 411 NoiseAlert 0 0 0 0 0
} }
952CC8D03572E17BA550B01B366EFBB9 // Cheogsh map01
{
// make the blue key spawn above the 3D floor
setthingz 918 296
}

View file

@ -29,7 +29,7 @@
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
Description="Checking gitinfo.h..." Description="Checking gitinfo.h..."
CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src src/gitinfo.h" CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src/gitinfo.h"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -152,7 +152,7 @@
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
Description="Checking gitinfo.h..." Description="Checking gitinfo.h..."
CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src src/gitinfo.h" CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src/gitinfo.h"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -265,7 +265,7 @@
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
Description="Checking gitinfo.h..." Description="Checking gitinfo.h..."
CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src src/gitinfo.h" CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src/gitinfo.h"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -372,7 +372,7 @@
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
Description="Checking gitinfo.h..." Description="Checking gitinfo.h..."
CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src src/gitinfo.h" CommandLine="&quot;$(OutDir)\updaterevision.exe&quot; src/gitinfo.h"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"