SVN r37 (trunk)

This commit is contained in:
Christoph Oelckers 2006-04-13 16:52:24 +00:00
parent b00360a08c
commit fdeb374fdb
14 changed files with 148 additions and 34 deletions

View file

@ -1,3 +1,22 @@
April 13, 2006 (Changes by Graf Zahl)
- Fixed: A non-spectral attack set any spectral target to its missile state.
This is not supposed to happen.
- Fixed: The Prison Key was misspelled in the pickup message.
- Added missing lock messages for Strife.
- Fixed some ammo pickup values for Strife.
- Added the missing messages when killing a spectre in Strife.
- Fixed: DImpactDecal's default constructor called ChangeStatNum which caused
a crash. Now it calls DBaseDecal's constructor that allows changing the
statnum.
- Added additive translucency to the Ironlich's projectiles.
- Added a check for AInventory to PickConversationReply before giving an item
to the player. This could crash if non-inventory items were given.
- Added a few console commands useful for map testing:
* 'monster' lists all monsters and their position.
* 'itemd' does the same for items.
* 'changesky' changes the sky texture. Useful for trying out different skies.
* 'linetarget' prints some information about the monster the player is aiming at.
April 12, 2006 April 12, 2006
- Fixed: Using printinv before starting a game crashed. - Fixed: Using printinv before starting a game crashed.
- Fixed: DMover::MovePlane() would not stop moving the plane when it exactly - Fixed: DMover::MovePlane() would not stop moving the plane when it exactly

View file

@ -64,6 +64,7 @@
#include "r_main.h" #include "r_main.h"
#include "templates.h" #include "templates.h"
#include "p_local.h" #include "p_local.h"
#include "r_sky.h"
extern FILE *Logfile; extern FILE *Logfile;
@ -670,3 +671,82 @@ CCMD (save)
DefaultExtension (fname, ".zds"); DefaultExtension (fname, ".zds");
G_SaveGame (fname.GetChars(), argv.argc() > 2 ? argv[2] : argv[1]); G_SaveGame (fname.GetChars(), argv.argc() > 2 ? argv[2] : argv[1]);
} }
//-----------------------------------------------------------------------------
//
//
//
//-----------------------------------------------------------------------------
CCMD(linetarget)
{
if (CheckCheatmode () || players[consoleplayer].mo == NULL) return;
P_AimLineAttack(players[consoleplayer].mo,players[consoleplayer].mo->angle,MISSILERANGE, 0);
if (linetarget)
{
Printf("Target=%s, Health=%d, Spawnhealth=%d\n",linetarget->GetClass()->Name+1,linetarget->health,linetarget->GetDefault()->health);
}
else Printf("No target found\n");
}
//-----------------------------------------------------------------------------
//
//
//
//-----------------------------------------------------------------------------
CCMD(monster)
{
AActor * mo;
if (CheckCheatmode ()) return;
TThinkerIterator<AActor> it;
while (mo=it.Next())
{
if (mo->flags3&MF3_ISMONSTER && !(mo->flags&MF_CORPSE) && !(mo->flags&MF_FRIENDLY))
{
Printf ("%s at (%d,%d,%d)\n", mo->GetClass()->Name+1, mo->x>>16, mo->y>>16, mo->z>>16);
}
}
}
//-----------------------------------------------------------------------------
//
//
//
//-----------------------------------------------------------------------------
CCMD(items)
{
AActor * mo;
if (CheckCheatmode ()) return;
TThinkerIterator<AActor> it;
while (mo=it.Next())
{
if (mo->IsKindOf(RUNTIME_CLASS(AInventory)) && mo->flags&MF_SPECIAL)
{
Printf ("%s at (%d,%d,%d)\n",mo->GetClass()->Name+1,mo->x>>16,mo->y>>16,mo->z>>16);
}
}
}
//-----------------------------------------------------------------------------
//
//
//
//-----------------------------------------------------------------------------
CCMD(changesky)
{
const char *sky1name;
if (netgame || argv.argc()<2) return;
sky1name = argv[1];
if (sky1name[0] != 0)
{
strncpy (level.skypic1, sky1name, 8);
sky1texture = TexMan.GetTexture (sky1name, FTexture::TEX_Wall, FTextureManager::TEXMAN_Overridable);
}
R_InitSkyMap ();
sky1pos = sky2pos = 0;
}

View file

@ -122,6 +122,7 @@ IMPLEMENT_ACTOR (AHeadFX1, Heretic, -1, 164)
PROP_Damage (1) PROP_Damage (1)
PROP_Flags (MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY) PROP_Flags (MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY)
PROP_Flags2 (MF2_NOTELEPORT|MF2_THRUGHOST) PROP_Flags2 (MF2_NOTELEPORT|MF2_THRUGHOST)
PROP_RenderStyle (STYLE_Add)
PROP_SpawnState (S_HEADFX1) PROP_SpawnState (S_HEADFX1)
PROP_DeathState (S_HEADFXI1) PROP_DeathState (S_HEADFXI1)
@ -160,6 +161,7 @@ IMPLEMENT_ACTOR (AHeadFX2, Heretic, -1, 0)
PROP_Damage (3) PROP_Damage (3)
PROP_Flags (MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY) PROP_Flags (MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY)
PROP_Flags2 (MF2_NOTELEPORT) PROP_Flags2 (MF2_NOTELEPORT)
PROP_RenderStyle (STYLE_Add)
PROP_SpawnState (S_HEADFX2) PROP_SpawnState (S_HEADFX2)
PROP_DeathState (S_HEADFXI2) PROP_DeathState (S_HEADFXI2)
@ -196,6 +198,7 @@ IMPLEMENT_ACTOR (AHeadFX3, Heretic, -1, 0)
PROP_Damage (5) PROP_Damage (5)
PROP_Flags (MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY) PROP_Flags (MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY)
PROP_Flags2 (MF2_WINDTHRUST|MF2_NOTELEPORT) PROP_Flags2 (MF2_WINDTHRUST|MF2_NOTELEPORT)
PROP_RenderStyle (STYLE_Add)
PROP_SpawnState (S_HEADFX3) PROP_SpawnState (S_HEADFX3)
PROP_DeathState (S_HEADFXI3) PROP_DeathState (S_HEADFXI3)

View file

@ -566,8 +566,8 @@ void DImpactDecal::Serialize (FArchive &arc)
} }
DImpactDecal::DImpactDecal () DImpactDecal::DImpactDecal ()
: DBaseDecal (STAT_AUTODECAL, 0)
{ {
ChangeStatNum (STAT_AUTODECAL);
ImpactCount++; ImpactCount++;
} }

View file

@ -6,6 +6,7 @@
#include "s_sound.h" #include "s_sound.h"
#include "m_random.h" #include "m_random.h"
#include "a_strifeglobal.h" #include "a_strifeglobal.h"
#include "c_console.h"
static FRandom pr_spectrespawn ("AlienSpectreSpawn"); static FRandom pr_spectrespawn ("AlienSpectreSpawn");
static FRandom pr_212e4 ("212e4"); static FRandom pr_212e4 ("212e4");
@ -509,13 +510,13 @@ void A_AlienSpectreDeath (AActor *self)
} }
else if (self->GetClass() == RUNTIME_CLASS(AAlienSpectre2)) else if (self->GetClass() == RUNTIME_CLASS(AAlienSpectre2))
{ {
// You Killed The Bishop! C_MidPrint("You Killed The Bishop!");
log = 74; log = 74;
player->GiveInventoryType (QuestItemClasses[20]); player->GiveInventoryType (QuestItemClasses[20]);
} }
else if (self->GetClass() == RUNTIME_CLASS(AAlienSpectre3)) else if (self->GetClass() == RUNTIME_CLASS(AAlienSpectre3))
{ {
// You've Killed The Oracle! C_MidPrint("You've Killed The Oracle!");
// If there are any Oracles still alive, kill them. // If there are any Oracles still alive, kill them.
TThinkerIterator<AOracle> it; TThinkerIterator<AOracle> it;
AOracle *oracle; AOracle *oracle;
@ -545,7 +546,7 @@ void A_AlienSpectreDeath (AActor *self)
} }
else if (self->GetClass() == RUNTIME_CLASS(AAlienSpectre4)) else if (self->GetClass() == RUNTIME_CLASS(AAlienSpectre4))
{ {
// You Killed Macil! C_MidPrint("You Killed Macil!");
player->GiveInventoryType (QuestItemClasses[23]); player->GiveInventoryType (QuestItemClasses[23]);
if (player->FindInventory (QuestItemClasses[24]) == NULL) if (player->FindInventory (QuestItemClasses[24]) == NULL)
{ // Richter has taken over. Macil is a snake. { // Richter has taken over. Macil is a snake.
@ -558,7 +559,7 @@ void A_AlienSpectreDeath (AActor *self)
} }
else if (self->GetClass() == RUNTIME_CLASS(AAlienSpectre5)) else if (self->GetClass() == RUNTIME_CLASS(AAlienSpectre5))
{ {
// You've Killed the Loremaster! C_MidPrint("You've Killed the Loremaster!");
ASigil *sigil; ASigil *sigil;
player->GiveInventoryType (QuestItemClasses[25]); player->GiveInventoryType (QuestItemClasses[25]);

View file

@ -26,7 +26,7 @@ public:
} }
void NoBlockingSet () void NoBlockingSet ()
{ {
P_DropItem (this, "EnergyPod", -1, 256); P_DropItem (this, "EnergyPod", 20, 256);
} }
}; };

View file

@ -56,7 +56,7 @@ IMPLEMENT_ACTOR (APhosphorusGrenadeRounds, Strife, 153, 0)
PROP_StrifeTeaserType2 (175) PROP_StrifeTeaserType2 (175)
PROP_Inventory_Amount (8) PROP_Inventory_Amount (8)
PROP_Inventory_MaxAmount (16) PROP_Inventory_MaxAmount (16)
PROP_Ammo_BackpackAmount (4) PROP_Ammo_BackpackAmount (2)
PROP_Ammo_BackpackMaxAmount (32) PROP_Ammo_BackpackMaxAmount (32)
PROP_Inventory_Icon ("I_GRN2") PROP_Inventory_Icon ("I_GRN2")
PROP_Tag ("Phoshorus-Grenade_Rounds") // "Fire-Grenade_Rounds" in the Teaser PROP_Tag ("Phoshorus-Grenade_Rounds") // "Fire-Grenade_Rounds" in the Teaser
@ -184,7 +184,7 @@ IMPLEMENT_ACTOR (AEnergyPod, Strife, 2047, 75)
PROP_StrifeType (183) PROP_StrifeType (183)
PROP_StrifeTeaserType (177) PROP_StrifeTeaserType (177)
PROP_StrifeTeaserType2 (181) PROP_StrifeTeaserType2 (181)
PROP_Inventory_Amount (40) PROP_Inventory_Amount (20)
PROP_Inventory_MaxAmount (400) PROP_Inventory_MaxAmount (400)
PROP_Ammo_BackpackAmount (20) PROP_Ammo_BackpackAmount (20)
PROP_Ammo_BackpackMaxAmount (800) PROP_Ammo_BackpackMaxAmount (800)
@ -235,7 +235,7 @@ IMPLEMENT_ACTOR (APoisonBolts, Strife, 115, 0)
PROP_StrifeType (185) PROP_StrifeType (185)
PROP_StrifeTeaserType (179) PROP_StrifeTeaserType (179)
PROP_StrifeTeaserType2 (183) PROP_StrifeTeaserType2 (183)
PROP_Inventory_Amount (20) PROP_Inventory_Amount (10)
PROP_Inventory_MaxAmount (25) PROP_Inventory_MaxAmount (25)
PROP_Ammo_BackpackAmount (2) PROP_Ammo_BackpackAmount (2)
PROP_Ammo_BackpackMaxAmount (50) PROP_Ammo_BackpackMaxAmount (50)

View file

@ -21,7 +21,7 @@ public:
} }
void NoBlockingSet () void NoBlockingSet ()
{ {
P_DropItem (this, "CrateOfMissiles", -1, 256); P_DropItem (this, "CrateOfMissiles", 20, 256);
} }
}; };

View file

@ -157,7 +157,7 @@ bool APrisonKey::TryPickup (AActor *toucher)
const char *APrisonKey::PickupMessage () const char *APrisonKey::PickupMessage ()
{ {
return "You picked up the Prsion Key."; return "You picked up the Prison Key.";
} }
// Severed Hand ------------------------------------------------------------- // Severed Hand -------------------------------------------------------------

View file

@ -1766,7 +1766,7 @@ IMPLEMENT_ACTOR (AStrifeGrenadeLauncher, Strife, 154, 0)
PROP_Weapon_SelectionOrder (2400) PROP_Weapon_SelectionOrder (2400)
PROP_Weapon_AmmoUse1 (1) PROP_Weapon_AmmoUse1 (1)
PROP_Weapon_AmmoGive1 (8) PROP_Weapon_AmmoGive1 (12)
PROP_Weapon_UpState (S_HEGRENADE_UP) PROP_Weapon_UpState (S_HEGRENADE_UP)
PROP_Weapon_DownState (S_HEGRENADE_DOWN) PROP_Weapon_DownState (S_HEGRENADE_DOWN)
PROP_Weapon_ReadyState (S_HEGRENADE) PROP_Weapon_ReadyState (S_HEGRENADE)

View file

@ -110,7 +110,7 @@ END_DEFAULTS
void ATemplar::NoBlockingSet () void ATemplar::NoBlockingSet ()
{ {
P_DropItem (this, "EnergyPod", -1, 256); P_DropItem (this, "EnergyPod", 20, 256);
} }
class AMaulerPuff : public AActor class AMaulerPuff : public AActor

View file

@ -956,6 +956,8 @@ static void PickConversationReply ()
// If this reply gives you something, then try to receive it. // If this reply gives you something, then try to receive it.
takestuff = true; takestuff = true;
if (reply->GiveType != NULL) if (reply->GiveType != NULL)
{
if (reply->GiveType->IsDescendantOf(RUNTIME_CLASS(AInventory)))
{ {
if (reply->GiveType->IsDescendantOf(RUNTIME_CLASS(AWeapon))) if (reply->GiveType->IsDescendantOf(RUNTIME_CLASS(AWeapon)))
{ {
@ -982,6 +984,13 @@ static void PickConversationReply ()
} }
} }
} }
else
{
// Trying to give a non-inventory item.
takestuff = false;
Printf("Attempting to give non-inventory item %s\n", reply->GiveType->Name+1);
}
}
// Take away required items if the give was successful or none was needed. // Take away required items if the give was successful or none was needed.
if (takestuff) if (takestuff)

View file

@ -824,10 +824,12 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage
{ {
if (inflictor == NULL || !(inflictor->flags4 & MF4_SPECTRAL)) if (inflictor == NULL || !(inflictor->flags4 & MF4_SPECTRAL))
{ {
/*
if (target->MissileState != NULL) if (target->MissileState != NULL)
{ {
target->SetState (target->MissileState); target->SetState (target->MissileState);
} }
*/
return; return;
} }
} }

View file

@ -435,7 +435,7 @@ Lock 11 Strife
Lock 12 Strife Lock 12 Strife
{ {
SilverKey SilverKey
Message "You don't have the key" Message "You need a Silver Key"
Mapcolor 150 150 150 Mapcolor 150 150 150
} }
@ -477,14 +477,14 @@ Lock 17 Strife
Lock 18 Strife Lock 18 Strife
{ {
RedCrystalKey RedCrystalKey
Message "You don't have the key" Message "You need the Red Crystal"
Mapcolor 150 150 150 Mapcolor 150 150 150
} }
Lock 19 Strife Lock 19 Strife
{ {
BlueCrystalKey BlueCrystalKey
Message "You don't have the key" Message "You need the Blue Crystal"
Mapcolor 150 150 150 Mapcolor 150 150 150
} }