Commit a16be86
authored
Actually grab the object's type when doing type checks. (#4505)
PR #4500 added some checks, but accidentally compared `aip->target_objnum` to an object type (although the assertion message correctly retrieved the object type, leading to the bizarre assertion that `OBJ_SHIP`, i.e. 1, was an invalid target object type). This commit makes them all access the `Objects[]` array and retrieve the `.type`, just as the assertion message does (and the pre-#4500 conditional did).
Related to #4504, in that it's the source of the failed assertions, although I can't be sure it was the cause of the crashes without testing.1 parent de80c25 commit a16be86
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10022 | 10022 | | |
10023 | 10023 | | |
10024 | 10024 | | |
10025 | | - | |
| 10025 | + | |
10026 | 10026 | | |
10027 | 10027 | | |
10028 | 10028 | | |
10029 | | - | |
| 10029 | + | |
10030 | 10030 | | |
10031 | 10031 | | |
10032 | 10032 | | |
| |||
0 commit comments