Commit graph

270 commits

Author SHA1 Message Date
Christoph Oelckers
d73db8c1e8 - added a 'local' parameter to the A_Log family.
- complete "give quakes their own damage type." (was only partially saved.)
2017-01-13 11:48:05 +01:00
Christoph Oelckers
1400f401e7 - fixed use of multiple sector actions in the same sector.
The entire setup was quite broken with each item using its own activation result and the ones of the subsequent items in the list as the return value.
This rendered the STANDSTILL check in the main function totally unpredictable because the value it depended on could come from any item in the list.
Changed it so that the main dispatcher function is part of sector_t and does the stepping through the list iteratively instead of letting each item recursively call its successor and let this function decide for each item alone whether it should be removed.
The broken setup also had the effect that any MusicChanger would trigger all following SecActEnter specials right on msp start.
2017-01-13 01:34:43 +01:00
Christoph Oelckers
cf39af0642 - consolidated the sector action classes.
This can be done with a lot less overhead by using one of the object's properties to store the activation flag, so that all the nearly redundant trigger methods can be folded into one.
2017-01-13 01:06:37 +01:00
Christoph Oelckers
85a84b5e94 - scriptified FastProjectile. 2017-01-13 00:35:56 +01:00
Christoph Oelckers
cc58f13e4e - scriptified the sector silencer. 2017-01-12 23:35:24 +01:00
Christoph Oelckers
3d73919092 - scriptified CustomBridge.OnDestroy. 2017-01-12 22:56:06 +01:00
Christoph Oelckers
7b7623d2c4 - split DObject::Destroy into the main method, a native OnDestroy and a scripted OnDestroy method and made the main method non-virtual
This was done to ensure it can be properly overridden in scripts without causing problems when called during engine shutdown for the type and symbol objects the VM needs to work and to have the scripted version always run first.
Since the scripted OnDestroy method never calls the native version - the native one is run after the scripted one - this can be simply skipped over during shutdown.
2017-01-12 22:49:18 +01:00
Christoph Oelckers
0b94d4e0a3 - scriptified the bridge things, except the Destroy method which still requires work to allow virtually calling this. 2017-01-12 19:55:25 +01:00
Christoph Oelckers
ea163f3898 - exported FCheckPosition to the VM and completed the parameter lists for Actor.CheckPosition and Actor.TryMove. 2017-01-12 00:26:16 +01:00
Christoph Oelckers
5ef9429ae4 - added the ability to attach a constructor or destructor to an internally defined struct.
There are a few which require explicit native construction or destruction that need to be exported to the VM, e.g. FCheckPosition.
The VM cannot handle this directly, it needs two special functions to be attached to handle such elements.
2017-01-11 23:46:03 +01:00
Christoph Oelckers
de4153ceaf some groundwork for the implementation of dynamic arrays
- created script exports for all relevant functions with all integral types.
- created script side definitions for the underlying data types.
- added a void pointer type so that the prototype for the pointer array can use a generic type every pointer can be assigned to.
2017-01-11 00:57:31 +01:00
Christoph Oelckers
3e4f799bbc - made Actor.DamageMobj virtual. 2017-01-10 21:31:52 +01:00
Christoph Oelckers
3f94a15cfe - added a virtual PostSpawn method to RandomSpawner, this will get called when the actor has been spawned so that the spawner can do some special setup with it. 2017-01-10 20:14:48 +01:00
Christoph Oelckers
06c97d898b - added a new parameter to A_CustomRailgun to customize the inaccuracy induced by a moving target. 2017-01-10 20:08:23 +01:00
Christoph Oelckers
3696d34806 - added IF_NOSCREENBLINK flag, see http://mantis.zdoom.org/view.php?id=9 2017-01-10 19:57:51 +01:00
Christoph Oelckers
f78927500e - exported all meaningful parts of side_t to the VM. 2017-01-08 21:42:26 +01:00
Christoph Oelckers
7a5171a2e9 - fixed: The check for virtual function overrides was never done if the overriding function had no qualifier at all.
- fixed several occurences where an 'override' qualifier was missing.
2017-01-08 19:07:26 +01:00
Christoph Oelckers
abdfb8788b - fixed bad variable assignment in Heresiarch. 2017-01-08 18:53:02 +01:00
Christoph Oelckers
1c74faea73 - exported line_t's functions to the VM. 2017-01-08 15:45:37 +01:00
Christoph Oelckers
cb89a1a81a - fixed inconsistent use of line_t::portaltransferred.
Some parts used 0 as 'nothing' others used UINT_MAX. 0 should refer to the map's default sky, not to nothing.
2017-01-08 14:59:31 +01:00
Christoph Oelckers
3beed216dd - exported all relevant functions from sector_t.
Please note that currently most of these have little use, they are for future feature support.
2017-01-08 00:50:40 +01:00
Christoph Oelckers
82adc5bf1e - exported secplane_t to scripting. 2017-01-07 21:29:43 +01:00
Christoph Oelckers
b11c8fef57 - renamed a few variables for clarity. 2017-01-06 11:56:17 +01:00
Christoph Oelckers
3b7eb849a7 - fixed: The default minimum and maximum distances for A_Teleport were swapped. 2017-01-04 23:56:41 +01:00
Christoph Oelckers
b132782c49 - scriptified PowerBuddha and PowerFrightener. 2017-01-03 21:03:05 +01:00
Christoph Oelckers
15f30886cd - scriptified the TimeFreezer powerup. 2017-01-03 20:06:20 +01:00
Christoph Oelckers
bf09a89b5d - fixed typo in A_BrainSpit. 2017-01-02 23:26:19 +01:00
Christoph Oelckers
1a16f664e4 - added a TStaticArray class that allows safe access to resizable static data (like the sectors, linedefs, etc.) for the VM.
- used this to replace the line list in Sector because that gets already used and implemented proper bounds checks for this type of array.
2017-01-02 21:40:52 +01:00
Christoph Oelckers
9948189193 - scriptified PowerProtection and PowerDamage.
- made ModifyDamage calls iterative instead of recursive. With going through the VM they'd be too costly otherwise.
- small optimization: Detect empty VM functions right when entering the VM and shortcut them. This is to reduce the overhead of virtual placeholders, which in a few cases (e.g. CanCollideWith and ModifyDamage) can be called quite frequently.
2017-01-01 23:11:48 +01:00
Christoph Oelckers
66cc68606f - scriptified the methods of APowerMorph.
- made some changes to PowerMorph to better deal with recursive calls from UndoPlayerMorph. The flag hackery was only needed because the 'alternative' pointers were cleared far too late.
2017-01-01 19:23:43 +01:00
Christoph Oelckers
80effbb547 - fixed: A_M_Refire's 'ignoremissile' parameter lost its default value. 2017-01-01 15:41:40 +01:00
Christoph Oelckers
3d61d2c1f4 - reviewd script code for spawn calls that did not check their results.
Nothing should ever assume that spawning an actor is unconditionally successful. There can always be some edge cases where this is not the case.
2016-12-31 15:40:51 +01:00
Christoph Oelckers
267b1842b4 - scriptified a few more of the simpler powerups. 2016-12-31 01:08:09 +01:00
Christoph Oelckers
3b524cbed4 - scriptified PowerInfiniteAmmo to test the exported functions. 2016-12-31 00:20:02 +01:00
Christoph Oelckers
fe0f19e1e0 - exported Powerup.InitEffect and EndEffect to scripting. 2016-12-30 23:32:43 +01:00
Christoph Oelckers
11bea8249a . added SetMusicVolume script function. 2016-12-28 21:41:06 +01:00
Christoph Oelckers
c82189a3d1 fixed: A_JabDagger called S_Sound instead of A_PlaySound. 2016-12-28 18:20:41 +01:00
Christoph Oelckers
8708c69f83 - added GetClassName script function. 2016-12-27 19:25:55 +01:00
Christoph Oelckers
f5883d3f86 - fixed: DynamicLight needs a render radius of -1 so that it gets excluded from the touching_renderlist. 2016-12-26 12:04:03 +01:00
Christoph Oelckers
19856d6ccb Merge branch 'master' of https://github.com/rheit/zdoom 2016-12-25 22:56:35 +01:00
Christoph Oelckers
89b7cf4262 - fixed: RenderRadius needs to be serialized.
- fixed: CustomBridge can be visible so it shouldn't be completely excluded from the render lists.
2016-12-25 14:35:35 +01:00
ZZYZX
38cb7aeaaa Invisible and Custom bridges now have RenderRadius -1 to prevent excessive linking 2016-12-25 13:43:32 +02:00
ZZYZX
44c19b5ad9 Changed zero RenderRadius logic - negative values now used for 'no rendering', restored old logic with max(radius, renderradius) 2016-12-25 13:40:21 +02:00
ZZYZX
fcd8a0ce92 Reverted STYLE_None change to P_LinkRenderSectors, implemented zero RenderRadius that effectively disables rendering of an actor entirely 2016-12-25 13:35:03 +02:00
ZZYZX
87b23d160b Ported RenderRadius and related code from gzdoom branch 2016-12-25 13:09:32 +02:00
Christoph Oelckers
287974968a - renamed A_FireCustomMissile and added a deprecated compatibility wrapper to deal with the inverted pitch this function used. 2016-12-24 16:34:45 +01:00
Christoph Oelckers
d4c0ee9e43 - address bad use of pitch in A_CustomMissile.
This function calculated everything correctly but ultimately set the vertical velocity wrong. Most importantly this meant that the actual velocity vector and actor pitch - if CMF_SAVEPITCH was used - did not match.
Since this bug has been present since the pitch parameter was added, this deprecates A_CustomMissile and replaces it with a properly implemented A_SpawnProjectile function and handling the compatibility case with a new flag and a scripted wrapper function.
All internal uses of A_CustomMissile have been replaced as well.
2016-12-24 14:46:34 +01:00
Christoph Oelckers
4fcf9933f0 - copy target to a local variable in A_VileAttack so that it remains accessible if A_Explode destroys the actor. 2016-12-23 16:34:02 +01:00
Christoph Oelckers
3b823fa3eb Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts:
#	wadsrc/static/compatibility.txt
2016-12-22 11:29:44 +01:00
Major Cooke
1bcebb091a Added option to check the location for resizing, changing the return into a bool. 2016-12-18 11:59:24 +01:00