- Added Karate Chris's 'sv_doubleammo' submission.

SVN r625 (trunk)
This commit is contained in:
Christoph Oelckers 2007-12-23 14:57:12 +00:00
parent ac04233590
commit 1791acfb56
5 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,5 @@
December 23, 2007 (Changes by Graf Zahl)
- Added Karate Chris's 'sv_doubleammo' submission.
- Added Karate Chris's 'Take' console command submission.
- Changed DTA_Translation parameter for DrawTexture to an integer to avoid
passing renderer specific data to the function. Also added DTA_Font so

View File

@ -388,6 +388,7 @@ CVAR (Flag, sv_nocrouch, dmflags, DF_NO_CROUCH);
CVAR (Int, dmflags2, 0, CVAR_SERVERINFO);
CVAR (Flag, sv_weapondrop, dmflags2, DF2_YES_WEAPONDROP);
CVAR (Flag, sv_doubleammo, dmflags2, DF2_YES_DOUBLEAMMO);
CVAR (Flag, sv_nobfgaim, dmflags2, DF2_NO_FREEAIMBFG);
CVAR (Flag, sv_respawnprotect, dmflags2, DF2_YES_INVUL);
CVAR (Flag, sv_barrelrespawn, dmflags2, DF2_BARRELS_RESPAWN);

View File

@ -246,7 +246,7 @@ enum
//#define DF2_YES_RUNEDROP 256 // Drop current rune upon death
//#define DF2_YES_200MAX 512 // Don't all max. health/armor items to bring
// // health or armor over 200%
//#define DF2_YES_DOUBLEAMMO 1024 // Doubles ammo like skill 1 and 5 do
DF2_YES_DOUBLEAMMO = 1 << 10, // Doubles ammo like skill 1 and 5 do
//#define DF2_NO_CLEARFRAGS 2048 // Don't clear frags after each level
//#define DF2_FORCE_NORESPAWN 4096 // Player cannot respawn
//#define DF2_YES_DEGENERATION 8192 // Quake-style degeneration

View File

@ -82,6 +82,10 @@ bool AAmmo::HandlePickup (AInventory *item)
receiving = FixedMul(receiving, G_SkillProperty(SKILLP_AmmoFactor));
}
int oldamount = Amount;
if (dmflags2 & DF2_YES_DOUBLEAMMO)
receiving *= 2;
Amount += receiving;
if (Amount > MaxAmount)
{

View File

@ -1012,6 +1012,7 @@ static menuitem_t DMFlagsItems[] = {
// { bitflag, "Falling damage (old)", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_FORCE_FALLINGZD} },
// { bitflag, "Falling damage (Hexen)",{&dmflags}, {0}, {0}, {0}, {(value_t *)DF_FORCE_FALLINGHX} },
{ bitflag, "Drop weapon", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_YES_WEAPONDROP} },
{ bitflag, "Double ammo", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_YES_DOUBLEAMMO} },
{ bitflag, "Infinite ammo", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_INFINITE_AMMO} },
{ bitflag, "No monsters", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_NO_MONSTERS} },
{ bitflag, "Monsters respawn", {&dmflags}, {0}, {0}, {0}, {(value_t *)DF_MONSTERS_RESPAWN} },