Merge branch 'master' into v2.x

This commit is contained in:
Christoph Oelckers 2014-09-14 23:07:30 +02:00
commit 07ef7d3d59
16 changed files with 67 additions and 26 deletions

View file

@ -857,6 +857,7 @@ public:
int special1; // Special info int special1; // Special info
int special2; // Special info int special2; // Special info
int weaponspecial; // Special info for weapons.
int health; int health;
BYTE movedir; // 0-7 BYTE movedir; // 0-7
SBYTE visdir; SBYTE visdir;

View file

@ -2154,6 +2154,13 @@ static int PatchText (int oldSize)
{ {
strncpy (deh.PlayerSprite, newStr, 4); strncpy (deh.PlayerSprite, newStr, 4);
} }
for (unsigned ii = 0; ii < OrgSprNames.Size(); ii++)
{
if (!stricmp(OrgSprNames[ii].c, oldStr))
{
strcpy(OrgSprNames[ii].c, newStr);
}
}
// If this sprite is used by a pickup, then the DehackedPickup sprite map // If this sprite is used by a pickup, then the DehackedPickup sprite map
// needs to be updated too. // needs to be updated too.
for (i = 0; (size_t)i < countof(DehSpriteMappings); ++i) for (i = 0; (size_t)i < countof(DehSpriteMappings); ++i)

View file

@ -56,7 +56,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CMaceAttack)
} }
} }
// didn't find any creatures, so try to strike any walls // didn't find any creatures, so try to strike any walls
player->mo->special1 = 0; player->mo->weaponspecial = 0;
angle = player->mo->angle; angle = player->mo->angle;
slope = P_AimLineAttack (player->mo, angle, MELEERANGE, &linetarget); slope = P_AimLineAttack (player->mo, angle, MELEERANGE, &linetarget);

View file

@ -164,7 +164,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CStaffMissileSlither)
DEFINE_ACTION_FUNCTION(AActor, A_CStaffInitBlink) DEFINE_ACTION_FUNCTION(AActor, A_CStaffInitBlink)
{ {
self->special1 = (pr_blink()>>1)+20; self->weaponspecial = (pr_blink()>>1)+20;
} }
//============================================================================ //============================================================================
@ -177,10 +177,10 @@ DEFINE_ACTION_FUNCTION(AActor, A_CStaffCheckBlink)
{ {
if (self->player && self->player->ReadyWeapon) if (self->player && self->player->ReadyWeapon)
{ {
if (!--self->special1) if (!--self->weaponspecial)
{ {
P_SetPsprite (self->player, ps_weapon, self->player->ReadyWeapon->FindState ("Blink")); P_SetPsprite (self->player, ps_weapon, self->player->ReadyWeapon->FindState ("Blink"));
self->special1 = (pr_blink()+50)>>2; self->weaponspecial = (pr_blink()+50)>>2;
} }
else else
{ {

View file

@ -253,7 +253,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FAxeAttack)
} }
} }
// didn't find any creatures, so try to strike any walls // didn't find any creatures, so try to strike any walls
pmo->special1 = 0; pmo->weaponspecial = 0;
angle = pmo->angle; angle = pmo->angle;
slope = P_AimLineAttack (pmo, angle, MELEERANGE, &linetarget); slope = P_AimLineAttack (pmo, angle, MELEERANGE, &linetarget);

View file

@ -57,7 +57,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FHammerAttack)
{ {
P_ThrustMobj (linetarget, angle, power); P_ThrustMobj (linetarget, angle, power);
} }
pmo->special1 = false; // Don't throw a hammer pmo->weaponspecial = false; // Don't throw a hammer
goto hammerdone; goto hammerdone;
} }
} }
@ -73,7 +73,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FHammerAttack)
{ {
P_ThrustMobj(linetarget, angle, power); P_ThrustMobj(linetarget, angle, power);
} }
pmo->special1 = false; // Don't throw a hammer pmo->weaponspecial = false; // Don't throw a hammer
goto hammerdone; goto hammerdone;
} }
} }
@ -83,11 +83,11 @@ DEFINE_ACTION_FUNCTION(AActor, A_FHammerAttack)
slope = P_AimLineAttack (pmo, angle, HAMMER_RANGE, &linetarget, 0, ALF_CHECK3D); slope = P_AimLineAttack (pmo, angle, HAMMER_RANGE, &linetarget, 0, ALF_CHECK3D);
if (P_LineAttack (pmo, angle, HAMMER_RANGE, slope, damage, NAME_Melee, PClass::FindClass ("HammerPuff"), true) != NULL) if (P_LineAttack (pmo, angle, HAMMER_RANGE, slope, damage, NAME_Melee, PClass::FindClass ("HammerPuff"), true) != NULL)
{ {
pmo->special1 = false; pmo->weaponspecial = false;
} }
else else
{ {
pmo->special1 = true; pmo->weaponspecial = true;
} }
hammerdone: hammerdone:
// Don't spawn a hammer if the player doesn't have enough mana // Don't spawn a hammer if the player doesn't have enough mana
@ -95,7 +95,7 @@ hammerdone:
!player->ReadyWeapon->CheckAmmo (player->ReadyWeapon->bAltFire ? !player->ReadyWeapon->CheckAmmo (player->ReadyWeapon->bAltFire ?
AWeapon::AltFire : AWeapon::PrimaryFire, false, true)) AWeapon::AltFire : AWeapon::PrimaryFire, false, true))
{ {
pmo->special1 = false; pmo->weaponspecial = false;
} }
return; return;
} }
@ -116,7 +116,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FHammerThrow)
return; return;
} }
if (!player->mo->special1) if (!player->mo->weaponspecial)
{ {
return; return;
} }

View file

@ -66,7 +66,7 @@ static bool TryPunch(APlayerPawn *pmo, angle_t angle, int damage, fixed_t power)
slope = P_AimLineAttack (pmo, angle, 2*MELEERANGE, &linetarget); slope = P_AimLineAttack (pmo, angle, 2*MELEERANGE, &linetarget);
if (linetarget != NULL) if (linetarget != NULL)
{ {
if (++pmo->special1 >= 3) if (++pmo->weaponspecial >= 3)
{ {
damage <<= 1; damage <<= 1;
power *= 3; power *= 3;
@ -117,9 +117,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_FPunchAttack)
if (TryPunch(pmo, pmo->angle + i*(ANG45/16), damage, power) || if (TryPunch(pmo, pmo->angle + i*(ANG45/16), damage, power) ||
TryPunch(pmo, pmo->angle - i*(ANG45/16), damage, power)) TryPunch(pmo, pmo->angle - i*(ANG45/16), damage, power))
{ // hit something { // hit something
if (pmo->special1 >= 3) if (pmo->weaponspecial >= 3)
{ {
pmo->special1 = 0; pmo->weaponspecial = 0;
P_SetPsprite (player, ps_weapon, player->ReadyWeapon->FindState ("Fire2")); P_SetPsprite (player, ps_weapon, player->ReadyWeapon->FindState ("Fire2"));
S_Sound (pmo, CHAN_VOICE, "*fistgrunt", 1, ATTN_NORM); S_Sound (pmo, CHAN_VOICE, "*fistgrunt", 1, ATTN_NORM);
} }
@ -127,7 +127,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FPunchAttack)
} }
} }
// didn't find any creatures, so try to strike any walls // didn't find any creatures, so try to strike any walls
pmo->special1 = 0; pmo->weaponspecial = 0;
AActor *linetarget; AActor *linetarget;
int slope = P_AimLineAttack (pmo, pmo->angle, MELEERANGE, &linetarget); int slope = P_AimLineAttack (pmo, pmo->angle, MELEERANGE, &linetarget);

View file

@ -499,7 +499,9 @@ void G_ChangeLevel(const char *levelname, int position, int flags, int nextSkill
} }
else if (strncmp(levelname, "enDSeQ", 6) != 0) else if (strncmp(levelname, "enDSeQ", 6) != 0)
{ {
nextinfo = FindLevelInfo (levelname, false); FString reallevelname = levelname;
CheckWarpTransMap(reallevelname, true);
nextinfo = FindLevelInfo (reallevelname, false);
if (nextinfo != NULL) if (nextinfo != NULL)
{ {
level_info_t *nextredir = nextinfo->CheckLevelRedirect(); level_info_t *nextredir = nextinfo->CheckLevelRedirect();
@ -507,8 +509,12 @@ void G_ChangeLevel(const char *levelname, int position, int flags, int nextSkill
{ {
nextinfo = nextredir; nextinfo = nextredir;
} }
nextlevel = nextinfo->MapName;
}
else
{
nextlevel = levelname;
} }
nextlevel = nextinfo->MapName;
} }
else else
{ {
@ -1169,6 +1175,7 @@ void G_FinishTravel ()
pawn->lastenemy = NULL; pawn->lastenemy = NULL;
pawn->player->mo = pawn; pawn->player->mo = pawn;
pawn->player->camera = pawn; pawn->player->camera = pawn;
pawn->flags2 &= ~MF2_BLASTED;
DObject::StaticPointerSubstitution (oldpawn, pawn); DObject::StaticPointerSubstitution (oldpawn, pawn);
oldpawn->Destroy(); oldpawn->Destroy();
pawndup->Destroy (); pawndup->Destroy ();

View file

@ -146,7 +146,6 @@ void ST_LoadCrosshair(bool alwaysload)
{ {
int num = 0; int num = 0;
char name[16], size; char name[16], size;
int lump;
if (!crosshairforce && if (!crosshairforce &&
players[consoleplayer].camera != NULL && players[consoleplayer].camera != NULL &&
@ -179,18 +178,20 @@ void ST_LoadCrosshair(bool alwaysload)
num = -num; num = -num;
} }
size = (SCREENWIDTH < 640) ? 'S' : 'B'; size = (SCREENWIDTH < 640) ? 'S' : 'B';
mysnprintf (name, countof(name), "XHAIR%c%d", size, num); mysnprintf (name, countof(name), "XHAIR%c%d", size, num);
if ((lump = Wads.CheckNumForName (name, ns_graphics)) == -1) FTextureID texid = TexMan.CheckForTexture(name, FTexture::TEX_MiscPatch, FTextureManager::TEXMAN_TryAny | FTextureManager::TEXMAN_ShortNameOnly);
if (!texid.isValid())
{ {
mysnprintf (name, countof(name), "XHAIR%c1", size); mysnprintf (name, countof(name), "XHAIR%c1", size);
if ((lump = Wads.CheckNumForName (name, ns_graphics)) == -1) texid = TexMan.CheckForTexture(name, FTexture::TEX_MiscPatch, FTextureManager::TEXMAN_TryAny | FTextureManager::TEXMAN_ShortNameOnly);
if (!texid.isValid())
{ {
strcpy (name, "XHAIRS1"); texid = TexMan.CheckForTexture("XHAIRS1", FTexture::TEX_MiscPatch, FTextureManager::TEXMAN_TryAny | FTextureManager::TEXMAN_ShortNameOnly);
} }
num = 1;
} }
CrosshairNum = num; CrosshairNum = num;
CrosshairImage = TexMan[TexMan.CheckForTexture(name, FTexture::TEX_MiscPatch)]; CrosshairImage = TexMan[texid];
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View file

@ -1600,7 +1600,10 @@ bool P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params)
if (!(gameinfo.gametype & (GAME_DoomStrifeChex)) && if (!(gameinfo.gametype & (GAME_DoomStrifeChex)) &&
!multiplayer && !multiplayer &&
players[0].health <= 0) players[0].health <= 0 &&
actor->goal == NULL &&
gamestate != GS_TITLELEVEL
)
{ // Single player game and player is dead; look for monsters { // Single player game and player is dead; look for monsters
return P_LookForMonsters (actor); return P_LookForMonsters (actor);
} }

View file

@ -206,6 +206,10 @@ void AActor::Serialize (FArchive &arc)
{ {
arc << flags7; arc << flags7;
} }
if (SaveVersion >= 4511)
{
arc << weaponspecial;
}
arc << special1 arc << special1
<< special2 << special2
<< health << health

View file

@ -211,6 +211,7 @@ void P_BringUpWeapon (player_t *player)
// make sure that the previous weapon's flash state is terminated. // make sure that the previous weapon's flash state is terminated.
// When coming here from a weapon drop it may still be active. // When coming here from a weapon drop it may still be active.
P_SetPsprite(player, ps_flash, NULL); P_SetPsprite(player, ps_flash, NULL);
player->mo->weaponspecial = 0;
} }

View file

@ -629,7 +629,16 @@ void APlayerPawn::BeginPlay ()
FString crouchspritename = sprites[crouchsprite].name; FString crouchspritename = sprites[crouchsprite].name;
int spritenorm = Wads.CheckNumForName(normspritename + "A1", ns_sprites); int spritenorm = Wads.CheckNumForName(normspritename + "A1", ns_sprites);
if (spritenorm==-1)
{
spritenorm = Wads.CheckNumForName(normspritename + "A0", ns_sprites);
}
int spritecrouch = Wads.CheckNumForName(crouchspritename + "A1", ns_sprites); int spritecrouch = Wads.CheckNumForName(crouchspritename + "A1", ns_sprites);
if (spritecrouch==-1)
{
spritecrouch = Wads.CheckNumForName(crouchspritename + "A0", ns_sprites);
}
if (spritenorm==-1 || spritecrouch ==-1) if (spritenorm==-1 || spritecrouch ==-1)
{ {

View file

@ -1028,7 +1028,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomMissile)
else if (flags & CMF_CHECKTARGETDEAD) else if (flags & CMF_CHECKTARGETDEAD)
{ {
// Target is dead and the attack shall be aborted. // Target is dead and the attack shall be aborted.
if (self->SeeState != NULL) self->SetState(self->SeeState); if (self->SeeState != NULL && (self->health > 0 || !(self->flags3 & MF3_ISMONSTER))) self->SetState(self->SeeState);
} }
} }

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 4511 #define SAVEVER 4512
#define SAVEVERSTRINGIFY2(x) #x #define SAVEVERSTRINGIFY2(x) #x
#define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x) #define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x)

View file

@ -198,6 +198,14 @@ E2B5D1400279335811C1C1C0B437D9C8 // Deathknights of the Dark Citadel, map54
clearlineflags 1069 0x200 clearlineflags 1069 0x200
} }
CBDE77E3ACB4B166D53C1812E5C72F54 // Hexen IWAD map04
{
setthingz 49 0
setthingz 50 0
setthingz 51 0
setthingz 52 0
}
3F249EDD62A3A08F53A6C53CB4C7ABE5 // Artica 3 map01 3F249EDD62A3A08F53A6C53CB4C7ABE5 // Artica 3 map01
{ {
clearlinespecial 66 clearlinespecial 66