Commit Graph

16 Commits

Author SHA1 Message Date
Ryan Dwyer 4c99495ccb Optimise chr bdlist handling 2023-05-12 21:36:37 +10:00
Ryan Dwyer dc04fbc16a Fix crash when a guard spawns at a pad 2023-05-11 20:56:10 +10:00
Ryan Dwyer a9d0a1e02d ai2asm: Implement some commands in assembly if using CHR_SELF 2023-05-11 19:57:08 +10:00
Ryan Dwyer c24afbddb8 ai2asm: Store current chr in s0 instead of repeatedly loading it from g_Vars.chrdata 2023-05-11 17:20:15 +10:00
Ryan Dwyer 6edc8681da Remove a heap of one-liner functions 2023-05-10 21:24:17 +10:00
Ryan Dwyer d16ea9cef0 Make functions static where possible 2023-05-08 21:17:21 +10:00
Ryan Dwyer 86feae85c1 Remove unused global variables 2023-05-06 22:28:50 +10:00
Ryan Dwyer 6181870b38 Refactor objective checks
* Use a dirty flag so statuses can be recalculated only when they might have changed
* Remove support for unused criteria types
* Re-ID the status constants so the objective status can be the minimum of the criteria statuses
* Merge multiple complete flags into one criteria item
* Merge multiple fail flags into one criteria item
* Use a g_AnyObjectiveFailed variable so the objectives failed AI doesn't have to iterate them
2022-11-17 17:36:19 +10:00
Ryan Dwyer d8137e2d6b Improve dangerous props code 2022-11-16 23:16:07 +10:00
Ryan Dwyer 4c56b65341 Fix wrong lines being spoken in some places 2022-11-12 19:47:11 +10:00
Ryan Dwyer d8c278364a Remove unused functions 2022-11-12 10:01:28 +10:00
Ryan Dwyer ba0eb5b656 Fix Defection programmer 2022-11-06 21:36:29 +10:00
Ryan Dwyer aabec4d103 Allow 1xxx ailists to be completely terminated 2022-11-03 08:28:36 +10:00
Ryan Dwyer 4632c3113f Improve logic for objectives failed HUD message
* Roll up all the objective failed commands into a new "any objective failed" one
* Remove wasteful looping logic from ailist
* Use existing statuses array instead of recalculating every objective on every frame
2022-11-02 21:40:23 +10:00
Ryan Dwyer 2c0b5711c1 Pass ailist pointers around instead of ailist IDs to avoid runtime bisection 2022-11-02 20:38:01 +10:00
Ryan Dwyer 7841b59eef Introduce ai2asm 2022-11-02 17:35:19 +10:00