MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / AssignScriptsForLevel

Function AssignScriptsForLevel

Descent3/ObjScript.cpp:164–178  ·  view source on GitHub ↗

We assign all the scripts needed for the level right here.

Source from the content-addressed store, hash-verified

162
163// We assign all the scripts needed for the level right here.
164void AssignScriptsForLevel() {
165 int i;
166
167 // Initialize scripts for the objects
168 for (i = 0; i <= Highest_object_index; i++) {
169 if (Objects[i].type != OBJ_NONE && Objects[i].osiris_script == NULL) {
170 InitObjectScripts(&Objects[i]);
171 }
172 }
173
174 // Initialize scripts for the triggers
175 for (i = 0; i < Num_triggers; i++) {
176 InitTriggerScript(&Triggers[i]);
177 }
178}
179
180// free scripts for a level
181void FreeScriptsForLevel() {

Callers 1

InitLevelScriptFunction · 0.85

Calls 2

InitObjectScriptsFunction · 0.85
InitTriggerScriptFunction · 0.85

Tested by

no test coverage detected