Commit graph

26 commits

Author SHA1 Message Date
MajorCooke
eaba63e13b
View Angles (Part 1 - Redux) (#1002)
* Added ViewAngle/Pitch/Roll properties to actors.

- These are offsets for camera angles that allow turning the camera without affecting aim or movement direction.
- Added A_SetView<Angle/Pitch/Roll>, which will set the view direction.
- Added ABSVIEWANGLES flag, used to make the view absolute instead of an offset.

* Converted functions to be direct-native.
2020-08-27 13:03:06 -04:00
MajorCooke
85759e3bd0
Added A_SpriteOffset. (#895)
- Coordinates work akin to A_OverlayOffset: +X shifts to the right, +Y shifts down.
2020-08-27 12:43:09 -04:00
Alexander Kromm
928c738e19 make various getter and pure-math methods clearscope, and where applicable, const
Original PR: https://github.com/coelckers/gzdoom/pull/532

Status of the original PR

1. Actor
- [already in] deltaangle
- [already in] absangle
- [already in] AngleToVector
- [already in] RotateVector
- [already in] Normalize180
- [already in] BobSin
- [already in] GetDefaultSpeed
- [this PR] GetBobOffset
- [this PR] InStateSequence
- [already in] FindState
- [already in] GetDropItems
- [this PR] DistanceBySpeed
- [this PR] AccuracyFactor
- [not in original PR, for PlayerInfo.isTotallyFrozen] isFrozen

2. PlayerInfo
- [this PR] GetUserName
- [this PR] GetColor
- [this PR] GetDisplayColor
- [this PR] GetColorSet
- [this PR] GetPlayerClassNum
- [this PR] GetSkin
- [this PR] GetNeverSwitch
- [this PR] GetGender
- [this PR] GetTeam
- [this PR] GetAutoaim
- [this PR] GetNoAutostartMap
- [this PR] GetClassicFlight
- [this PR] IsTotallyFrozen

3. C++ methods, to match ZScript:

- [scriptified] AActor::AccuracyFactor() to Actor.AccuracyFactor
- [this PR] AActor::DistanceBySpeed(AActor *, double) — it is a combination of getter and pure math
- [this PR] AActor::Distance2D(AActor *, bool) — called by DistanceBySpeed
- [this PR] AActor::Distance2D(AActor *, double, double, bool) — called by DistanceBySpeed
- [not in original PR, for PlayerInfo.isTotallyFrozen] AActor::isFrozen
2020-06-07 09:39:30 +02:00
Mekboss
4807f4240b Fix MSVS compile bug and add offset parameter for SprayDecal 2020-05-07 09:35:48 +02:00
Mekboss
0e9ca3c850 Replace function variables to DVector3 2020-05-07 09:35:48 +02:00
Mekboss
ba43244764 Add optional direction parameters for SprayDecal and its A_SprayDecal zscript counterpart 2020-05-07 09:35:48 +02:00
Cacodemon345
4b4ff8dd0e
Fix bouncing missiles not dealing damage when hitting top/bottom (#1068)
* Fix bouncing missiles not dealing damage when hitting top/bottom
2020-04-30 08:55:09 +02:00
Christoph Oelckers
4fb6b7c7d4 - block off the Substitute function by making it private to the 3 classes that really need it. 2020-04-19 21:08:24 +02:00
Major Cooke
a56177f178 Begin TICRATE conversion.
- Moved TICRATE from Thinker to Object in ZScript so status bars have access to it.
2020-04-12 22:43:33 +02:00
nashmuhandes
cb6514cc05 Added Actor.CopyBloodColor to copy another existing actor's blood color. 2020-03-23 21:04:59 +01:00
nashmuhandes
7a141f3aa3 Add help messages for most of the deprecated stuff in ZScript. 2020-03-14 12:56:03 +02:00
alexey.lysiuk
f46e80e2b4 - fixed FLineTraceData scripting definition
https://forum.zdoom.org/viewtopic.php?t=67795
2020-03-14 12:51:06 +02:00
Rachael Alexanderson
3d3a29979b - remove addition from deprecated A_PlaySound 2020-03-02 22:15:37 +01:00
Rachael Alexanderson
1b80b7bf2f - ported over Nash's startTime for A_StartSound 2020-03-02 22:15:37 +01:00
Major Cooke
4cf7c6351d Added A_StopSounds(int chanmin, int chanmax).
- If both channels are 0, completely silences the actor.
- Adapted A_StopAllSounds to call A_StopSounds(0,0);
2020-03-01 19:42:21 +01:00
Major Cooke
55284d46bf Added A_StopAllSounds. 2020-02-29 19:19:51 +01:00
Christoph Oelckers
4a67bfcddb - deprecated A_PlaySound for real and transitoned the internal scripts to A_StartSound 2020-01-04 14:25:55 +01:00
Christoph Oelckers
b7e1a35e6f - cleaned up the parameters of A_StartSound.
There were two booleans that could be merged into the flag word.
This also fixes a bug with CHAN_NOSTOP not working for local sounds because it checked the wrong sound source for the playing sound.
2020-01-04 14:25:55 +01:00
Christoph Oelckers
136ab4f48a - renamed IsActorPlayingSomething to IsActorPlayingSound and made it clearscope. 2019-12-17 09:58:50 +01:00
Christoph Oelckers
e82565373f - separated the channel number from the flags in the sound interface so that the 8 channel limit can be eliminated.
- added Marisa Kirisame's CHAN_OVERLAP flag.
- exported S_IsActorPlayingSomething to ZScript.

The sound API change required deprecating A_PlaySound and S_Sound. There are now new variants S_StartSound and A_StartSound which have two distinct parameters for channel and flags.
2019-12-16 23:52:39 +01:00
Christoph Oelckers
b9582cc98e - continued refactoring on sound code.
The game independent part of the code has been mostly isolated.
2019-12-08 21:22:53 +01:00
Major Cooke
15eabfd055 Added A_SoundPitch and an optional pitch parameter to A_PlaySound and S_Sound.
- Note: Because sound channels are not in zscript, there's no way to modify a sound made by S_Sound.
2019-07-24 20:15:24 +02:00
Christoph Oelckers
8b4d85f0d7 - tested and fixed the attachable lights. 2019-07-07 09:50:02 +02:00
Christoph Oelckers
1dcbe43d95 - User definable dynamic lights
This hasn't been tested yet!
2019-06-28 12:35:42 +02:00
Major Cooke
6327734659 Added CanTouchItem virtual.
- Allows an actor with +PICKUP flag to determine if it can pick up specific items or not.
2019-03-04 13:15:27 +01:00
Christoph Oelckers
b542d1371d - reorganized the ZScript content in gzdoom.pk3 and changed the files' extensions to something unique for easier syntax highlighting. 2019-02-23 12:08:27 +01:00
Renamed from wadsrc/static/zscript/actor.txt (Browse further)