asarium
1588644fec
Add variables concept to expressions
...
This also includes the necessary setup work for using "position" and
"direction" in action expressions.
2021-01-10 22:47:49 +01:00
asarium
0abd592038
Rework actions to use definitions
...
This introduces action definitions which can then be instantiated to
form actual actions with expressions as their parameters.
2021-01-10 12:22:00 +01:00
asarium
909e799bdd
Allow implicit conversion from int to float
...
This is generally a safe operation and will make the system a bit easier
to use.
2021-01-07 21:36:28 +01:00
asarium
5a9f181aff
Rework function handling
2021-01-07 13:34:10 +01:00
asarium
b0ba22a43d
Add Action expressions
...
This is a parser for a very simple language to allow for execution of
dynamic expressions with return values for use as action parameters. The
only "dynamic" part this currently supports are random ranges but more
features are planned for the future.
2021-01-06 19:13:12 +01:00
asarium
059e149590
Add dynamic action programming system
...
This system adds the code necessary for letting content creators specify
complex events by specifying a simple, program-like sequence of
operations that will be executed by the engine when a certain event is
triggered.
2021-01-05 18:26:10 +01:00
Goober5000
bdccb25b6e
Merge pull request #3083 from Baezon/comment-delta-ang
...
Improve comment on vm_vec_delta_ang
2021-01-04 23:06:27 -05:00
Baezon
fc7e1f0e40
improve comment on delta_ang
2021-01-03 22:51:17 -05:00
JohnAFernandez
ecf2dfb8f9
Update Comments for #548
2021-01-03 22:28:18 -05:00
Goober5000
b0fbf93055
fix model_update_instance to handle LODs
...
Add back the copying of model instance information to submodels in other LODs. This was inadvertently removed in commit 88c1d8a02a .
2021-01-02 14:26:59 -05:00
Goober5000
2d942989e6
Merge pull request #3075 from JohnAFernandez/Fixing-Small-Fred-Mission_Save-Bug
...
Keep fred from adding extra texture replacements to mission file
2021-01-02 02:47:35 -05:00
Goober5000
1fcfa82184
Merge pull request #3072 from JohnAFernandez/Add-Starting-Amoo-to-Scripting-Functions
...
Make sure that scripting changes the starting ammo as well as the weapon
2021-01-02 02:09:27 -05:00
JohnAFernandez
c7ea110652
Remove whitespace change
2021-01-02 01:41:15 -05:00
JohnAFernandez
8a81b18200
Keep fred from adding extra texture replacements to mission file
2021-01-02 01:37:37 -05:00
Goober5000
4182ea7fae
fix a couple of issues
...
Prevent model instances from being overridden when they conflict with the model. Fixes #3062 .
Also fixes another spot that might be a problem.
2021-01-02 01:08:54 -05:00
JohnAFernandez
04f668651b
Make sure that scripting changes the starting ammo as well as the weapon
2021-01-01 22:22:56 -05:00
JohnAFernandez
521430fb9a
Fix the support ship refilling ships to the wrong secondary capacity
2020-12-30 23:37:49 -05:00
Goober5000
3108b2f117
Merge pull request #3058 from Goober5000/weaponspew_fixes
...
weaponspew fixes
2020-12-30 11:02:00 -05:00
JohnAFernandez
a764b3463c
Warn the User About a Probable Incoming crash ( #3011 )
...
If SDL completely fails to get its preference path, at least warn the user so that it doesn't crash straight to the desktop without creating a debug build.
2020-12-30 10:37:58 -05:00
Goober5000
9f8fe77956
weaponspew fixes
...
Add calculations for the `puncture` flag, and handle beam damage factors appropriately.
Fixes #3044 .
2020-12-30 01:10:31 -05:00
Goober5000
cda9967d9c
add vecmat function
2020-12-30 00:35:22 -05:00
Goober5000
7a09a3d0c4
some bugfixes from the submodel rotation branch
...
Some things that clang noticed, plus a small usability improvement to the parsing of vectors in submodel properties.
2020-12-30 00:31:58 -05:00
JohnAFernandez
573db31ba5
Set target name in ai goals to avoid an assert ( #3041 )
2020-12-28 15:04:47 -05:00
asarium
92e5f2f35d
Apply particle source hack to correct vector
...
In the particle effect code there is a small hack required for getting
some constant pointers in a vector. However, there is another mechanism
where sources are not added to the sources vector if the sources are
currently being iterated through. That is necessary to avoid
accidentally invalidating the iterators.
The issue here was that the vector resizing hack was not applied to the
correct vector when we were currently iterating. This fixes that.
This fixes #2928 .
2020-12-28 17:58:20 +01:00
Birk Magnussen
4bc3ac8bee
More Assertions 2
2020-12-28 19:34:30 +09:00
Birk Magnussen
5b12b84c57
More Assertions
2020-12-28 19:32:05 +09:00
Birk Magnussen
f6b8e8e0ff
nulltpr
2020-12-28 19:18:58 +09:00
Birk Magnussen
66aed78dd4
Add quickfix
2020-12-28 19:16:38 +09:00
Fabian Woltermann
a5de6f8570
Merge pull request #3019 from SelfGamer/exactlos_update
...
Changed require exact los to track from the exact firing point instead of center
2020-12-28 10:16:40 +01:00
Goober5000
55b902382c
add documentation
2020-12-28 01:19:44 -05:00
Goober5000
3a5e49b0c3
Merge pull request #3021 from Goober5000/turret_refactor
...
some refactor and cleanup
2020-12-27 09:33:49 -05:00
Goober5000
aef21cbe1b
Merge pull request #3025 from JohnAFernandez/fix-nullptrs-in-turret-packet
...
Prevent Fire_turret from using null values
2020-12-27 09:16:13 -05:00
asarium
57f73ab8dc
Update deprecation version of drawMonochromeImage
...
This was 20.1 since I erronously thought that the "current" nightly
version was lower than that. This updates the version to a release that
has not been built yet.
2020-12-27 11:53:10 +01:00
JohnAFernandez
d41d397e33
Keep nullptrs from crashing the fire flak packet.
2020-12-27 01:36:10 -05:00
JohnAFernandez
b8e9b3c0ec
Prevent Fire_turret from using null values
2020-12-27 01:36:10 -05:00
MageKing17
ac86dbae2f
Fix capital+ regression in AI code for secondary weapon selection.
...
When weapon info flags were changed to the flagset model in #851 (commit 127976cd74 ), two instances where `WIF2_CAPITAL_PLUS` was either actively desired or passively not prohibited were lost in the transition; this commit restores looking for `Weapon::Info_Flags::Capital_plus` when targeting a big ship, and no longer prohibits capital+ weapons from being selected if a bomber+ weapon is sought and smart secondary weapon selection is enabled.
2020-12-26 12:45:32 -08:00
asarium
522fa1ac6a
Make model point picking more flexible
...
This works around the Windows only limitation where the standard random
function only returns up to 2^15 which limits how many vertices in the
model can be picked.
Since we already have a function that handles this properly and returns
values in the entire integer range, using that fixes that low limit.
2020-12-25 15:36:25 +01:00
Goober5000
21f6591be2
some refactor and cleanup
...
1) modify and prune some turret function definitions
2) clean up KeldorKatarn's submodel orientation parsing
2020-12-24 22:50:49 -05:00
Birk Magnussen
d1e1d79bca
make require exact los respected by primaries
2020-12-25 04:20:03 +09:00
Birk Magnussen
f0313fc68a
Fix bad assertion
2020-12-25 03:19:47 +09:00
JohnAFernandez
de7d0c79d3
Merge pull request #2214 from notimaginative/multi_packet_fixes
...
Multi packet fixes
2020-12-24 12:16:29 -05:00
Birk Magnussen
32c63963ea
Changed require exact los to track from the exact firing point instead of center
2020-12-25 00:49:09 +09:00
m!m
77adaa6d86
Merge pull request #3004 from asarium/scripting/monochromeUv
...
Add AA bitmap support for standard gr.drawImage
2020-12-24 16:14:44 +01:00
Taylor Richards
5f7b7ef702
fix issues discovered during beam test
...
- fix incorrect assertions for fighter beams
- fix subsystem handling for spawned/floating beams
2020-12-24 09:45:17 -05:00
Taylor Richards
80d68ccc27
address issues raised during code review
2020-12-24 09:45:17 -05:00
Taylor Richards
fdf3778014
bump multi version to 53
2020-12-24 09:45:17 -05:00
Taylor Richards
ff5cb3cdf8
update turret_fired_packet() and flak_fired_packet()
...
- send pitch and heading as floats
- use proper weapon id rather than guessing (fixes #2877 )
2020-12-24 09:45:07 -05:00
Taylor Richards
5d410416c9
fix issues with client_update_packet()
...
- use correct macro for player_id
- support more subsystems
- optimize size of secondary weapon info
- handle future compatibility issues with secondary ammo
2020-12-24 09:42:05 -05:00
Taylor Richards
5395cabdb3
support larger number of subsystems in various packets
...
secondary_fired_packet()
turret_fired_packet()
player_order_packet()
homing_weapon_info()
flak_fired_packet()
2020-12-24 09:41:59 -05:00
Taylor Richards
3a58940d35
update multi_capaign_*() packets
...
- add additional safety checks
- allow for USHRT_MAX ship and weapon types
- allow for USHRT_MAX mission events
- optimize storage of mission count/num (int -> ubyte)
- break campaign mission names into nice sized packets
2020-12-24 09:38:23 -05:00