May 7, 2006 (Changes by Graf Zahl)

- Added a misc/secret sound definition for Heretic.
- Fixed: Powered up weapons were not properly deselected when the level ended
  and their ready state was different from the main weapon's.
- Made some improvements to A_CountdownArg.
- Removed the 'Yes', 'No' and 'Greetings' state assignment commands. They haven't
  been documented and thus haven't been used at all so far. Therefore they don't 
  need to be handled considering that they will go away anyway.
- Changed the DECORATE state parser so that Stop can also be specified right after
  a label, in addition to goto.


SVN r84 (trunk)
This commit is contained in:
Christoph Oelckers 2006-05-07 23:55:17 +00:00
parent 605a9a7715
commit d4160f7211
6 changed files with 48 additions and 35 deletions

View File

@ -1,3 +1,14 @@
May 7, 2006 (Changes by Graf Zahl)
- Added a misc/secret sound definition for Heretic.
- Fixed: Powered up weapons were not properly deselected when the level ended
and their ready state was different from the main weapon's.
- Made some improvements to A_CountdownArg.
- Removed the 'Yes', 'No' and 'Greetings' state assignment commands. They haven't
been documented and thus haven't been used at all so far. Therefore they don't
need to be handled considering that they will go away anyway.
- Changed the DECORATE state parser so that Stop can also be specified right after
a label, in addition to goto.
May 6, 2006
- Updated Italian strings that someone kindly e-mailed to me.
- The CRT no longer detects any memory leaks when I run to the IWAD picker and quit.

View File

@ -1042,6 +1042,13 @@ void G_PlayerFinishLevel (int player, EFinishLevelType mode)
}
item = next;
}
if (p->ReadyWeapon != NULL &&
p->ReadyWeapon->WeaponFlags&WIF_POWERED_UP &&
p->PendingWeapon == p->ReadyWeapon->SisterWeapon)
{
// Unselect powered up weapons if the unpowered counterpart is pending
p->ReadyWeapon=p->PendingWeapon;
}
p->mo->flags &= ~MF_SHADOW; // cancel invisibility
p->mo->RenderStyle = STYLE_Normal;
p->mo->alpha = FRACUNIT;

View File

@ -481,7 +481,7 @@ void AWeapon::PostMorphWeapon ()
void AWeapon::EndPowerup ()
{
if (SisterWeapon != NULL)
if (SisterWeapon != NULL && WeaponFlags&WIF_POWERED_UP)
{
if (ReadyState != SisterWeapon->ReadyState)
{

View File

@ -1400,7 +1400,7 @@ static void RetargetStatePointers (intptr_t count, const char *target, FState **
{
if (*probe == (FState *)count)
{
*probe = (FState *)strdup (target);
*probe = target == NULL? NULL : (FState *)strdup (target);
}
}
}
@ -1476,12 +1476,20 @@ do_goto: SC_MustGetString();
}
else if (SC_Compare("STOP"))
{
if (!laststate)
do_stop:
if (laststate!=NULL)
{
laststate->NextState=(FState*)-1;
}
else if (lastlabel >=0)
{
RetargetStates (count+1, NULL, actor->Class, defaults);
}
else
{
SC_ScriptError("STOP before first state");
continue;
}
laststate->NextState=(FState*)-1;
}
else if (SC_Compare("WAIT") || SC_Compare("FAIL"))
{
@ -1525,6 +1533,10 @@ do_goto: SC_MustGetString();
{
goto do_goto;
}
else if (SC_Compare("Stop"))
{
goto do_stop;
}
strncpy(statestring, sc_String, 255);
SC_MustGetString ();
} while (SC_Compare (":"));
@ -2609,33 +2621,6 @@ static void ActorHealState (AActor *defaults, Baggage &bag)
defaults->HealState=CheckState (bag.CurrentState, bag.Info->Class);
}
//==========================================================================
//
//==========================================================================
static void ActorYesState (AActor *defaults, Baggage &bag)
{
StatePropertyIsDeprecated (bag.Info->Class->Name+1, "Yes");
defaults->YesState=CheckState (bag.CurrentState, bag.Info->Class);
}
//==========================================================================
//
//==========================================================================
static void ActorNoState (AActor *defaults, Baggage &bag)
{
StatePropertyIsDeprecated (bag.Info->Class->Name+1, "No");
defaults->NoState=CheckState (bag.CurrentState, bag.Info->Class);
}
//==========================================================================
//
//==========================================================================
static void ActorGreetingsState (AActor *defaults, Baggage &bag)
{
StatePropertyIsDeprecated (bag.Info->Class->Name+1, "Greetings");
defaults->GreetingsState=CheckState (bag.CurrentState, bag.Info->Class);
}
//==========================================================================
//
//==========================================================================
@ -3502,7 +3487,6 @@ static const ActorProps props[] =
{ "fastspeed", ActorFastSpeed, RUNTIME_CLASS(AActor) },
{ "game", ActorGame, RUNTIME_CLASS(AActor) },
{ "gibhealth", ActorGibHealth, RUNTIME_CLASS(AActor) },
{ "greetings", ActorGreetingsState, RUNTIME_CLASS(AActor) },
{ "heal", ActorHealState, RUNTIME_CLASS(AActor) },
{ "health", ActorHealth, RUNTIME_CLASS(AActor) },
{ "height", ActorHeight, RUNTIME_CLASS(AActor) },
@ -3529,7 +3513,6 @@ static const ActorProps props[] =
{ "missileheight", ActorMissileHeight, RUNTIME_CLASS(AActor) },
{ "missiletype", ActorMissileType, RUNTIME_CLASS(AActor) },
{ "monster", ActorMonster, RUNTIME_CLASS(AActor) },
{ "no", ActorNoState, RUNTIME_CLASS(AActor) },
{ "obituary", ActorObituary, RUNTIME_CLASS(AActor) },
{ "pain", ActorPainState, RUNTIME_CLASS(AActor) },
{ "painchance", ActorPainChance, RUNTIME_CLASS(AActor) },
@ -3575,7 +3558,6 @@ static const ActorProps props[] =
{ "woundhealth", ActorWoundHealth, RUNTIME_CLASS(AActor) },
{ "xdeath", ActorXDeathState, RUNTIME_CLASS(AActor) },
{ "xscale", ActorXScale, RUNTIME_CLASS(AActor) },
{ "yes", ActorYesState, RUNTIME_CLASS(AActor) },
{ "yscale", ActorYScale, RUNTIME_CLASS(AActor) },
// AWeapon:MinAmmo1 and 2 are never used so there is no point in adding them here!
};

View File

@ -1550,7 +1550,18 @@ void A_CountdownArg(AActor * self)
if (index<=0 || index>5) return;
if (!self->args[index]--)
{
self->SetState(self->DeathState);
if (self->flags&MF_MISSILE)
{
P_ExplodeMissile(self, NULL);
}
else if (self->flags&MF_SHOOTABLE)
{
P_DamageMobj (self, NULL, NULL, self->health, MOD_UNKNOWN);
}
else
{
self->SetState(self->DeathState);
}
}
}

View File

@ -782,6 +782,8 @@ menu/invalid plroof
menu/dismiss dorcls
menu/clear dorcls
misc/secret dssecret
$endif // ifheretic