Commit graph

311 commits

Author SHA1 Message Date
Christoph Oelckers
9410e5ea98 - fixed: P_DamageMobj should clear reactiontime only for non-players.
For players this variable has an entirely different meaning which does not agree with being modified here.
2018-11-02 13:20:35 +01:00
Marrub
0f6f23350d Add "neutral" gender option and better obit formatting 2018-10-31 11:24:01 +01:00
Christoph Oelckers
0fd1909f2c - got rid of FNameNoInit and made the default constructor of FName non-initializing.
This setup has been a constant source of problems so now I reviewed all uses of FName to make sure that everything that needs to be initialized is done manually.
This also merges the player_t constructor into the class definition as default values.
2018-08-19 10:36:10 +02:00
Christoph Oelckers
f48b2d8b71 - fixed: A global variable was used to pass MeansOfDeath to ClientObituary.
The problem here is that this affects the public scripting interface so it cannot be committed to master without further adjustments.

# Conflicts:
#	src/p_interaction.cpp
2018-07-29 19:30:28 +02:00
alexey.lysiuk
3712a2cea5 - fix crash on dying when player class has no death states
https://forum.zdoom.org/viewtopic.php?t=60815
(cherry picked from commit 7009755c52)
2018-06-05 12:26:02 +02:00
alexey.lysiuk
86eb6b8f85 - trigger WorldThingDamaged event before WorldThingDied
https://forum.zdoom.org/viewtopic.php?t=60597
(cherry picked from commit fc91827900)
2018-05-17 11:57:04 +02:00
Major Cooke
0d841ab4df - Added DMG_NO_PAIN for DamageMobj. 2017-12-16 12:17:55 -05:00
Rachael Alexanderson
012496ee98 - added cheat protection to sv_damagefactor* 2017-07-26 13:32:45 -04:00
Rachael Alexanderson
2e6c4eeab9 - removed NOSAVE flags from sv_damagefactor* cvars so that they get put in a savegame 2017-07-22 08:25:39 -04:00
Rachael Alexanderson
77617a2757 Merge branch 'master' into qzdoom-merge 2017-07-19 17:32:41 -04:00
Rachael Alexanderson
5918167fb3 - added 'kill baddies' cheat - does the same thing as 'kill monsters' only it ignores friendly monsters 2017-07-19 15:03:27 -04:00
Rachael Alexanderson
9eb0b64ab0 - Added new "sv_damagefactor*" variables.
sv_damagefactorplayer: Scales damage for player
sv_damagefactorfriendly: Scales damage for all other +FRIENDLY objects
sv_damagefactormobj: Scales damage for everything else (incl. monsters and decorations)
2017-07-15 03:38:10 -04:00
Rachael Alexanderson
a93efb1e9e - slightly increase source code readability by moving a flag from one line to another. 2017-05-16 09:52:50 +02:00
Rachael Alexanderson
c6946cc672 - removed all instances of CF_POWERBUDDHA 2017-05-16 09:52:50 +02:00
Rachael Alexanderson
fe023b5ca4 - changed Buddha powerup from a flag to an inventory check 2017-05-16 09:52:50 +02:00
Major Cooke
b1a8ef54f6 - Fixed bitwise comparison. 2017-05-16 09:52:50 +02:00
Major Cooke
6bbbd28a08 - Added missing LAXTELEFRAGDMG support to SelfDamageFactor. 2017-05-15 19:19:35 +02:00
Major Cooke
795f8f0578 - Added a separate cheat flag to handle buddha powerups. Currently, Buddha powerups could interfere and disable the actual player cheat unintentionally, when the player may not want their actual cheat to be turned off.
- Set some overlooked 1000000 damage points to TELEFRAG_DAMAGE inside the falling damage code.
2017-05-14 17:22:46 +02:00
Christoph Oelckers
0a8083e280 - fixed default obituary handling for predefined damagetypes. 2017-05-09 19:04:07 +02:00
Christoph Oelckers
96d328de9b - removed all Doom Source license and all default Raven copyright headers and replaced them with GPLv3. Also fixed the license in a few other files.
For some files that had the Doom Source license attached but saw heavy external contributions over the years I added a special note to license all original ZDoom code under BSD.
2017-04-17 13:33:19 +02:00
Christoph Oelckers
cde450dd8a - some enhancements for PowerReflection. 2017-04-14 16:51:11 +02:00
Christoph Oelckers
cd180d29c7 - block direct use of 'new' for DObjects.
This is to ensure that the Class pointer can be set right on creation. ZDoom had always depended on handling this lazily which poses some problems for the VM.
So now there is a variadic Create<classtype> function taking care of that, but to ensure that it gets used, direct access to the new operator has been blocked.

This also neccessitated making DArgs a regular object because they get created before the type system is up. Since the few uses of DArgs are easily controllable this wasn't a big issue.

- did a bit of optimization on the bots' decision making whether to pick up a health item or not.
2017-04-14 13:31:58 +02:00
Christoph Oelckers
6599e2c425 - moved the VM types into their own file and only include it where really needed. 2017-04-13 01:12:04 +02:00
Christoph Oelckers
e4d2380775 - moved all remaining fields from PClassActor to FActorInfo.
- added a few access functions for FActorInfo variables.

With PClassActor now empty the class descriptors can finally be converted back to static data outside the class hierarchy, like they were before the scripting merge, and untangle the game data from VM internals.
2017-04-12 00:07:41 +02:00
Christoph Oelckers
854053a14f - use TArrays instead of TMaps to store damage factors and pain chances.
For these fields maps have no advantage. Linearly searching a small array with up to 10 entries is nearly always faster than generating a hash for finding the entry in the map.
2017-04-11 23:29:37 +02:00
Christoph Oelckers
7011010ff2 - fixed the drain callback.
- changed the effect spawn prevention of the Hexen flame strike weapon and reverted the attempt to fix this in FastProjectile.

This cannot be fixed in the base class, which was doing everything right. It's the flame missile that was doing undefined things by stopping its movement without clearing its missile flag. This cannot work because missiles are given some minimal forced velocity to ensure collision detection and any attempt to address this without clearing the missile flag is doomed to fail.
2017-03-29 22:50:13 +02:00
Christoph Oelckers
d36f656caf - added a callback for when damage is drained from a target. 2017-03-29 20:25:54 +02:00
Christoph Oelckers
d74b6a6896 - typo... 2017-03-19 12:41:00 +01:00
Christoph Oelckers
fd9dc9e3f4 - fixed handling for OkayToSwitchTarget. 2017-03-19 12:07:02 +01:00
Christoph Oelckers
64bdc8c495 - fixed some incomplete checks for static arrays.
- made AActor::OkaytoSwitchTarget scripted virtual.
2017-03-15 01:39:59 +01:00
Christoph Oelckers
28aba3469d - missed 2 includes 2017-03-11 19:18:31 +01:00
Christoph Oelckers
609e4c78b4 - fixed: NOINFIGHTSPECIES checked the wrong target actor. 2017-03-09 18:44:32 +01:00
Rachael Alexanderson
26f7902c3f - fixed: If player is killed by world, attacker was not checked for nullptr, causing a crash. 2017-03-02 13:02:25 +01:00
Christoph Oelckers
fc125f7eaf - reworked the obituary system to use scripted virtual overrides. Let's hope this solves the problems with the original code, now that any actor needing special treatment can override it. 2017-02-28 14:30:14 +01:00
Christoph Oelckers
851984efe0 - made GetDeathHeight a virtual scripted function.
- made GetGibHealth a virtual scripted function.
- removed a few more native meta properties.
2017-02-28 13:40:46 +01:00
Christoph Oelckers
d5250d6b9f - made WoundHealth modifiable to allow more control over the wound state. 2017-02-28 12:56:35 +01:00
Christoph Oelckers
2a4a5e7a70 - refactored a few more native meta properties. 2017-02-28 12:47:44 +01:00
Christoph Oelckers
f9f9f2d5fc - added selfdamagefactor actor property. 2017-02-27 11:22:51 +01:00
Christoph Oelckers
3d500f0495 - added default obituaries for damage types.
Note that this is only implemented for the new official way of doing this in MAPINFO, but not in DECORATE!
2017-02-26 21:36:06 +01:00
Christoph Oelckers
7267e608cf - added kickback factor skill property. 2017-02-26 19:37:25 +01:00
Christoph Oelckers
0cc46a2aaf - added a FORCEINFIGHTING flag. 2017-02-26 19:05:20 +01:00
Christoph Oelckers
e6b31dde27 - added some flexibility to some Skulltag powerups.
- handle these powerups by actual item checks instead of cheat flags. (The same should also be done for the Frightener and Buddha but those are a bit more complex because they are also real cheats.)
2017-02-26 16:23:22 +01:00
Christoph Oelckers
8b2a5c75a1 - added an old submission for PowerReflection, although it had to be seriously reworked and improved. 2017-02-26 15:47:37 +01:00
Christoph Oelckers
35033891ac - added MF7_NOINFIGHTSPECIES flag. 2017-02-25 20:12:30 +01:00
Christoph Oelckers
d8ebbcfc08 - fixed: When loading a savegame the player class in the userinfo needs to be updated.
- fixed: Class pointers should not be added to the list of garbage collected pointers.
- fixed several warnings in the event code.
2017-02-15 11:55:08 +01:00
ZZYZX
39355cf45d Implemented player scripts. 2017-02-02 21:25:07 +02:00
ZZYZX
89c475c2d1 Added WorldThingDamaged hook 2017-01-31 04:35:44 +02:00
ZZYZX
71f62af6db Implemented WorldThingDied (calls at the same point as SCRIPT_Kill); Added Inflictor parameter for WorldThingDied. 2017-01-31 02:07:00 +02:00
Christoph Oelckers
2a6fafa15e - don't let P_DamageMobj return negative values.
This serves no purpose, there's not a single place in the code which checks for it, but if that negative values goes unchecked to functions that expect an actually meaningful value for damage inflicted, some bad results can happen. If no damage is inflicted, a proper 0 needs to be returned so that the value can actually be worked with. The return value was a ZDoom invention, it is completely unclear why -1 was chosen if some kind of protection rendered the damage ineffective.
2017-01-21 13:12:34 +01:00
Christoph Oelckers
98f9219334 - scriptified the remaining functions in a_artifacts.cpp.
- added some helpers to set scripted member variables through the native property parser.

Unfortunately some classes, e.g. PowerMorph, MorphProjectile and the powerup contain some that cannot be handled through the 'property' definition on the script side so they need to be done from the native side.
2017-01-17 20:30:17 +01:00