From 96a8f1ceee566ca50343c6cade593c1eaae2fa51 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 21 Aug 2010 19:50:07 +0000 Subject: [PATCH] - fixed: The SaveVersion check for the USDF related changes for the current dialogue did not have the correct version number. - fixed: All blood spawning functions checked the ALLOWPARTICLES flag on the class defaults before actor replacement instead of after. SVN r2563 (trunk) --- src/actor.h | 13 ++++++++++--- src/p_mobj.cpp | 10 +++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/actor.h b/src/actor.h index 84aab5fed..68eda132b 100644 --- a/src/actor.h +++ b/src/actor.h @@ -722,19 +722,26 @@ public: const PClass *GetBloodType(int type = 0) const { + const PClass *bloodcls; if (type == 0) { - return PClass::FindClass((ENamedName)GetClass()->Meta.GetMetaInt(AMETA_BloodType, NAME_Blood)); + bloodcls = PClass::FindClass((ENamedName)GetClass()->Meta.GetMetaInt(AMETA_BloodType, NAME_Blood)); } else if (type == 1) { - return PClass::FindClass((ENamedName)GetClass()->Meta.GetMetaInt(AMETA_BloodType2, NAME_BloodSplatter)); + bloodcls = PClass::FindClass((ENamedName)GetClass()->Meta.GetMetaInt(AMETA_BloodType2, NAME_BloodSplatter)); } else if (type == 2) { - return PClass::FindClass((ENamedName)GetClass()->Meta.GetMetaInt(AMETA_BloodType3, NAME_AxeBlood)); + bloodcls = PClass::FindClass((ENamedName)GetClass()->Meta.GetMetaInt(AMETA_BloodType3, NAME_AxeBlood)); } else return NULL; + + if (bloodcls != NULL) + { + bloodcls = bloodcls->ActorInfo->GetReplacement()->Class; + } + return bloodcls; } // Calculate amount of missile damage diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 4d3af4568..c6011d4ea 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -361,7 +361,7 @@ void AActor::Serialize (FArchive &arc) arc << foo; } - if (SaveVersion > 2500) // adjust after merging into trunk! + if (SaveVersion > 2560) { arc << ConversationRoot << Conversation; } @@ -4486,7 +4486,7 @@ void P_SpawnBlood (fixed_t x, fixed_t y, fixed_t z, angle_t dir, int damage, AAc if (bloodcls!=NULL && bloodtype <= 1) { z += pr_spawnblood.Random2 () << 10; - th = Spawn (bloodcls, x, y, z, ALLOW_REPLACE); + th = Spawn (bloodcls, x, y, z, NO_REPLACE); // GetBloodType already performed the replacement th->velz = FRACUNIT*2; th->angle = dir; if (gameinfo.gametype & GAME_DoomChex) @@ -4549,7 +4549,7 @@ void P_BloodSplatter (fixed_t x, fixed_t y, fixed_t z, AActor *originator) { AActor *mo; - mo = Spawn(bloodcls, x, y, z, ALLOW_REPLACE); + mo = Spawn(bloodcls, x, y, z, NO_REPLACE); // GetBloodType already performed the replacement mo->target = originator; mo->velx = pr_splatter.Random2 () << 10; mo->vely = pr_splatter.Random2 () << 10; @@ -4590,7 +4590,7 @@ void P_BloodSplatter2 (fixed_t x, fixed_t y, fixed_t z, AActor *originator) x += ((pr_splat()-128)<<11); y += ((pr_splat()-128)<<11); - mo = Spawn (bloodcls, x, y, z, ALLOW_REPLACE); + mo = Spawn (bloodcls, x, y, z, NO_REPLACE); // GetBloodType already performed the replacement mo->target = originator; // colorize the blood! @@ -4629,7 +4629,7 @@ void P_RipperBlood (AActor *mo, AActor *bleeder) if (bloodcls!=NULL && bloodtype <= 1) { AActor *th; - th = Spawn (bloodcls, x, y, z, ALLOW_REPLACE); + th = Spawn (bloodcls, x, y, z, NO_REPLACE); // GetBloodType already performed the replacement if (gameinfo.gametype == GAME_Heretic) th->flags |= MF_NOGRAVITY; th->velx = mo->velx >> 1;