diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 0976991f1b..87c9699e93 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,7 @@ +January 22, 2007 +- Added a new WIF_NO_AUTO_SWITCH flag for weapons that should never be + switched to automatically when the player picks them up. + January 18, 2007 - Added D3DCREATE_FPU_PRESERVE to the IDirect3D9::CreateDevice() call. Normally Direct3D sets the FPU to single precision. We don't want that, diff --git a/src/g_shared/a_pickups.h b/src/g_shared/a_pickups.h index 93c2d81290..7429a73ff3 100644 --- a/src/g_shared/a_pickups.h +++ b/src/g_shared/a_pickups.h @@ -264,7 +264,7 @@ enum WIF_WIMPY_WEAPON = 0x00000200, // change away when ammo for another weapon is replenished WIF_POWERED_UP = 0x00000400, // this is a tome-of-power'ed version of its sister WIF_EXTREME_DEATH = 0x00000800, // weapon always causes an extreme death - + WIF_NO_AUTO_SWITCH = 0x00001000, // never switch to this weapon when it's picked up WIF_STAFF2_KICKBACK = 0x00002000, // the powered-up Heretic staff has special kickback WIF_CHEATNOTWEAPON = 1<<27, // Give cheat considers this not a weapon (used by Sigil) diff --git a/src/g_shared/a_weapons.cpp b/src/g_shared/a_weapons.cpp index c8bc56bb37..0cb9ae49b8 100644 --- a/src/g_shared/a_weapons.cpp +++ b/src/g_shared/a_weapons.cpp @@ -221,7 +221,7 @@ void AWeapon::AttachToOwner (AActor *other) SisterWeapon = AddWeapon (SisterWeaponType); if (Owner->player != NULL) { - if (!Owner->player->userinfo.neverswitch) + if (!Owner->player->userinfo.neverswitch && !(WeaponFlags & WIF_NO_AUTO_SWITCH)) { Owner->player->PendingWeapon = this; } diff --git a/src/thingdef.cpp b/src/thingdef.cpp index 2943ff1dcb..f67e2608b7 100644 --- a/src/thingdef.cpp +++ b/src/thingdef.cpp @@ -268,6 +268,7 @@ static flagdef WeaponFlags[] = DEFINE_FLAG2(WIF_BOT_MELEE, MELEEWEAPON, AWeapon, WeaponFlags), DEFINE_FLAG(WIF_BOT, BFG, AWeapon, WeaponFlags), DEFINE_FLAG(WIF, CHEATNOTWEAPON, AWeapon, WeaponFlags), + DEFINE_FLAG(WIF, NO_AUTO_SWITCH, AWeapon, WeaponFlags), //WIF_BOT_REACTION_SKILL_THING = 1<<31, // I don't understand this }; diff --git a/wadsrc/wadsrc.vcproj b/wadsrc/wadsrc.vcproj index c412caeecf..0c220a087c 100644 --- a/wadsrc/wadsrc.vcproj +++ b/wadsrc/wadsrc.vcproj @@ -375,10 +375,34 @@ + + + + + + + + + + + + @@ -399,10 +423,50 @@ RelativePath=".\decorate\doom\doomhealth.txt" > + + + + + + + + + + + + + + + + + + + + @@ -411,6 +475,14 @@ + + + + @@ -431,10 +503,42 @@ RelativePath=".\decorate\heretic\heretickeys.txt" > + + + + + + + + + + + + + + + + @@ -455,6 +559,10 @@ RelativePath=".\decorate\hexen\hexenspecialdecs.txt" > + + @@ -503,6 +611,10 @@ RelativePath=".\decorate\strife\strifearmor.txt" > + + @@ -511,6 +623,10 @@ RelativePath=".\decorate\strife\strifekeys.txt" > + + @@ -523,6 +639,14 @@ + + + + @@ -547,10 +671,22 @@ RelativePath=".\decorate\shared\debris.txt" > + + + + + +