Skip to content

Commit

Permalink
Ensure CVARs are loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
UndeadZeratul committed Oct 17, 2023
1 parent 4851dde commit 75d9357
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions zscript/accensus/SpawnHandler.zs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ class AceCorpsWepsHandler : EventHandler {

override void checkReplacement(ReplaceEvent e) {

// Populates the main arrays if they haven't been already.
if (!cvarsAvailable) init();

// If there's nothing to replace or if the replacement is final, quit.
if (!e.replacee || e.isFinal) return;

Expand All @@ -403,6 +406,9 @@ class AceCorpsWepsHandler : EventHandler {

override void worldThingSpawned(WorldEvent e) {

// Populates the main arrays if they haven't been already.
if (!cvarsAvailable) init();

// If thing spawned doesn't exist, quit.
if (!e.thing) return;

Expand Down

0 comments on commit 75d9357

Please sign in to comment.