Skip to content

Commit

Permalink
Merge pull request scp-fs2open#6023 from Goober5000/preload_weapon_cr…
Browse files Browse the repository at this point in the history
…eate

add weapon preloader
  • Loading branch information
Goober5000 authored Mar 21, 2024
2 parents 0a86623 + d5f3be0 commit a9ad87e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions code/parse/sexp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4722,6 +4722,20 @@ int get_sexp()
do_preload_for_arguments(preload_turret_change_weapon, n, arg_handler);
break;

case OP_WEAPON_CREATE:
// weapon class is argument #2
n = CDDR(start);
// just as with change-ship-class/ship-create, we can use the turret-change-weapon preloader for weapon-create
do_preload_for_arguments(preload_turret_change_weapon, n, arg_handler);
break;

case OP_BEAM_FLOATING_FIRE:
// beam weapon class is argument #1
n = CDR(start);
// see above for weapon-create
do_preload_for_arguments(preload_turret_change_weapon, n, arg_handler);
break;

case OP_CHANGE_BACKGROUND:
n = CDR(start);
do_preload_for_arguments(stars_preload_background, n, arg_handler);
Expand Down

0 comments on commit a9ad87e

Please sign in to comment.