- Fixed: Tne Imp's raise state sequence was wrong due to a typo.

- Fixed: The shotgun had spawn ID 21 instead of 27.
- Fixed: All 3 states in the DoomUnusedStates actor need to end with a 'stop'.
- Fixed: The DECORATE TakeInventory functions didn't check the IF_KEEPDEPLETED
  flag.
- Fixed: ClearInventory should leave ammo in the inventory because it might be
  referenced by undroppable weapons.
- Fixed: Several functions in a_artifacts.cpp were missing a check for a valid
  owner.
- Fixed: sc_man counted lines wrong when ungetting strings but getting tokens
  next.



SVN r552 (trunk)
This commit is contained in:
Christoph Oelckers 2007-10-05 08:04:38 +00:00
parent e016a66dc0
commit 90db40c70f
8 changed files with 59 additions and 9 deletions

View file

@ -1,3 +1,20 @@
October 5, 2007 (Changes by Graf Zahl)
- Fixed: Tne Imp's raise state sequence was wrong due to a typo.
- Fixed: The shotgun had spawn ID 21 instead of 27.
- Fixed: All 3 states in the DoomUnusedStates actor need to end with a 'stop'.
October 3, 2007 (Changes by Graf Zahl)
- Fixed: The DECORATE TakeInventory functions didn't check the IF_KEEPDEPLETED
flag.
September 29, 2007 (Changes by Graf Zahl)
- Fixed: ClearInventory should leave ammo in the inventory because it might be
referenced by undroppable weapons.
- Fixed: Several functions in a_artifacts.cpp were missing a check for a valid
owner.
- Fixed: sc_man counted lines wrong when ungetting strings but getting tokens
next.
September 27, 2007 (Changes by Graf Zahl)
- Fixed: When I changed the scaling of textures to full fixed point precision
I forgot to change the call that draws the automap marker numbers.

View file

@ -152,7 +152,7 @@ void APowerup::InitEffect ()
void APowerup::DoEffect ()
{
if (Owner == NULL)
if (Owner == NULL || Owner->player == NULL)
{
return;
}
@ -1190,6 +1190,9 @@ void APowerSpeed::DoEffect ()
{
Super::DoEffect ();
if (Owner == NULL || Owner->player == NULL)
return;
if (Owner->player->cheats & CF_PREDICTING)
return;
@ -1308,8 +1311,11 @@ void APowerTargeter::PositionAccuracy ()
{
player_t *player = Owner->player;
player->psprites[ps_targetleft].sx = (160-3)*FRACUNIT - ((100 - player->accuracy) << FRACBITS);
player->psprites[ps_targetright].sx = (160-3)*FRACUNIT + ((100 - player->accuracy) << FRACBITS);
if (player != NULL)
{
player->psprites[ps_targetleft].sx = (160-3)*FRACUNIT - ((100 - player->accuracy) << FRACBITS);
player->psprites[ps_targetright].sx = (160-3)*FRACUNIT + ((100 - player->accuracy) << FRACBITS);
}
}
// Frightener Powerup --------------------------------
@ -1370,6 +1376,9 @@ void APowerTimeFreezer::InitEffect( )
{
int ulIdx;
if (Owner== NULL || Owner->player == NULL)
return;
// When this powerup is in effect, pause the music.
S_PauseSound( false );
@ -1570,6 +1579,9 @@ END_DEFAULTS
void APowerDrain::InitEffect( )
{
if (Owner== NULL || Owner->player == NULL)
return;
// Give the player the power to drain life from opponents when he damages them.
Owner->player->cheats |= CF_DRAIN;
}
@ -1605,6 +1617,9 @@ END_DEFAULTS
void APowerRegeneration::InitEffect( )
{
if (Owner== NULL || Owner->player == NULL)
return;
// Give the player the power to regnerate lost life.
Owner->player->cheats |= CF_REGENERATION;
}
@ -1638,6 +1653,9 @@ END_DEFAULTS
void APowerHighJump::InitEffect( )
{
if (Owner== NULL || Owner->player == NULL)
return;
// Give the player the power to jump much higher.
Owner->player->cheats |= CF_HIGHJUMP;
}

View file

@ -135,7 +135,14 @@ static void DoClearInv (AActor *actor)
AInventory *next = inv->Inventory;
if (!(inv->ItemFlags & IF_UNDROPPABLE))
{
inv->Destroy ();
// Fix for undroppable weapons. Is this ok?
if (inv->IsKindOf(RUNTIME_CLASS(AAmmo)))
{
AAmmo *ammo = static_cast<AAmmo*>(inv);
ammo->Amount = 0;
}
else
inv->Destroy ();
}
else if (inv->GetClass() == RUNTIME_CLASS(AHexenArmor))
{

View file

@ -73,8 +73,10 @@ static char StringBuffer[MAX_STRING_SIZE];
static bool ScriptOpen = false;
static int ScriptSize;
static bool AlreadyGot = false;
static int AlreadyGotLine;
static bool LastGotToken = false;
static char *LastGotPtr;
static int LastGotLine;
static bool FreeScript = false;
static char *SavedScriptPtr;
static int SavedScriptLine;
@ -180,6 +182,7 @@ static void SC_PrepareScript (void)
AlreadyGot = false;
LastGotToken = false;
LastGotPtr = NULL;
LastGotLine = 1;
SavedScriptPtr = NULL;
CMode = false;
Escape = true;
@ -299,6 +302,7 @@ static bool SC_ScanString (bool tokens)
return true;
}
ScriptPtr = LastGotPtr;
sc_Line = LastGotLine;
}
sc_Crossed = false;
@ -309,6 +313,7 @@ static bool SC_ScanString (bool tokens)
}
LastGotPtr = ScriptPtr;
LastGotLine = sc_Line;
// In case the generated scanner does not use marker, avoid compiler warnings.
marker;
@ -644,6 +649,7 @@ void SC_MustGetFloat (void)
void SC_UnGet (void)
{
AlreadyGot = true;
AlreadyGotLine = LastGotLine; // in case of an error we want the line of the last token.
}
//==========================================================================
@ -912,7 +918,7 @@ void STACK_ARGS SC_ScriptError (const char *message, ...)
}
I_Error ("Script error, \"%s\" line %d:\n%s\n", ScriptName.GetChars(),
sc_Line, composed.GetChars());
AlreadyGot? AlreadyGotLine : sc_Line, composed.GetChars());
}
//==========================================================================

View file

@ -1303,7 +1303,7 @@ void DoTakeInventory(AActor * self, AActor * receiver)
if (inv->Amount > 0 && pStateCall != NULL) pStateCall->Result=true;
if (!amount || amount>=inv->Amount)
{
if (inv->IsKindOf(RUNTIME_CLASS(AAmmo))) inv->Amount=0;
if (inv->ItemFlags&IF_KEEPDEPLETED) inv->Amount=0;
else inv->Destroy();
}
else inv->Amount-=amount;

View file

@ -54,8 +54,7 @@ ACTOR DoomImp 3001
TROO U -1
Stop
Raise:
TROO M 8
TROO KLJI 8
TROO MLKJI 8
Goto See
}
}

View file

@ -70,8 +70,11 @@ ACTOR DoomUnusedStates
States
{
SMT2 A -1
stop
Death:
PLAY N -1
stop
PLAY S -1
stop
}
}

View file

@ -137,7 +137,7 @@ ACTOR Chainsaw : Weapon 2005
ACTOR Shotgun : DoomWeapon 2001
{
Game Doom
SpawnID 21
SpawnID 27
Weapon.SelectionOrder 1300
Weapon.AmmoUse 1
Weapon.AmmoGive 8