Commit graph

252 commits

Author SHA1 Message Date
Christoph Oelckers
652606f70b - scriptified A_Explode and relatives. 2018-11-24 19:29:52 +01:00
Christoph Oelckers
b4c272ddff - scriptified A_SpawnItem(Ex) and A_ThrowGrenade.
These were the last native functions referencing AWeapon::DepleteAmmo, so that function is now exclusively on the scripting side.
2018-11-24 17:01:12 +01:00
Christoph Oelckers
4c1b3f81ab - scriptified A_RailAttack. 2018-11-24 15:12:30 +01:00
Christoph Oelckers
5c130737c4 - scriptified A_CustomPunch 2018-11-24 14:48:30 +01:00
Christoph Oelckers
e071be8371 - scriptified A_FireBullets and A_CustomBulletAttack. 2018-11-24 13:50:27 +01:00
Christoph Oelckers
ac1bffc51b - scriptified P_MorphMonster. 2018-11-24 09:33:03 +01:00
Christoph Oelckers
16c85b532b - restored the old A_Jump prototype because DECORATE needs this to parse the arguments. 2018-11-17 21:22:18 +01:00
Christoph Oelckers
adde0510fe - deconstruct A_Jump with multiple labels into A_Jump(chance, RandomPick(label1, label2, label3,...)) to remove this ugly special case from the VM calling convention.
This also adds the number of available choices to OP_IJMP.
2018-11-17 12:35:03 +01:00
Christoph Oelckers
33fb76698b Avoid using argument count for any kind of decision making in native VM functions.
This allows retaining the functionality, even if for the JIT compiler's benefit all default arguments are pushed onto the stack instead of reading them from the defaults array.
2018-11-16 15:25:37 +01:00
Major Cooke
55f17fa90c Changed A_RaiseActor to just RaiseActor. 2018-11-13 19:01:56 +01:00
Major Cooke
71d2b39d92 Added A_RaiseActor(Actor other, int flags = 0) 2018-11-13 19:01:56 +01:00
Major Cooke
b553be153d Added CanResurrect(Actor other, bool passive)
- Works similarly to CanCollideWith.
- Passive means the caller is trying to be resurrected by 'other'.
- Non-passive means the caller is trying to resurrect 'other'.
2018-11-13 19:01:56 +01:00
ZZYZX
d85e5afdfb Destructible geometry - minor fixes and 3D floor support 2018-11-07 00:12:37 +01:00
Player701
56f76a141e - Added a function to get the actor's age in ticks. 2018-11-04 19:58:57 +01:00
Player701
a6dbfcf9c2 - Added a new field to the Actor class which stores the amount of ticks passed since the game started on the moment the actor was spawned.
- Added a function to the Actor class to get its spawn time relative to the current level.
- Added spawn time information to the output of the "info" console command.
2018-11-04 19:58:57 +01:00
Cacodemon345
b1d35eb0b3 Extend SKYEXPLODE flag for LineAttack 2018-11-03 15:24:30 +01:00
Major Cooke
6a8b0df4ba Added VelIntercept.
- Uses the same code as Thing_ProjectileIntercept to aim and move the projectile.
  - targ: The actor the caller will aim at.
  - speed: Used for calculating the new angle/pitch and adjusts the speed accordingly. Default is -1 (current speed).
  - aimpitch: If true, aims the pitch in the travelling direction. Default is true.
  - oldvel: If true, does not replace the velocity with the specified speed. Default is false.

- Split the code from Thing_ProjectileIntercept and have that function call VelIntercept.
2018-11-01 00:10:08 +01:00
ZZYZX
849d110f10 Fixed sector floor/ceiling actions not triggering in P_XYMovement 2018-11-01 00:05:43 +01:00
Marisa Kirisame
c3894ee348 Exports various resurrection-related functions to ZScript. 2018-10-04 08:59:37 -04:00
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