- Fixed: Weapons did not give you double ammo at baby and nightmare skills.
- Fixed: SetTexture() in p_setup.cpp assumed that all color values were six characters. Although this was the intended way to specify colors, earlier versions did no error checking, so other lengths worked too. - Fixed: FPatchTexture waited until MakeTexture() to call CalcBitSize(), so the width and height bit sizes weren't available when using it as a source for a warp texture. - Fixed: R_InitSkyMap() should only warn about two sky textures not being the same height when they are used as part of a double sky. - Added a NULL state check in AActor::Tick() before advancing the current state. Note that this should not happen, so there's an assert there for the debug build as well as a regular check for the release build. SVN r324 (trunk)
This commit is contained in:
parent
05265c3213
commit
4999c3b4aa
8 changed files with 52 additions and 17 deletions
|
|
@ -202,6 +202,7 @@ AInventory *AWeapon::CreateTossable ()
|
|||
{
|
||||
SisterWeapon->Destroy ();
|
||||
}
|
||||
// To avoid exploits, the tossed weapon must not have any ammo.
|
||||
copy->AmmoGive1 = 0;
|
||||
copy->AmmoGive2 = 0;
|
||||
}
|
||||
|
|
@ -250,6 +251,14 @@ AAmmo *AWeapon::AddAmmo (AActor *other, const PClass *ammotype, int amount)
|
|||
{
|
||||
return NULL;
|
||||
}
|
||||
// extra ammo in baby mode and nightmare mode
|
||||
if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife))
|
||||
{
|
||||
if (gameinfo.gametype & (GAME_Doom|GAME_Strife))
|
||||
amount += amount;
|
||||
else
|
||||
amount += amount >> 1;
|
||||
}
|
||||
ammo = static_cast<AAmmo *>(other->FindInventory (ammotype));
|
||||
if (ammo == NULL)
|
||||
{
|
||||
|
|
@ -280,6 +289,14 @@ bool AWeapon::AddExistingAmmo (AAmmo *ammo, int amount)
|
|||
{
|
||||
if (ammo != NULL && ammo->Amount < ammo->MaxAmount)
|
||||
{
|
||||
// extra ammo in baby mode and nightmare mode
|
||||
if (gameskill == sk_baby || (gameskill == sk_nightmare && gameinfo.gametype != GAME_Strife))
|
||||
{
|
||||
if (gameinfo.gametype & (GAME_Doom|GAME_Strife))
|
||||
amount += amount;
|
||||
else
|
||||
amount += amount >> 1;
|
||||
}
|
||||
ammo->Amount += amount;
|
||||
if (ammo->Amount > ammo->MaxAmount)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue