argv-minus-one
0717f5aede
Make various getter and pure-math Actor methods clearscope.
...
These methods do not examine or change playsim state. They only perform math or look at class metadata.
Methods changed are:
• deltaangle
• absangle
• AngleToVector
• RotateVector
• Normalize180
• BobSin
• GetDefaultSpeed
• FindState
• GetDropItems (which changes the scope of the returned struct, but the returned struct is all-readonly anyway)
2018-08-14 11:52:44 +02:00
Christoph Oelckers
ff69d945e1
- 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 17:00:05 +02:00
Rachael Alexanderson
512082b222
- fixed: 'empty function OnGiveSecret' - this was my fault, giving bad advice to Marisa in her PR. I fixed it.
2018-06-05 10:20:02 -04:00
Marisa Kirisame
477cf23fd2
Adds "OnGiveSecret" virtual function on Actor for customizing behavior of secret finding.
2018-06-05 10:06:53 -04:00
Kevin Caccamo
1c58093fc8
Add info about UseSpecial flag feature conflict above Actor.Used
2018-04-24 05:56:07 -04:00
ZippeyKeys12
0441994106
Default newradius in A_SetSize
2018-03-30 18:06:46 -05:00
Marisa Kirisame
069c5aa90a
Fix accidentally removed SectorPlane assignment. Added missing HitVector support.
2018-03-03 09:30:06 +01:00
Major Cooke
7ac8b496f1
Added Distance(2/3)DSquared functions.
2018-02-28 09:28:11 +01:00
alexey.lysiuk
fb1f8a6045
Restored ACS_NamedExecuteWithResult for DECORATE
...
https://forum.zdoom.org/viewtopic.php?t=59250
2018-02-24 22:03:23 +02:00
alexey.lysiuk
1679065a5d
Exposed Actor.ACS_ScriptCall() function
...
This method can be used with arbitrary actor object like thing.ACS_ScriptCall("script")
CallACS() and ACS_NamedExecuteWithResult() intrinsics work only within self actor context
2018-02-24 16:23:55 +02:00
Marisa Kirisame
69e8c9ec6e
A more "general purpose" line trace function. Far from a complete ZScript interface with Trace(), though.
2018-01-21 10:54:02 +01:00
Rachael Alexanderson
6df936e0a0
- remove A_IsPlayingSound
2018-01-20 19:01:47 +01:00
Marisa Kirisame
a01ca4c3a1
Exported S_IsActorPlayingSomething and S_GetMSLength to ZScript.
...
Added missing vm.h include, moved A_IsPlayingSound to p_actionfunctions.cpp.
- make A_IsPlayingSound ui only
2018-01-20 19:01:47 +01:00
Major Cooke
d5d393aaf2
- Added GetRadiusDamage. Returns the raw calculated explosion damage falloff by distance only.
...
- Split off both explosion damage calculations into P_Get(Old)RadiusDamage functions for ease of maintenance.
2018-01-20 18:45:01 +02:00
Rachael Alexanderson
7416f42b47
- add 'FriendlySeeBlocks' actor property that allows a modder to expand the maximum radius that a friendly monster can see enemies.
2018-01-09 12:34:12 -05:00
alexey.lysiuk
549a9d3cf0
Extended Actor.CheckMove() with optional position information
...
https://forum.zdoom.org/viewtopic.php?t=58964
2018-01-03 10:48:10 +02:00
alexey.lysiuk
c4648a2b1c
Added CheckMove() function to ZScript Actor class
...
https://forum.zdoom.org/viewtopic.php?t=58964
2018-01-02 13:04:28 +02:00
Major Cooke
fa0082aef6
Added ability to perform reverse fades with A_SetBlend
2017-12-27 20:51:13 -05:00
Rachael Alexanderson
0dcb1fe74c
- fix zscript-side definition for Warp
2017-11-14 18:44:35 -05:00
Christoph Oelckers
5935e14c09
- exported P_Thing_Warp to ZScript.
2017-11-13 21:00:17 +01:00
Major Cooke
d422392b94
Extended LineAttack() with offsets and new flags
...
Added forward and side offsets for LineAttack() function
Added absolute offset and absolute position flags for LineAttack() function
2017-11-07 11:02:54 +02:00
alexey.lysiuk
ca55d8993f
Added Actor.A_SoundVolume(int slot, double volume) function to ZScript
...
https://forum.zdoom.org/viewtopic.php?t=57594
2017-08-31 09:45:09 +03:00
nashmuhandes
42db31b816
Added per-actor camera FOV.
2017-08-28 21:14:11 -04:00
Christoph Oelckers
485c4c71b5
- fixed: When stepping through a sector portal and touching a two sided line on the opposite side, its opening must be used, regardless of the FFCF_NOFLOOR flag.
2017-08-27 10:36:34 +02:00
Christoph Oelckers
4483d665d4
- fixed: FastProjectile's movement code was missong a portal check.
2017-08-12 13:58:16 +02:00
Rachael Alexanderson
91ff447a90
- fixed compile from last commit
...
- refactored the zscript hookup a bit, made it actually work
2017-07-29 17:03:43 -04:00
Christoph Oelckers
a210aaea3e
- fixed: All melee functions calling TraceBleed after DamageMobj must first copy the target member to a local variable.
...
DamageMobj can destroy the damaged actor if the death state sequence has zero duration. But Actor.target is a garbage collected member variable, i.e. it will be null, once the actor it points to gets destroyed.
This was originally done correctly in the C++ code but during the scriptification all those 'AActor *target = self->target' lines were removed because they looked redundant, but were not.
2017-06-06 09:12:58 +02:00
jplebreton
2c7a0c87c8
add FloatBobStrength Actor property, a multiplier on Z offset created by FloatBob behavior. default of 1.0 is current behavior, set higher/lower for more/less extreme bobbing.
2017-06-03 18:02:27 +02:00
Major Cooke
bb1e927c46
Give the parameter a better name to associate by.
2017-05-17 23:03:22 +02:00
Major Cooke
65f13b0927
- Added a Z offsetting parameter to the ZScript LineAttack function.
...
- Added LAF_OVERRIDEZ flag to LineAttack. Disregards all internal offsetting aside the actor's Z position before adding the offset parameter.
2017-05-17 23:03:22 +02:00
Christoph Oelckers
abee2805cb
- the last scriptified bits of P_PlayerThink.
2017-05-01 00:27:58 +02:00
Christoph Oelckers
6e25c34fda
- more player code exported
2017-04-30 22:17:51 +02:00
Christoph Oelckers
329c168cc2
- added a distance parameter to A_SprayDecal.
2017-04-14 16:28:54 +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
6870efe134
- added a GetCVarString ZScript/DECORATE function.
...
- fixed: loading a savegame triggered PlayerEntered events.
2017-03-28 21:37:43 +02:00
Christoph Oelckers
a112b29c43
- implemented the inventory bar. This object is a bit special because it requires a lot of parameters, most of which are easily set to defaults. To make handling easier, most are passed through a container object which does some processing up front.
...
- finished work on the Doom status bar. I also took the opportunity to fix the layout of the inventory bar which is a bit broken in SBARINFO.
- tuned the selection rules for deciding what creates the status bar, so that the most recent definition that can be found is chosen.
2017-03-27 01:02:10 +02:00
Christoph Oelckers
e791c957d9
- implemented the regular Doom status bar.
...
The DOOM status bar and HUD are complete, except the inventory bar.
2017-03-26 22:04:58 +02:00
Christoph Oelckers
a3ee3c287e
- major progress on the status bar code: SBARINFO's DrawGraphic has been ported into a generic function of the base statusbar class and put to use for a few items on the Strife status bar.
...
- decided to ditch the widget system I had started to lay out. As it turns out that would make things far more complicated and slower than they need to be.
2017-03-24 00:47:08 +01:00
Christoph Oelckers
845c43876c
- moved all trivial actor properties into the scripts as 'property' declarations.
2017-03-19 11:30:28 +01:00
Christoph Oelckers
d0c77d7264
- added a GetRenderStyle function to Actor, so that the internal render style can be retrieved in a format suitable for scripting.
2017-03-15 10:36:41 +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
f70d0a6ced
- added a setinv cheat CCMD.
2017-03-14 11:44:21 +01:00
Rachael Alexanderson
527a172fcd
Merge https://github.com/coelckers/gzdoom
2017-03-07 22:03:56 -05:00
Christoph Oelckers
2f29b075b2
- made CountInv clearscope and const.
2017-03-07 22:55:15 +01:00
Christoph Oelckers
7ce8009576
- made several read-only actor functions accessible to UI code.
2017-03-07 18:59:48 +01:00
Rachael Alexanderson
7ef8ed5867
Merge https://github.com/coelckers/gzdoom
2017-03-05 18:40:44 -05:00
Christoph Oelckers
7df698dad8
- implemented the parser basics of a ZScript versioning system.
...
Note that this completely disables the newly added keywords 'play' and 'ui' for unversioned code to allow using them as identifiers as I have found at least one mod that uses a variable named 'play' that would have been rendered broken otherwise.
This also disables many ZScript only keywords for other parsing jobs.
2017-03-05 14:13:00 +01:00
Rachael Alexanderson
b8b5360de1
Merge https://github.com/coelckers/gzdoom
2017-03-04 07:28:02 -05:00
Christoph Oelckers
7dbc6939c4
- declared most native getters in Actor as const.
...
- made the self pointer of const functions readonly.
This seems to work fine. Both calling a non-const function and trying to assign a value to a member fail with an error message.
2017-03-04 12:43:07 +01:00
Christoph Oelckers
4c5794b6d5
- made GetObituary non-constant.
...
This gets only called from within the play code and making it const would block potential use cases that involve changing some internal variables like counters.
2017-03-04 12:11:56 +01:00
Christoph Oelckers
b3ba5bfe2c
- allow 'const' on class functions. This is preferable to 'clearscope' so that the UI code can call getter functions without having to declare things as 'clearscope'.
...
Clearscope is a dangerous context and should be limited to the minimum extent possible and preferably be blocked in user code.
This may still need some work on const functions but better have it in now.
2017-03-04 12:07:45 +01:00
ZZYZX
c9a994a885
Fixed: clearscope should also clear the inherited scope (through struct member access chain); Fixed: struct member access chain should ONLY work for structs (forgot that FxClassMember inherits FxStructMember)
2017-03-04 00:04:19 +02:00
Rachael Alexanderson
b3a69e1df8
Merge https://github.com/coelckers/gzdoom
2017-03-02 18:13:33 -05:00
Christoph Oelckers
00dc59ebdc
- separated the blood translation index from the BloodColor variable to allow more than 255 blood translations and as a prerequisite for allowing to change the blood color.
2017-03-02 10:26:23 +01:00
Rachael Alexanderson
d84ba4b953
Merge https://github.com/coelckers/gzdoom
2017-03-02 04:22:32 -05:00
Christoph Oelckers
0de79042d4
- fixed: 'Bloodtype' cannot use the generic property definition because it needs special handling for optional arguments. This reinstates the native handler.
2017-03-01 20:20:46 +01:00
Rachael Alexanderson
d6169ea75e
Merge https://github.com/coelckers/gzdoom
2017-02-28 18:55:17 -05: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
1311f08f47
- scriptified Actor.GetBloodType as a virtual function to allow mods more flexibility here.
...
- made CameraHeight a modifiable actor property - it was readonly before.
- allow accessing the type constants from ZScript, this required quite a bit of explicit coding because the type system has no capabilities to search for basic types by name.
2017-02-28 12:11:25 +01:00
Christoph Oelckers
b6a1fe7fc6
- scriptified the basic attack functions, its properties and the explosion properties to test the new metadata system.
2017-02-28 10:51:32 +01:00
Rachael Alexanderson
2a847ca570
Merge https://github.com/coelckers/gzdoom
2017-02-27 01:06:00 -05:00
Christoph Oelckers
f6dd99d3aa
- added A_Morph function.
2017-02-26 21:20:47 +01:00
Rachael Alexanderson
7a5df2bc28
Merge commit 'b0eb19b'
2017-02-26 13:41:02 -05:00
Christoph Oelckers
fb3d4bd42a
- added A_SetMugshotState.
2017-02-26 18:46:06 +01:00
Christoph Oelckers
5fe04dfd20
- added A_SprayDecal function.
2017-02-26 18:37:12 +01:00
Christoph Oelckers
c4b546404a
- added a 'nocheck' parameter to A_Raise* and Thing_Raise.
2017-02-26 17:50:48 +01:00
Rachael Alexanderson
404b326812
Merge https://github.com/coelckers/gzdoom
2017-02-25 18:32:06 -05:00
Christoph Oelckers
35552ce0cb
- added a Death.Sky state for missiles that gets used when they hit a sky plane.
...
- fixed: The Alt HUD did not draw the crosshair in HUD off mode.
2017-02-25 20:45:28 +01:00
Rachael Alexanderson
5c5b6a55d5
Merge https://github.com/coelckers/gzdoom
2017-02-24 13:24:44 -05:00
alexey.lysiuk
202c192e11
Added default value for amount argument of A_DropInventory()
...
https://mantis.zdoom.org/view.php?id=330
2017-02-24 10:15:46 +02:00
Rachael Alexanderson
80d3fd58ff
Merge https://github.com/coelckers/gzdoom
2017-02-23 15:00:09 -05:00
Christoph Oelckers
73cceea994
- also added the 'amount' parameter to DropInventroy and A_DropInventory script functions.
2017-02-23 20:55:12 +01:00
Rachael Alexanderson
ef22d10756
Merge https://github.com/coelckers/gzdoom
2017-02-15 20:08:21 -05:00
Christoph Oelckers
4df2a221a8
- fixed: The special called by the InterpolationSpecial actor must have no activator.
...
This required splitting A_CallSpecial into a direct wrapper around P_ExecuteSpecial and implementing itself as a script function calling ExecuteSpecial so that this special case can use a version of the function that can be used without an activator.
2017-02-15 22:49:13 +01:00
Rachael Alexanderson
5dad292c56
Merge remote-tracking branch 'remotes/gzdoom/master'
2017-02-15 05:43:15 -05:00
Christoph Oelckers
8d7a64bd17
- added a virtual 'used' method that gets called when the player presses use on an actor. This method will only be called if the actor does not have the USESPECIAL flag - that one will be handled as before.
2017-02-15 00:43:30 +01:00
Rachael Alexanderson
5948c7b0da
Merge https://github.com/coelckers/gzdoom
2017-02-08 18:42:24 -05:00
Major Cooke
dd102caf13
- Fixed: SetCamera didn't have the 'action' identifier, nor did it use the actual 'cam' actor provided, rendering it nonfunctional.
2017-02-08 18:17:09 +01:00
Rachael Alexanderson
942f90a759
Merge remote-tracking branch 'gzdoom/master'
2017-02-05 16:07:48 -05:00
Christoph Oelckers
72810c969d
- added ChangeCamera script function.
2017-02-05 18:07:12 +01:00
Rachael Alexanderson
410a1aa24c
Merge https://github.com/coelckers/gzdoom
2017-01-20 20:56:02 -05:00
Christoph Oelckers
314e49f791
- let A_SpawnProjectile, A_FireProjectile, A_SpawnItem(Ex) and A_ThrowGrenade return the spawned actors to the calling code.
...
- fixed the return type checks in CallStateChain. These made some bogus assumptions about what return prototypes to support and would have skipped any multi-return function whose first argument was actually usable.
2017-01-20 12:39:51 +01:00
Rachael Alexanderson
e52772745b
Merge https://github.com/coelckers/gzdoom
2017-01-19 23:07:14 -05:00
Christoph Oelckers
c880b26d98
- scriptified MorphProjectile and CustomSprite.
...
This should for now conclude actor class scriptification. The remaining ten classes with the exception of MorphedMonster are all too essential or too closely tied to engine feature so they should remain native.
2017-01-20 01:11:36 +01:00
Rachael Alexanderson
8a198591f4
Merge https://github.com/coelckers/gzdoom
2017-01-19 11:58:53 -05:00
Christoph Oelckers
42f3ccc602
- scriptified a few parts of p_pspr.cpp.
...
- added a speed parameter to A_Lower and A_Raise in the process.
2017-01-19 13:26:46 +01:00
Magnus Norddahl
53a79ca215
Merge remote-tracking branch 'gzdoom/master' into qzdoom
...
# Conflicts:
# src/r_things.cpp
2017-01-18 04:09:16 +01:00
Christoph Oelckers
14f2c39e58
- scriptified cht_Give and cht_Take and made them virtual function of PlayerPawn so that this can be better configured for mods that want other options in here.
...
- improved the class pointer to string cast to print the actual type it describes and not the class pointer's own type.
- fixed: The 'is' operator created non-working code when checking the inheritance of a class pointer, it only worked for objects.
2017-01-17 17:34:39 +01:00
Magnus Norddahl
1c3440e391
Merge remote-tracking branch 'gzdoom/master' into qzdoom
...
# Conflicts:
# src/r_plane.cpp
# src/r_plane.h
2017-01-16 06:03:21 +01:00
Christoph Oelckers
267600826f
- sxriptified key and puzzleitem base classes.
2017-01-15 10:37:54 +01:00
Christoph Oelckers
e16713492f
- scriptified A_FreezeDeath(Chunks).
2017-01-14 18:26:59 +01:00
Christoph Oelckers
96777273c4
- scriptified ASoundSequence.
...
- exported virtual Actor.MarkPrecacheSounds function.
2017-01-14 14:37:29 +01:00
Christoph Oelckers
f83444f3cc
- exported the sound sequence interface to scripting.
...
- split out the map data definitions from base.txt into their own file.
2017-01-14 13:02:08 +01:00
Rachael Alexanderson
d707f1c22e
Merge https://github.com/coelckers/gzdoom
2017-01-14 00:38:26 -05:00
Christoph Oelckers
40e7fa5be2
- scriptified the RandomSpawner.
...
- fixed: String constants were not processed by the compiler backend.
- added an explicit name cast for class types.
2017-01-14 02:05:52 +01:00
Magnus Norddahl
1c4e0c6385
Merge remote-tracking branch 'gzdoom/master' into qzdoom
2017-01-14 01:56:18 +01:00
Christoph Oelckers
4be0767d7b
- scriptified the moving camera.
2017-01-13 22:13:03 +01:00