mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-30 16:00:55 +00:00
- 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:
parent
e016a66dc0
commit
90db40c70f
8 changed files with 59 additions and 9 deletions
|
@ -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)
|
September 27, 2007 (Changes by Graf Zahl)
|
||||||
- Fixed: When I changed the scaling of textures to full fixed point precision
|
- 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.
|
I forgot to change the call that draws the automap marker numbers.
|
||||||
|
|
|
@ -152,7 +152,7 @@ void APowerup::InitEffect ()
|
||||||
|
|
||||||
void APowerup::DoEffect ()
|
void APowerup::DoEffect ()
|
||||||
{
|
{
|
||||||
if (Owner == NULL)
|
if (Owner == NULL || Owner->player == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1190,6 +1190,9 @@ void APowerSpeed::DoEffect ()
|
||||||
{
|
{
|
||||||
Super::DoEffect ();
|
Super::DoEffect ();
|
||||||
|
|
||||||
|
if (Owner == NULL || Owner->player == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
if (Owner->player->cheats & CF_PREDICTING)
|
if (Owner->player->cheats & CF_PREDICTING)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1308,9 +1311,12 @@ void APowerTargeter::PositionAccuracy ()
|
||||||
{
|
{
|
||||||
player_t *player = Owner->player;
|
player_t *player = Owner->player;
|
||||||
|
|
||||||
|
if (player != NULL)
|
||||||
|
{
|
||||||
player->psprites[ps_targetleft].sx = (160-3)*FRACUNIT - ((100 - player->accuracy) << FRACBITS);
|
player->psprites[ps_targetleft].sx = (160-3)*FRACUNIT - ((100 - player->accuracy) << FRACBITS);
|
||||||
player->psprites[ps_targetright].sx = (160-3)*FRACUNIT + ((100 - player->accuracy) << FRACBITS);
|
player->psprites[ps_targetright].sx = (160-3)*FRACUNIT + ((100 - player->accuracy) << FRACBITS);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Frightener Powerup --------------------------------
|
// Frightener Powerup --------------------------------
|
||||||
|
|
||||||
|
@ -1370,6 +1376,9 @@ void APowerTimeFreezer::InitEffect( )
|
||||||
{
|
{
|
||||||
int ulIdx;
|
int ulIdx;
|
||||||
|
|
||||||
|
if (Owner== NULL || Owner->player == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
// When this powerup is in effect, pause the music.
|
// When this powerup is in effect, pause the music.
|
||||||
S_PauseSound( false );
|
S_PauseSound( false );
|
||||||
|
|
||||||
|
@ -1570,6 +1579,9 @@ END_DEFAULTS
|
||||||
|
|
||||||
void APowerDrain::InitEffect( )
|
void APowerDrain::InitEffect( )
|
||||||
{
|
{
|
||||||
|
if (Owner== NULL || Owner->player == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
// Give the player the power to drain life from opponents when he damages them.
|
// Give the player the power to drain life from opponents when he damages them.
|
||||||
Owner->player->cheats |= CF_DRAIN;
|
Owner->player->cheats |= CF_DRAIN;
|
||||||
}
|
}
|
||||||
|
@ -1605,6 +1617,9 @@ END_DEFAULTS
|
||||||
|
|
||||||
void APowerRegeneration::InitEffect( )
|
void APowerRegeneration::InitEffect( )
|
||||||
{
|
{
|
||||||
|
if (Owner== NULL || Owner->player == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
// Give the player the power to regnerate lost life.
|
// Give the player the power to regnerate lost life.
|
||||||
Owner->player->cheats |= CF_REGENERATION;
|
Owner->player->cheats |= CF_REGENERATION;
|
||||||
}
|
}
|
||||||
|
@ -1638,6 +1653,9 @@ END_DEFAULTS
|
||||||
|
|
||||||
void APowerHighJump::InitEffect( )
|
void APowerHighJump::InitEffect( )
|
||||||
{
|
{
|
||||||
|
if (Owner== NULL || Owner->player == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
// Give the player the power to jump much higher.
|
// Give the player the power to jump much higher.
|
||||||
Owner->player->cheats |= CF_HIGHJUMP;
|
Owner->player->cheats |= CF_HIGHJUMP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,6 +135,13 @@ static void DoClearInv (AActor *actor)
|
||||||
AInventory *next = inv->Inventory;
|
AInventory *next = inv->Inventory;
|
||||||
if (!(inv->ItemFlags & IF_UNDROPPABLE))
|
if (!(inv->ItemFlags & IF_UNDROPPABLE))
|
||||||
{
|
{
|
||||||
|
// 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 ();
|
inv->Destroy ();
|
||||||
}
|
}
|
||||||
else if (inv->GetClass() == RUNTIME_CLASS(AHexenArmor))
|
else if (inv->GetClass() == RUNTIME_CLASS(AHexenArmor))
|
||||||
|
|
|
@ -73,8 +73,10 @@ static char StringBuffer[MAX_STRING_SIZE];
|
||||||
static bool ScriptOpen = false;
|
static bool ScriptOpen = false;
|
||||||
static int ScriptSize;
|
static int ScriptSize;
|
||||||
static bool AlreadyGot = false;
|
static bool AlreadyGot = false;
|
||||||
|
static int AlreadyGotLine;
|
||||||
static bool LastGotToken = false;
|
static bool LastGotToken = false;
|
||||||
static char *LastGotPtr;
|
static char *LastGotPtr;
|
||||||
|
static int LastGotLine;
|
||||||
static bool FreeScript = false;
|
static bool FreeScript = false;
|
||||||
static char *SavedScriptPtr;
|
static char *SavedScriptPtr;
|
||||||
static int SavedScriptLine;
|
static int SavedScriptLine;
|
||||||
|
@ -180,6 +182,7 @@ static void SC_PrepareScript (void)
|
||||||
AlreadyGot = false;
|
AlreadyGot = false;
|
||||||
LastGotToken = false;
|
LastGotToken = false;
|
||||||
LastGotPtr = NULL;
|
LastGotPtr = NULL;
|
||||||
|
LastGotLine = 1;
|
||||||
SavedScriptPtr = NULL;
|
SavedScriptPtr = NULL;
|
||||||
CMode = false;
|
CMode = false;
|
||||||
Escape = true;
|
Escape = true;
|
||||||
|
@ -299,6 +302,7 @@ static bool SC_ScanString (bool tokens)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
ScriptPtr = LastGotPtr;
|
ScriptPtr = LastGotPtr;
|
||||||
|
sc_Line = LastGotLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
sc_Crossed = false;
|
sc_Crossed = false;
|
||||||
|
@ -309,6 +313,7 @@ static bool SC_ScanString (bool tokens)
|
||||||
}
|
}
|
||||||
|
|
||||||
LastGotPtr = ScriptPtr;
|
LastGotPtr = ScriptPtr;
|
||||||
|
LastGotLine = sc_Line;
|
||||||
|
|
||||||
// In case the generated scanner does not use marker, avoid compiler warnings.
|
// In case the generated scanner does not use marker, avoid compiler warnings.
|
||||||
marker;
|
marker;
|
||||||
|
@ -644,6 +649,7 @@ void SC_MustGetFloat (void)
|
||||||
void SC_UnGet (void)
|
void SC_UnGet (void)
|
||||||
{
|
{
|
||||||
AlreadyGot = true;
|
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(),
|
I_Error ("Script error, \"%s\" line %d:\n%s\n", ScriptName.GetChars(),
|
||||||
sc_Line, composed.GetChars());
|
AlreadyGot? AlreadyGotLine : sc_Line, composed.GetChars());
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -1303,7 +1303,7 @@ void DoTakeInventory(AActor * self, AActor * receiver)
|
||||||
if (inv->Amount > 0 && pStateCall != NULL) pStateCall->Result=true;
|
if (inv->Amount > 0 && pStateCall != NULL) pStateCall->Result=true;
|
||||||
if (!amount || amount>=inv->Amount)
|
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->Destroy();
|
||||||
}
|
}
|
||||||
else inv->Amount-=amount;
|
else inv->Amount-=amount;
|
||||||
|
|
|
@ -54,8 +54,7 @@ ACTOR DoomImp 3001
|
||||||
TROO U -1
|
TROO U -1
|
||||||
Stop
|
Stop
|
||||||
Raise:
|
Raise:
|
||||||
TROO M 8
|
TROO MLKJI 8
|
||||||
TROO KLJI 8
|
|
||||||
Goto See
|
Goto See
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,8 +70,11 @@ ACTOR DoomUnusedStates
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
SMT2 A -1
|
SMT2 A -1
|
||||||
|
stop
|
||||||
Death:
|
Death:
|
||||||
PLAY N -1
|
PLAY N -1
|
||||||
|
stop
|
||||||
PLAY S -1
|
PLAY S -1
|
||||||
|
stop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ ACTOR Chainsaw : Weapon 2005
|
||||||
ACTOR Shotgun : DoomWeapon 2001
|
ACTOR Shotgun : DoomWeapon 2001
|
||||||
{
|
{
|
||||||
Game Doom
|
Game Doom
|
||||||
SpawnID 21
|
SpawnID 27
|
||||||
Weapon.SelectionOrder 1300
|
Weapon.SelectionOrder 1300
|
||||||
Weapon.AmmoUse 1
|
Weapon.AmmoUse 1
|
||||||
Weapon.AmmoGive 8
|
Weapon.AmmoGive 8
|
||||||
|
|
Loading…
Reference in a new issue