Baezon
bf4cc21951
v1
2020-09-08 03:05:42 -04:00
Goober5000
a710aac4d4
Merge pull request #2593 from JohnAFernandez/Fix-Broken-Could-Be-Player_AI
...
Change MP Initial Player Wing Ship Behavior to Match SP
2020-08-30 22:01:53 -04:00
asarium
2303785717
Improve scripting hook variable system
...
The previous system was kind of hacky and made things a bit inflexible.
This improves that system quite a bit and also adds unit tests for the
hook variable functionality.
2020-08-29 10:27:41 +02:00
JohnAFernandez
cb048132cf
Change MP Initial Ship Behavior to Match SP
2020-07-27 13:18:06 -04:00
Goober5000
6354e5d2ce
add non-sexp.cpp (and minimal sexp.cpp changes) from overhaul wip
2020-06-01 21:14:10 -04:00
Goober5000
52be12f262
tweak
2020-05-30 01:19:46 -04:00
Goober5000
a039b41c3b
use get_operator_* optimizations
...
Awhile back, the get_operator_const and get_operator_index functions were enhanced to cache the result of the operator lookup. But this only works when called on the node itself, not the text. So let's call these functions on the node whenever possible.
2020-05-30 00:58:29 -04:00
Goober5000
539662fd28
Merge pull request #2402 from Goober5000/sexp_data_caching
...
SEXP data caching
2020-05-21 10:45:04 -04:00
Goober5000
9923c87bc1
cache ships, numeric literals, and variables
2020-05-19 13:48:47 -04:00
Goober5000
067b250be9
make Goal_target_names dynamic
...
If ever there were more than 100 goal targets in a mission, the old version of ai_get_goal_target_name would start corrupting memory. Rather than making a hacky workaround, this just makes it dynamic.
2020-05-19 13:48:06 -04:00
Goober5000
1ef90d79c4
Apply suggestions from code review
...
some comment tweaks
2020-05-13 20:15:36 -04:00
wookieejedi
5df12322e5
Incorporate feedback
2020-05-11 18:05:21 -04:00
wookieejedi
280ff2d4f0
Incorporate feedback
2020-05-08 22:40:58 -04:00
wookieejedi
c2820f10c8
Updates and fixes multiple warp out related code
2020-05-08 09:53:32 -04:00
Goober5000
90c6c91e4f
add newlines to mprintf and nprintf
2020-03-02 00:51:58 -05:00
wookieejedi
ea021c6fe3
Add On Goals Cleared Scripting Hook
...
Adds 'On Goals Cleared' hook variable for scripting system. Previosly there was not scripting or sexp method to determine if a ship had all of it's goals cleared.
2019-11-25 21:12:40 -05:00
Goober5000
28ce16ba6b
make goal-achievable dependent on actual status of subsystem
2019-11-07 19:19:51 -05:00
Goober5000
a98fd2cb54
use the new 'mission_check_ship_yet_to_arrive' function when appropriate
2019-06-24 02:11:35 -04:00
niffiwan
760b601a95
Null wp_list on setting order, same as for sexps
...
Making wp_list null lets ai_mission_goal_achievable reset the waypoints
list correctly, otherwise it thinks the waypoints are ok when in fact
something has invalidated them
2019-05-06 18:30:38 +10:00
CasparKielwein
df7c91f3e7
remove some unused functions in ai code.
...
There is a lot of dead code left, but my IDE failds on the 15k file.
2018-12-22 20:10:56 +01:00
Goober5000
c667668c17
don't override play-dead goals
2018-09-27 01:33:44 -04:00
Goober5000
8d4643bc7a
add ai-play-dead-persistent
...
This adds a new AI goal which is equivalent to play-dead except that it "sticks". It doesn't clear the goal list
so it will continue playing dead until the goal is removed or another goal with a higher priority is added.
2018-09-27 00:48:57 -04:00
Jenna Trassa
bf37a36e89
strings.tbl translation adjustments
2018-07-14 14:18:52 +02:00
asarium
eeed22b91a
Enable misc-unused-parameters
...
clang-tidy was used for fixing the warnings. It is not clear if this is
actually an improvement so this may still be disabled later.
2018-04-25 11:57:55 +02:00
asarium
e28ebc2a6c
Enable and fix misc-suspicious-string-compare check
2018-04-25 11:13:19 +02:00
Fabian Woltermann
47bd990bca
Handle ships removed from play via ship-vanish correctly in ai goal processing.
2017-06-05 15:00:10 +02:00
Goober5000
03418796ab
missed this flag conversion
2016-09-05 02:51:50 -04:00
Goober5000
b93a3902dc
the actual guts of the chase-ship-class goal
2016-09-05 02:35:24 -04:00
Goober5000
c14af70287
all the goal infrastructure for chase-ship-class except for the actual chase logic
2016-09-05 02:35:23 -04:00
Fabian Woltermann
d53074c9ea
Merge pull request #931 from Goober5000/minor_aicode_tweaks
...
minor tweaks and adjustments to AI goal code
2016-09-05 08:17:13 +02:00
Goober5000
1d3ff1b6c0
minor tweaks and adjustments to AI goal code
...
A few things I noticed while working on ai-chase-ship-class, split out into a separate PR. Some code is reordered, some is cleaned up; nothing too extensive. The most notable changes are a) the modification of the Ai_goal_text function to work on the AI_GOAL_X #define directly rather than unnecessarily calculate the bit; b) changing the HUD text of "fly to ship" to "rendezvous with" plus the ship name; c) adding a Warning in ai_update_goal_references; and d) changing ship_name to target_name in ship_return_orders for clarity
2016-09-02 23:25:46 -04:00
Fabian Woltermann
99a59efdbf
AI Goal flags converted
2016-08-31 15:30:49 +02:00
Fabian Woltermann
add8662737
Converts AI Info flags
2016-08-22 16:39:42 +02:00
Fabian Woltermann
98f72f9378
Finishes converting the remaining ship-related flags ( #843 )
2016-08-17 05:49:40 -07:00
Fabian Woltermann
770fce8de5
Bitset flags -- take 2 ( #775 )
...
This introduces a new mechanism for handling bit flags. Instead of using an int (or two, or three) to write bits into, this uses the std::bitset in a wrapper class that accepts an enum class as input. This means that certain classes of errors we've had a few of in the engine, where a coder used the wrong set of flags or checked them against the wrong variable (SF_STEALTH vs SIF_STEALTH, for example) can now be detected at a compiler level rather than not at all.
2016-08-12 16:13:50 -07:00
Goober5000
bd3cd7eb18
Merge pull request #195 from Echelon9/fix/sort-uniq-includes
...
Review and refactor #include's
2015-08-19 00:05:02 -04:00
Echelon9
8051bac868
Fix: ai/aigoals.cpp:203:48: warning: declaration of ‘ai_goal’ shadows a global declaration [-Wshadow]
2015-07-06 22:15:18 +10:00
Echelon9
b38e153861
Remove redundant parameter to prioritize_goals().
2015-07-01 23:07:17 +10:00
Echelon9
c5493bb480
Scripted sort and uniq on (internal) project includes. Improves search time and as a by product removed a number of duplicative includes.
2015-06-22 20:24:30 +10:00
asarium
e9b9797b6e
Fix usage of negative index
...
I have no idea why this didn't cause any issues earlier...
2015-05-03 21:27:23 +02:00
niffiwan
471cf4c988
Fix Coverity 1093565: Negative array index read
...
Add an assertion to catch any callers that haven't correctly set
the target_name. Also fix a minor typo in the comments
2015-05-03 20:31:16 +10:00
Goober5000
93c7775109
stupid missing parenthesis >.>
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11098 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-04 13:45:44 +10:00
Goober5000
e15cd38a88
Between the Ashes HPC request: extend ai-chase-same-team to ai-disarm, ai-disable, and ai-destroy-subsys too
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11097 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-04 13:45:44 +10:00
Goober5000
f7e3bef9b7
Between the Ashes HPC request: allow ships to attack others on the same team
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11094 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-04 13:45:43 +10:00
Goober5000
df73bacb9e
Mantis #3004 : standardize checks for whether ships can depart to docking bays, and whether departure goals are achievable, and whether a ship can be commanded to depart; also fix the default behavior if a ship attempts to warp out but is unable to
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10428 387891d4-d844-0410-90c0-e4c51a9137d3
2014-02-20 18:27:34 +10:00
Goober5000
4bd10888ff
make localization more robust with additional checks on string length, more consting, and stronger typing and make XSTR const, since we don't want to modify the strings it translates and then CONST ALL THE THINGS
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9809 387891d4-d844-0410-90c0-e4c51a9137d3
2013-09-26 18:51:34 +10:00
Echelon9
fb33fe020b
Resolve a series of Xcode (LLVM compiler) warnings
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9735 387891d4-d844-0410-90c0-e4c51a9137d3
2013-08-06 22:55:14 +10:00
Goober5000
107a61ea13
for Mantis #2097 , straighten out the departure code so that goals to warp cause warping, and comm departures use whatever departure method is specified
2013-01-13 03:03:25 +00:00
Goober5000
91d30c608a
fix an old Volition bug -- properly mark a goal as not achievable if a ship departs, not only if it's destroyed
...
and throw in self-destructed for good measure, per Admiral MS
2012-10-29 20:48:06 +00:00
Goober5000
1adc301bde
prevent ships with mismatched models and tables from causing crashes later on (Mantis #2689 )
2012-07-15 22:54:47 +00:00