Commit Graph

172 Commits

Author SHA1 Message Date
Christoph Oelckers 94a04f36e5 - fixed: Dormant monsters should not be telefraggable. 2015-03-27 17:06:56 +01:00
Christoph Oelckers eb78c24140 - small oversight: TakeSpecialDamage must be called if damage is 0 (to do the special death state checks) but it may not be called if damage is already -1, because that means that damage and pain have already been ruled out completely. 2015-03-27 14:37:13 +01:00
Christoph Oelckers 9d5e6d32c7 - review of P_DamageMobj:
* decided that the pain threshold should always be checked against the actual damage, even if it's down to 0, for consistency. This also restores the original behavior of using actual damage for checking the pain threshold which was altered by the introduction of the ALLOWPAIN and CAUSEPAIN flags.
* removed all newly added exceptions that excluded the player from checks for completely cancelled out damage.
* if anything during damage modification causes negative damage, no pain handling whatsoever will be initiated.
* made sure that TELEFRAG_DAMAGE will not be subjected to damage amount modification by protection items and any other kind of damage modification.
2015-03-27 13:49:47 +01:00
Christoph Oelckers ac7abca6f8 - completely removed fakePain check in case DoSpecialDamage returns -1. This signifies a special case that should bypass anything that inflicting pain implies. 2015-03-27 11:55:11 +01:00
Christoph Oelckers c78b9235a8 - DoSpecialDamage was formerly called for any damage value, removed check for 'damage > 0' to restore original behavior. 2015-03-27 11:50:27 +01:00
Christoph Oelckers 66c3c93529 - call TakeSpecialDamage, even if damage is 0, just like it was in older versions. 2015-03-27 09:03:44 +01:00
MajorCooke d45d45583b Take PainThresholds into account. 2015-03-25 14:27:12 -05:00
MajorCooke f161c0c501 - Fixed: Projectile impacts never called P_DamageMobj when damage was 0 without the CAUSEPAIN flag. 2015-03-25 14:19:50 -05:00
Braden Obrzut 7a543a71e1 - Fixed: Buddha mode zombie bug returned. (Also fixes compiler warning.)
- Fixed: Missing include for FreeBSD compile.
2015-03-02 16:43:25 -05:00
ZzZombo c4b742ebf0 - Part 2 of the sanity crusade. 2015-02-08 17:03:49 +08:00
Christoph Oelckers 67312b907b - fixed: AInventory::AbsorbDamage may only be called for positive damage values, otherwise it ends up adding armor points. 2015-01-20 10:25:58 +01:00
Christoph Oelckers b6ccc79ca3 Merge branch 'fixes' of https://github.com/MajorCooke/zdoom
Conflicts:
	src/p_interaction.cpp
2014-11-25 16:32:42 +01:00
MajorCooke 7e579a0a2a - Fixed: Godmode didn't stop ALLOW/CAUSE/FORCEPAIN because the code execution always ended prematurely.
- Optimized checks for fake pain and forced pain. Fake pain now calls a subfunction so the code is cleaner.
2014-11-24 18:30:17 -06:00
Edward Richardson e303833e5f Inventory damage needs multiplying first 2014-11-20 22:12:16 +13:00
Edward Richardson 99b2cfa147 Added APROP_DamageMultiply
- Used with Set/GetActorProperty, adds a generic multiplier for damage a
source deals.
2014-11-20 18:57:40 +13:00
Edward Richardson 92143f90fa Yet another pointer 2014-11-16 02:59:37 +13:00
Edward Richardson 2d5cbe1d8b Missed a save 2014-11-16 02:44:17 +13:00
Edward Richardson 21e7beb21b Fixed missing NULL pointer checks 2014-11-16 02:39:16 +13:00
MajorCooke b54b18c8c5 -Added: CAUSEPAIN. Actors which deal damage (even if 0) while having this flag can cause other actors to trigger pain chances.
-Fixed: ALLOWPAIN should not trigger pain states if the damage is 0, but still allow for infighting to occur.
-Fixed: an unneeded logic call was processing damage modification when it was 0 to begin with.
2014-11-12 14:08:26 -06:00
ChillyDoom a613da43dd - Bot movement is now calculated locally. 2014-11-08 17:38:09 +00:00
MajorCooke c63adf920a - Fixed: BUDDHA flag on a player wasn't considered. 2014-11-05 22:05:21 -06:00
MajorCooke 2e085b2318 - Added ALLOWPAIN flag.
Monsters with this flag can enter pain states, regardless of
invulnerability or damage absorption.
- Fixed: god2 cheat wasn't being considered for drowning and thrusting.
2014-11-01 00:00:29 -05:00
Christoph Oelckers 6073adbeef - renamed FULLMASS to DONTTHRUST. 2014-10-28 08:40:34 +01:00
MajorCooke c01d1a8003 - Added DMSS_NOPROTECT.
Bypasses PowerProtection inventory items.
2014-10-27 22:29:10 -05:00
MajorCooke f802d7a44c - Added +FULLMASS.
Actors will be excluded from damage/radius thrusting of all sorts by
explosions or damage of any kind. They will also never deal impact
damage to other enemies, nor will they damage themselves from being too
close to a wall.
2014-10-27 21:35:55 -05:00
Christoph Oelckers 2e1fa70cbf - some parentheses to silence GCC. 2014-10-25 13:12:57 +02:00
MajorCooke d1dc6fd59a - Added: BUDDHA and FOILBUDDHA.
- Fixed: mugshot didn't take the god2 cheat into account.
2014-10-25 09:39:00 +02:00
MajorCooke b980069367 - Added GOD2 and BUDDHA2 cheats.
- Ensures that not even telefrag damage can kill the player.
- Fixed: Players with NODAMAGE could still hurt and kill themselves via
voodoo dolls.
2014-10-25 09:38:40 +02:00
Christoph Oelckers aa338a4dc6 - fixed: G_FinishTravel must synchronize the CF_FLY flag with MF2_FLY. 2014-10-25 01:00:40 +02:00
Christoph Oelckers 83be901ad6 - fixed: damage of amount TELEFRAG_DAMAGE should not be reduced by armors absorbing some damage, it'd lose its magic-ness, that is needed to ensure a guaranteed kill. The same applies to autousing health items. 2014-10-25 00:52:27 +02:00
Christoph Oelckers e81c404b04 - fixed some bad logic operations. 2014-10-25 00:01:04 +02:00
ChillyDoom db323643f8 - Renamed FBot to DBot and made it inherit from DThinker.
- Fixed: Bots added by players other than the net arbitrator did not have their skill set.
2014-10-14 19:57:11 +01:00
ChillyDoom 83d84eaae9 - Moved bot related variables from player_t into a new FBot class. 2014-10-13 18:40:25 +01:00
Braden Obrzut 2020769967 - Fixed: Player turned into a zombie if exiting telefragged in buddha mode.
- Fixed: Players could drop their inventory after dying.
2014-07-15 20:16:28 -04:00
WChrisK 67c6690689 Added a check that doesn't print empty obituary strings, as wad's that hide obituary strings in multiplayer games end up spamming a lot of empty lines. 2014-06-11 23:30:25 -04:00
Braden Obrzut d8ff4ec281 - Fixed: All clang 5.0 warnings.
- Renamed autostart/autozend since Xcode’s build process links in strictly alphabetical order.
2014-01-05 19:50:09 -05:00
Christoph Oelckers e14590d8ce - moved NOTELESTOMP to flags7. When committing I was accidentally on maint instead of master and in master flags6 was already full. 2013-08-12 20:41:33 +02:00
Christoph Oelckers a78ad3188b - added MF5_NOFORWARDFALL flag to prevent attacks from making its victim fall forward randomly. 2013-08-09 20:20:23 +02:00
Christoph Oelckers 3480d40484 - fixed: AActor::Die may only randomize the death state's duration if it is positive. Otherwise -1 (infinite) gets clobbered. 2013-07-30 16:52:36 +02:00
Christoph Oelckers 992ba0bbf4 - added handling of MF3_FOILINVUL for A_BFGSpray. This function needs special treatment because the shooting player is considered the inflictor of the spray damage. 2013-07-26 00:52:12 +02:00
Christoph Oelckers f1dff6c9d3 - fixed: The new XDeath code forgot to move the assignment of the flags4 variable. Also renamed the variable to avoid conflicts. 2013-07-02 22:01:54 +02:00
Christoph Oelckers 7e6a5c1448 - added damage type specific extreme death and extreme crash states. Order of labels is 'Death.extreme.damagetype' ('XDeath.damagetype') and 'Crash.extreme.damagetype'.
- fixed: Damage of type 'extreme' did not get recorded as an extreme death for the mugshot code.
- changed: extreme deaths now only get recorded when an extreme death state was actually used, to ensure that the crash state being used is the correct one associated with the death state.
2013-07-01 11:02:35 +02:00
Christoph Oelckers 394f21f71e - fixed: Draining health from a victim must check for damage reduction before awarding the health to the player. This affected Heretic's gauntlets, A_Saw and A_CustomPunch.
- added a DONTDRAIN flag that prevents the above attacks from draining any health at all.
2013-06-24 16:42:43 +02:00
Christoph Oelckers 9f253ccae3 - fixed: Application of inflictor's death damage type was done too late and missed a few spots where it needed.
- fixed: DamageTypeReceived was not serialized.
- fixed: The check for unhandled damage type was rendered ineffective by the old code handling the DeathType.
2013-06-24 15:40:17 +02:00
Christoph Oelckers 0bca41c202 - replaced unused RNGs with pr_damagemobj for consistency checksum.
SVN r4297 (trunk)
2013-05-30 10:18:46 +00:00
Randy Heit 2668988870 - Switched to a genericly extensible representation for userinfo.
- Fixed: The playerinfo CCMD did not range check the player number.

SVN r4253 (trunk)
2013-05-12 18:27:03 +00:00
Randy Heit a50e670c0c - Use tests less prone to overflow on very steep slopes when detecting which side of a plane
the camera is on. Mostly, this means testing the distance of the camera to the plane rather
  than computing the plane's Z at the camera and comparing that with the camera's Z.

SVN r4220 (trunk)
2013-04-17 01:32:40 +00:00
Randy Heit c116453158 - When doing kickback in P_DamageMobj(), choose a random direction if the target and origin are in the exact same spot.
SVN r4069 (trunk)
2013-02-07 21:02:26 +00:00
Randy Heit 47cb2ad6bc - In P_PoisonPlayer(), keep track of the source as the poisoner, so you can get accurate kill
accounting. Also, if the poisoner is a missile, remembering it is pretty pointless, since it's
  likely to be gone before the player ever dies from the poison.

SVN r4040 (trunk)
2013-01-25 02:35:11 +00:00
Randy Heit 814cb4d135 - Move NULL player check earlier in P_PoisonDamage, before player is accessed.
SVN r4016 (trunk)
2013-01-03 03:05:44 +00:00