mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
- Fixed: Backpacks didn't increase the ammo capacity to BackpackMaxAmount if
an ammo type's BackpackAmount was 0. - Fixed some minor bugs in custom skill code. SVN r562 (trunk)
This commit is contained in:
parent
c873ae1709
commit
8f5dd5d028
8 changed files with 15 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
November 4, 2007 (Changes by Graf Zahl)
|
||||||
|
- Fixed: Backpacks didn't increase the ammo capacity to BackpackMaxAmount if
|
||||||
|
an ammo type's BackpackAmount was 0.
|
||||||
|
- Fixed some minor bugs in custom skill code.
|
||||||
|
|
||||||
November 3, 2007 (Changes by Graf Zahl)
|
November 3, 2007 (Changes by Graf Zahl)
|
||||||
- Added text color options to menu code so that the skill definitions can set
|
- Added text color options to menu code so that the skill definitions can set
|
||||||
the color of the menu's text.
|
the color of the menu's text.
|
||||||
|
|
|
@ -622,7 +622,7 @@ public:
|
||||||
fixed_t scaleX, scaleY; // Scaling values; FRACUNIT is normal size
|
fixed_t scaleX, scaleY; // Scaling values; FRACUNIT is normal size
|
||||||
BYTE RenderStyle; // Style to draw this actor with
|
BYTE RenderStyle; // Style to draw this actor with
|
||||||
DWORD renderflags; // Different rendering flags
|
DWORD renderflags; // Different rendering flags
|
||||||
WORD picnum; // Draw this instead of sprite if != 0xffff
|
int picnum; // Draw this instead of sprite if != 0xffff
|
||||||
SWORD TIDtoHate; // TID of things to hate (0 if none)
|
SWORD TIDtoHate; // TID of things to hate (0 if none)
|
||||||
DWORD effects; // [RH] see p_effect.h
|
DWORD effects; // [RH] see p_effect.h
|
||||||
fixed_t alpha;
|
fixed_t alpha;
|
||||||
|
|
|
@ -3064,7 +3064,7 @@ static void ParseSkill ()
|
||||||
else if (SC_Compare ("damagefactor"))
|
else if (SC_Compare ("damagefactor"))
|
||||||
{
|
{
|
||||||
SC_MustGetFloat ();
|
SC_MustGetFloat ();
|
||||||
skill.AmmoFactor = FLOAT2FIXED(sc_Float);
|
skill.DamageFactor = FLOAT2FIXED(sc_Float);
|
||||||
}
|
}
|
||||||
else if (SC_Compare ("fastmonsters"))
|
else if (SC_Compare ("fastmonsters"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1497,8 +1497,7 @@ AInventory *ABackpackItem::CreateCopy (AActor *other)
|
||||||
{
|
{
|
||||||
const PClass *type = PClass::m_Types[i];
|
const PClass *type = PClass::m_Types[i];
|
||||||
|
|
||||||
if (type->ParentClass == RUNTIME_CLASS(AAmmo) &&
|
if (type->ParentClass == RUNTIME_CLASS(AAmmo))
|
||||||
((AAmmo *)GetDefaultByType (type))->BackpackAmount > 0)
|
|
||||||
{
|
{
|
||||||
AAmmo *ammo = static_cast<AAmmo *>(other->FindInventory (type));
|
AAmmo *ammo = static_cast<AAmmo *>(other->FindInventory (type));
|
||||||
int amount = static_cast<AAmmo *>(GetDefaultByType(type))->BackpackAmount;
|
int amount = static_cast<AAmmo *>(GetDefaultByType(type))->BackpackAmount;
|
||||||
|
@ -1507,6 +1506,7 @@ AInventory *ABackpackItem::CreateCopy (AActor *other)
|
||||||
{
|
{
|
||||||
amount = FixedMul(amount, G_SkillProperty(SKILLP_AmmoFactor));
|
amount = FixedMul(amount, G_SkillProperty(SKILLP_AmmoFactor));
|
||||||
}
|
}
|
||||||
|
if (amount < 0) amount = 0;
|
||||||
if (ammo == NULL)
|
if (ammo == NULL)
|
||||||
{ // The player did not have the ammo. Add it.
|
{ // The player did not have the ammo. Add it.
|
||||||
ammo = static_cast<AAmmo *>(Spawn (type, 0, 0, 0, NO_REPLACE));
|
ammo = static_cast<AAmmo *>(Spawn (type, 0, 0, 0, NO_REPLACE));
|
||||||
|
|
|
@ -384,7 +384,7 @@ MapData *P_OpenMapData(const char * mapname)
|
||||||
//
|
//
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
static void SetTexture (short *texture, DWORD *blend, char *name8)
|
static void SetTexture (int *texture, DWORD *blend, char *name8)
|
||||||
{
|
{
|
||||||
char name[9];
|
char name[9];
|
||||||
strncpy (name, name8, 8);
|
strncpy (name, name8, 8);
|
||||||
|
@ -413,7 +413,7 @@ static void SetTexture (short *texture, DWORD *blend, char *name8)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetTextureNoErr (short *texture, DWORD *color, char *name8, bool *validcolor)
|
static void SetTextureNoErr (int *texture, DWORD *color, char *name8, bool *validcolor)
|
||||||
{
|
{
|
||||||
char name[9];
|
char name[9];
|
||||||
strncpy (name, name8, 8);
|
strncpy (name, name8, 8);
|
||||||
|
|
|
@ -495,7 +495,7 @@ static int TryFindSwitch (SWORD texture)
|
||||||
bool P_ChangeSwitchTexture (side_t *side, int useAgain, BYTE special, bool *quest)
|
bool P_ChangeSwitchTexture (side_t *side, int useAgain, BYTE special, bool *quest)
|
||||||
{
|
{
|
||||||
DActiveButton::EWhere where;
|
DActiveButton::EWhere where;
|
||||||
short *texture;
|
int *texture;
|
||||||
int i, sound;
|
int i, sound;
|
||||||
|
|
||||||
if ((i = TryFindSwitch (side->toptexture)) != -1)
|
if ((i = TryFindSwitch (side->toptexture)) != -1)
|
||||||
|
|
|
@ -302,7 +302,7 @@ struct sector_t
|
||||||
|
|
||||||
BYTE FloorLight, CeilingLight;
|
BYTE FloorLight, CeilingLight;
|
||||||
BYTE FloorFlags, CeilingFlags;
|
BYTE FloorFlags, CeilingFlags;
|
||||||
short floorpic, ceilingpic;
|
int floorpic, ceilingpic;
|
||||||
BYTE lightlevel;
|
BYTE lightlevel;
|
||||||
|
|
||||||
AActor * SoundTarget;
|
AActor * SoundTarget;
|
||||||
|
@ -399,7 +399,7 @@ struct side_s
|
||||||
fixed_t rowoffset; // add this to the calculated texture top
|
fixed_t rowoffset; // add this to the calculated texture top
|
||||||
sector_t* sector; // Sector the SideDef is facing.
|
sector_t* sector; // Sector the SideDef is facing.
|
||||||
DBaseDecal* AttachedDecals; // [RH] Decals bound to the wall
|
DBaseDecal* AttachedDecals; // [RH] Decals bound to the wall
|
||||||
short toptexture, bottomtexture, midtexture; // texture indices
|
int toptexture, bottomtexture, midtexture; // texture indices
|
||||||
WORD linenum;
|
WORD linenum;
|
||||||
DWORD LeftSide, RightSide; // [RH] Group walls into loops
|
DWORD LeftSide, RightSide; // [RH] Group walls into loops
|
||||||
WORD TexelLength;
|
WORD TexelLength;
|
||||||
|
|
|
@ -18,7 +18,7 @@ skill normal
|
||||||
Key h
|
Key h
|
||||||
|
|
||||||
skill hard
|
skill hard
|
||||||
SpawnFilter "Normal"
|
SpawnFilter "Hard"
|
||||||
PicName "M_ULTRA"
|
PicName "M_ULTRA"
|
||||||
Key u
|
Key u
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue