Commit fd2ebaf
allow -1 sound index in OPF_GAME_SND syntax check (#7540)
The numeric branch of the OPF_GAME_SND check in check_sexp_syntax never
actually ran until the type2 variable-overload bug was fixed, so missions
using a sound index of -1 ("no sound" / "default") loaded fine. Now that
the check is live, explicitly allow -1, which the runtime already treats as
an invalid (unset) sound. Also return the more descriptive
SEXP_CHECK_INVALID_GAME_SND / SEXP_CHECK_INVALID_FIREBALL error codes, and
let nested-operator (SEXP_ATOM_LIST) arguments fall through since their type
is already validated upstream.
Also route the Lua SEXP soundentry argument through sexp_get_sound_index so
it accepts a table index, an operator, or a name like the core SEXPs do,
instead of only a name.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent d5093cf commit fd2ebaf
3 files changed
Lines changed: 19 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3970 | 3970 | | |
3971 | 3971 | | |
3972 | 3972 | | |
3973 | | - | |
3974 | | - | |
3975 | | - | |
3976 | | - | |
| 3973 | + | |
| 3974 | + | |
| 3975 | + | |
| 3976 | + | |
| 3977 | + | |
3977 | 3978 | | |
3978 | 3979 | | |
3979 | 3980 | | |
3980 | | - | |
3981 | | - | |
| 3981 | + | |
| 3982 | + | |
| 3983 | + | |
| 3984 | + | |
3982 | 3985 | | |
3983 | | - | |
3984 | 3986 | | |
| 3987 | + | |
| 3988 | + | |
3985 | 3989 | | |
3986 | 3990 | | |
3987 | 3991 | | |
3988 | 3992 | | |
3989 | 3993 | | |
3990 | 3994 | | |
3991 | 3995 | | |
3992 | | - | |
3993 | | - | |
3994 | | - | |
| 3996 | + | |
3995 | 3997 | | |
3996 | 3998 | | |
3997 | 3999 | | |
3998 | 4000 | | |
3999 | | - | |
4000 | 4001 | | |
4001 | | - | |
4002 | 4002 | | |
| 4003 | + | |
| 4004 | + | |
4003 | 4005 | | |
4004 | 4006 | | |
4005 | 4007 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
1481 | 1482 | | |
1482 | 1483 | | |
1483 | 1484 | | |
| 1485 | + | |
1484 | 1486 | | |
1485 | 1487 | | |
1486 | 1488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
266 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
267 | 268 | | |
268 | 269 | | |
269 | 270 | | |
| |||
0 commit comments