scp-fs2open / scp-fs2open/fs2open.github.com

FRED Asserts with scripting and async calls

Open
#6,521 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
487
Forks
184
PR merge metrics
PR metrics pending

Description

I was trying to use async to essentially force a script to init after a downstream script where the file hierarchy kinda made naming for priority tricky and ran into this. Basically if you use on async call with the onFrameExecutor, it expects a game state which of course is invalid in FRED. It triggers the assert in `gamesequence.cpp` on line 437 because FRED is not in a game state.

I don't know a whole lot about the async code so I didn't try anything really but I'm wondering if we could either create a GS_STATE_FRED = -1 enumeration for the game states or perhaps if `Fred_running` at line 437, return some kind of preset value since FRED can't really have other states. I'm not sure if there's other places the onFrameExecutor might break down in FRED, though.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.