Merge branch 'master' into gonesolong
Conflicts: src/CMakeLists.txt src/b_think.cpp src/g_doom/a_doomweaps.cpp src/g_hexen/a_clericstaff.cpp src/g_hexen/a_fighterplayer.cpp src/namedef.h src/p_enemy.cpp src/p_local.h src/p_mobj.cpp src/p_teleport.cpp src/sc_man_tokens.h src/thingdef/thingdef_codeptr.cpp src/thingdef/thingdef_function.cpp src/thingdef/thingdef_parse.cpp wadsrc/static/actors/actor.txt wadsrc/static/actors/constants.txt wadsrc/static/actors/shared/inventory.txt - Added register reuse to VMFunctionBuilder for FxPick's code emitter. - Note to self: Need to reimplement IsPointerEqual and CheckClass, which were added to thingdef_function.cpp over the past year, as this file no longer exists in this branch.
This commit is contained in:
commit
b5e4153c78
182 changed files with 23025 additions and 8730 deletions
|
|
@ -12,6 +12,7 @@
|
|||
#include "doomstat.h"
|
||||
#include "g_level.h"
|
||||
#include "farchive.h"
|
||||
#include "p_enemy.h"
|
||||
|
||||
static FRandom pr_morphmonst ("MorphMonster");
|
||||
|
||||
|
|
@ -527,11 +528,11 @@ bool P_MorphedDeath(AActor *actor, AActor **morphed, int *morphedstyle, int *mor
|
|||
if (actor->GetClass()->IsDescendantOf(RUNTIME_CLASS(AMorphedMonster)))
|
||||
{
|
||||
AMorphedMonster *fakeme = static_cast<AMorphedMonster *>(actor);
|
||||
AActor *realme = fakeme->UnmorphedMe;
|
||||
if ((fakeme->UnmorphTime) &&
|
||||
(fakeme->MorphStyle & MORPH_UNDOBYDEATH) &&
|
||||
(fakeme->UnmorphedMe))
|
||||
(realme))
|
||||
{
|
||||
AActor *realme = fakeme->UnmorphedMe;
|
||||
int realstyle = fakeme->MorphStyle;
|
||||
int realhealth = fakeme->health;
|
||||
if (P_UndoMonsterMorph(fakeme, !!(fakeme->MorphStyle & MORPH_UNDOBYDEATHFORCED)))
|
||||
|
|
@ -542,6 +543,14 @@ bool P_MorphedDeath(AActor *actor, AActor **morphed, int *morphedstyle, int *mor
|
|||
return true;
|
||||
}
|
||||
}
|
||||
if (realme->flags4 & MF4_BOSSDEATH)
|
||||
{
|
||||
realme->health = 0; // make sure that A_BossDeath considers it dead.
|
||||
// FIXME: Use the caller's stack once the whole chain is scriptable.
|
||||
VMFrameStack stack;
|
||||
VMValue params[3] = { realme, realme, VMValue(NULL, ATAG_STATE) };
|
||||
stack.Call(A_BossDeath_VMPtr, params, countof(params), NULL, 0, NULL);
|
||||
}
|
||||
fakeme->flags3 |= MF3_STAYMORPHED; // moved here from AMorphedMonster::Die()
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue