- Updated thingdef_specials.h for the new thingdef_specials.gperf file.
- Created a new MorphedMonster class that Chicken and Pig now derive from.
This class automatically takes care of unmorphing the monster when its
time is up.
- Made PlayerClass and MonsterClass properties of EggFX. You can override
these in a subclass to create new kinds of morpher projectiles. Along with
that, MorphWeapon is a new property of PlayerPawn that controls what type
of weapon you have available while morphed ("None" means you have no
weapons).
- Changed morphed monsters to record the time when they want to unmorph, not
the time left until they unmorph. This simplifies calling
P_UpdateMorhpedMonster() because you don't need to pass it a tic count.
- Added an optional second parameter to A_SpawnDebris and an optional
fifth parameter to A_SpawnItem that both do the same thing: If you set it
to 1, then the spawned actor will be assigned the same translation table
as the actor that called the function.
- Moved the blood colorization in P_SpawnBlood() ahead of the SetDamage()
call so that the blood color will available to the states of the blood
actor.
- Extended the puke command so that giving it a negative script number will
act like ACS_ExecuteAlways and always execute the script. (Ugh. Why did I
use's Raven's cheat code to name this command?)
SVN r296 (trunk)
This commit is contained in:
parent
c16cff7f47
commit
a6d656b108
17 changed files with 601 additions and 629 deletions
|
|
@ -1118,13 +1118,14 @@ void A_TakeFromTarget(AActor * self)
|
|||
void A_SpawnItem(AActor * self)
|
||||
{
|
||||
FState * CallingState;
|
||||
int index=CheckIndex(4, &CallingState);
|
||||
int index=CheckIndex(5, &CallingState);
|
||||
if (index<0) return;
|
||||
|
||||
const PClass * missile= PClass::FindClass((ENamedName)StateParameters[index]);
|
||||
fixed_t distance = fixed_t(EvalExpressionF (StateParameters[index+1], self) * FRACUNIT);
|
||||
fixed_t zheight = fixed_t(EvalExpressionF (StateParameters[index+2], self) * FRACUNIT);
|
||||
bool useammo = EvalExpressionN (StateParameters[index+3], self);
|
||||
BOOL transfer_translation = EvalExpressionI (StateParameters[index+4], self);
|
||||
|
||||
if (!missile)
|
||||
{
|
||||
|
|
@ -1156,6 +1157,11 @@ void A_SpawnItem(AActor * self)
|
|||
{
|
||||
AActor * originator = self;
|
||||
|
||||
if (transfer_translation)
|
||||
{
|
||||
mo->Translation = self->Translation;
|
||||
}
|
||||
|
||||
mo->angle=self->angle;
|
||||
while (originator && isMissile(originator)) originator = originator->target;
|
||||
|
||||
|
|
@ -1407,9 +1413,11 @@ void A_SpawnDebris(AActor * self)
|
|||
AActor * mo;
|
||||
const PClass * debris;
|
||||
|
||||
int index=CheckIndex(1, NULL);
|
||||
int index=CheckIndex(2, NULL);
|
||||
if (index<0) return;
|
||||
|
||||
BOOL transfer_translation = EvalExpressionI (StateParameters[index+1], self);
|
||||
|
||||
debris = PClass::FindClass((ENamedName)StateParameters[index]);
|
||||
if (debris == NULL) return;
|
||||
|
||||
|
|
@ -1418,6 +1426,10 @@ void A_SpawnDebris(AActor * self)
|
|||
mo = Spawn(debris, self->x+((pr_spawndebris()-128)<<12),
|
||||
self->y+((pr_spawndebris()-128)<<12),
|
||||
self->z+(pr_spawndebris()*self->height/256), ALLOW_REPLACE);
|
||||
if (mo && transfer_translation)
|
||||
{
|
||||
mo->Translation = self->Translation;
|
||||
}
|
||||
if (mo && i < mo->GetClass()->ActorInfo->NumOwnedStates)
|
||||
{
|
||||
mo->SetState (mo->GetClass()->ActorInfo->OwnedStates + i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue