From fdeb374fdb736170de291bb00cf18fc0248731b9 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 13 Apr 2006 16:52:24 +0000 Subject: [PATCH] SVN r37 (trunk) --- docs/rh-log.txt | 19 ++++++++ src/c_cmds.cpp | 80 ++++++++++++++++++++++++++++++++ src/g_heretic/a_ironlich.cpp | 3 ++ src/g_shared/a_decals.cpp | 2 +- src/g_strife/a_alienspectres.cpp | 9 ++-- src/g_strife/a_crusader.cpp | 2 +- src/g_strife/a_strifeammo.cpp | 6 +-- src/g_strife/a_strifebishop.cpp | 2 +- src/g_strife/a_strifekeys.cpp | 2 +- src/g_strife/a_strifeweapons.cpp | 2 +- src/g_strife/a_templar.cpp | 2 +- src/p_conversation.cpp | 45 +++++++++++------- src/p_interaction.cpp | 2 + wadsrc/lockdefs.txt | 6 +-- 14 files changed, 148 insertions(+), 34 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index b1ecba57b..e05f692a5 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -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 - Fixed: Using printinv before starting a game crashed. - Fixed: DMover::MovePlane() would not stop moving the plane when it exactly diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp index bb60addd9..f640b420a 100644 --- a/src/c_cmds.cpp +++ b/src/c_cmds.cpp @@ -64,6 +64,7 @@ #include "r_main.h" #include "templates.h" #include "p_local.h" +#include "r_sky.h" extern FILE *Logfile; @@ -670,3 +671,82 @@ CCMD (save) DefaultExtension (fname, ".zds"); 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 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 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; +} diff --git a/src/g_heretic/a_ironlich.cpp b/src/g_heretic/a_ironlich.cpp index 80a39e48a..0e7214ccf 100644 --- a/src/g_heretic/a_ironlich.cpp +++ b/src/g_heretic/a_ironlich.cpp @@ -122,6 +122,7 @@ IMPLEMENT_ACTOR (AHeadFX1, Heretic, -1, 164) PROP_Damage (1) PROP_Flags (MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY) PROP_Flags2 (MF2_NOTELEPORT|MF2_THRUGHOST) + PROP_RenderStyle (STYLE_Add) PROP_SpawnState (S_HEADFX1) PROP_DeathState (S_HEADFXI1) @@ -160,6 +161,7 @@ IMPLEMENT_ACTOR (AHeadFX2, Heretic, -1, 0) PROP_Damage (3) PROP_Flags (MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY) PROP_Flags2 (MF2_NOTELEPORT) + PROP_RenderStyle (STYLE_Add) PROP_SpawnState (S_HEADFX2) PROP_DeathState (S_HEADFXI2) @@ -196,6 +198,7 @@ IMPLEMENT_ACTOR (AHeadFX3, Heretic, -1, 0) PROP_Damage (5) PROP_Flags (MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY) PROP_Flags2 (MF2_WINDTHRUST|MF2_NOTELEPORT) + PROP_RenderStyle (STYLE_Add) PROP_SpawnState (S_HEADFX3) PROP_DeathState (S_HEADFXI3) diff --git a/src/g_shared/a_decals.cpp b/src/g_shared/a_decals.cpp index 946054610..40795e8b8 100644 --- a/src/g_shared/a_decals.cpp +++ b/src/g_shared/a_decals.cpp @@ -566,8 +566,8 @@ void DImpactDecal::Serialize (FArchive &arc) } DImpactDecal::DImpactDecal () +: DBaseDecal (STAT_AUTODECAL, 0) { - ChangeStatNum (STAT_AUTODECAL); ImpactCount++; } diff --git a/src/g_strife/a_alienspectres.cpp b/src/g_strife/a_alienspectres.cpp index baefcf15f..376c75ccc 100644 --- a/src/g_strife/a_alienspectres.cpp +++ b/src/g_strife/a_alienspectres.cpp @@ -6,6 +6,7 @@ #include "s_sound.h" #include "m_random.h" #include "a_strifeglobal.h" +#include "c_console.h" static FRandom pr_spectrespawn ("AlienSpectreSpawn"); static FRandom pr_212e4 ("212e4"); @@ -509,13 +510,13 @@ void A_AlienSpectreDeath (AActor *self) } else if (self->GetClass() == RUNTIME_CLASS(AAlienSpectre2)) { - // You Killed The Bishop! + C_MidPrint("You Killed The Bishop!"); log = 74; player->GiveInventoryType (QuestItemClasses[20]); } 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. TThinkerIterator it; AOracle *oracle; @@ -545,7 +546,7 @@ void A_AlienSpectreDeath (AActor *self) } else if (self->GetClass() == RUNTIME_CLASS(AAlienSpectre4)) { - // You Killed Macil! + C_MidPrint("You Killed Macil!"); player->GiveInventoryType (QuestItemClasses[23]); if (player->FindInventory (QuestItemClasses[24]) == NULL) { // Richter has taken over. Macil is a snake. @@ -558,7 +559,7 @@ void A_AlienSpectreDeath (AActor *self) } else if (self->GetClass() == RUNTIME_CLASS(AAlienSpectre5)) { - // You've Killed the Loremaster! + C_MidPrint("You've Killed the Loremaster!"); ASigil *sigil; player->GiveInventoryType (QuestItemClasses[25]); diff --git a/src/g_strife/a_crusader.cpp b/src/g_strife/a_crusader.cpp index 7a0922e32..6cdfe81af 100644 --- a/src/g_strife/a_crusader.cpp +++ b/src/g_strife/a_crusader.cpp @@ -26,7 +26,7 @@ public: } void NoBlockingSet () { - P_DropItem (this, "EnergyPod", -1, 256); + P_DropItem (this, "EnergyPod", 20, 256); } }; diff --git a/src/g_strife/a_strifeammo.cpp b/src/g_strife/a_strifeammo.cpp index e414b5153..89fa90b56 100644 --- a/src/g_strife/a_strifeammo.cpp +++ b/src/g_strife/a_strifeammo.cpp @@ -56,7 +56,7 @@ IMPLEMENT_ACTOR (APhosphorusGrenadeRounds, Strife, 153, 0) PROP_StrifeTeaserType2 (175) PROP_Inventory_Amount (8) PROP_Inventory_MaxAmount (16) - PROP_Ammo_BackpackAmount (4) + PROP_Ammo_BackpackAmount (2) PROP_Ammo_BackpackMaxAmount (32) PROP_Inventory_Icon ("I_GRN2") 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_StrifeTeaserType (177) PROP_StrifeTeaserType2 (181) - PROP_Inventory_Amount (40) + PROP_Inventory_Amount (20) PROP_Inventory_MaxAmount (400) PROP_Ammo_BackpackAmount (20) PROP_Ammo_BackpackMaxAmount (800) @@ -235,7 +235,7 @@ IMPLEMENT_ACTOR (APoisonBolts, Strife, 115, 0) PROP_StrifeType (185) PROP_StrifeTeaserType (179) PROP_StrifeTeaserType2 (183) - PROP_Inventory_Amount (20) + PROP_Inventory_Amount (10) PROP_Inventory_MaxAmount (25) PROP_Ammo_BackpackAmount (2) PROP_Ammo_BackpackMaxAmount (50) diff --git a/src/g_strife/a_strifebishop.cpp b/src/g_strife/a_strifebishop.cpp index f81475379..7f1b3a8c1 100644 --- a/src/g_strife/a_strifebishop.cpp +++ b/src/g_strife/a_strifebishop.cpp @@ -21,7 +21,7 @@ public: } void NoBlockingSet () { - P_DropItem (this, "CrateOfMissiles", -1, 256); + P_DropItem (this, "CrateOfMissiles", 20, 256); } }; diff --git a/src/g_strife/a_strifekeys.cpp b/src/g_strife/a_strifekeys.cpp index 19edce3d0..e0261ee50 100644 --- a/src/g_strife/a_strifekeys.cpp +++ b/src/g_strife/a_strifekeys.cpp @@ -157,7 +157,7 @@ bool APrisonKey::TryPickup (AActor *toucher) const char *APrisonKey::PickupMessage () { - return "You picked up the Prsion Key."; + return "You picked up the Prison Key."; } // Severed Hand ------------------------------------------------------------- diff --git a/src/g_strife/a_strifeweapons.cpp b/src/g_strife/a_strifeweapons.cpp index 1efa5d64b..e6fbd4129 100644 --- a/src/g_strife/a_strifeweapons.cpp +++ b/src/g_strife/a_strifeweapons.cpp @@ -1766,7 +1766,7 @@ IMPLEMENT_ACTOR (AStrifeGrenadeLauncher, Strife, 154, 0) PROP_Weapon_SelectionOrder (2400) PROP_Weapon_AmmoUse1 (1) - PROP_Weapon_AmmoGive1 (8) + PROP_Weapon_AmmoGive1 (12) PROP_Weapon_UpState (S_HEGRENADE_UP) PROP_Weapon_DownState (S_HEGRENADE_DOWN) PROP_Weapon_ReadyState (S_HEGRENADE) diff --git a/src/g_strife/a_templar.cpp b/src/g_strife/a_templar.cpp index 7b886736f..0f46f1586 100644 --- a/src/g_strife/a_templar.cpp +++ b/src/g_strife/a_templar.cpp @@ -110,7 +110,7 @@ END_DEFAULTS void ATemplar::NoBlockingSet () { - P_DropItem (this, "EnergyPod", -1, 256); + P_DropItem (this, "EnergyPod", 20, 256); } class AMaulerPuff : public AActor diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 09a0aa436..417189737 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -957,29 +957,38 @@ static void PickConversationReply () takestuff = true; if (reply->GiveType != NULL) { - if (reply->GiveType->IsDescendantOf(RUNTIME_CLASS(AWeapon))) + if (reply->GiveType->IsDescendantOf(RUNTIME_CLASS(AInventory))) { - if (players[consoleplayer].mo->FindInventory(reply->GiveType) != NULL) + if (reply->GiveType->IsDescendantOf(RUNTIME_CLASS(AWeapon))) { - takestuff = false; + if (players[consoleplayer].mo->FindInventory(reply->GiveType) != NULL) + { + takestuff = false; + } + } + + if (takestuff) + { + AInventory *item = static_cast (Spawn (reply->GiveType, 0, 0, 0)); + // Items given here should not count as items! + if (item->flags & MF_COUNTITEM) + { + level.total_items--; + item->flags &= ~MF_COUNTITEM; + } + item->flags |= MF_DROPPED; + if (!item->TryPickup (players[consoleplayer].mo)) + { + item->Destroy (); + takestuff = false; + } } } - - if (takestuff) + else { - AInventory *item = static_cast (Spawn (reply->GiveType, 0, 0, 0)); - // Items given here should not count as items! - if (item->flags & MF_COUNTITEM) - { - level.total_items--; - item->flags &= ~MF_COUNTITEM; - } - item->flags |= MF_DROPPED; - if (!item->TryPickup (players[consoleplayer].mo)) - { - item->Destroy (); - takestuff = false; - } + // Trying to give a non-inventory item. + takestuff = false; + Printf("Attempting to give non-inventory item %s\n", reply->GiveType->Name+1); } } diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 16cb3e314..c34dcf6d2 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -824,10 +824,12 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage { if (inflictor == NULL || !(inflictor->flags4 & MF4_SPECTRAL)) { + /* if (target->MissileState != NULL) { target->SetState (target->MissileState); } + */ return; } } diff --git a/wadsrc/lockdefs.txt b/wadsrc/lockdefs.txt index 8ca368de8..d0998f0d6 100644 --- a/wadsrc/lockdefs.txt +++ b/wadsrc/lockdefs.txt @@ -435,7 +435,7 @@ Lock 11 Strife Lock 12 Strife { SilverKey - Message "You don't have the key" + Message "You need a Silver Key" Mapcolor 150 150 150 } @@ -477,14 +477,14 @@ Lock 17 Strife Lock 18 Strife { RedCrystalKey - Message "You don't have the key" + Message "You need the Red Crystal" Mapcolor 150 150 150 } Lock 19 Strife { BlueCrystalKey - Message "You don't have the key" + Message "You need the Blue Crystal" Mapcolor 150 150 150 }