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

Function InitObjectScripts

Descent3/ObjScript.cpp:199–224  ·  view source on GitHub ↗

allocates and initializes the scripts for an object. robots, powerups, doors, etc.

Source from the content-addressed store, hash-verified

197// allocates and initializes the scripts for an object.
198// robots, powerups, doors, etc.
199void InitObjectScripts(object *objp, bool do_evt_created) {
200 // Bind scripts to the object
201 Osiris_BindScriptsToObject(objp);
202
203 if (do_evt_created) {
204 tOSIRISEventInfo ei;
205 if (objp->control_type == CT_AI) {
206 Osiris_CallEvent(objp, EVT_AI_INIT, &ei);
207 }
208
209 Osiris_CallEvent(objp, EVT_CREATED, &ei);
210
211 /*
212 if (Game_mode & GM_MULTI && Netgame.local_role==LR_CLIENT)
213 D3XExecScript(objp, EVT_CLIENT_CREATED, objp);
214 else
215 {
216 D3XExecScript(objp, EVT_CREATED, objp);
217 if(objp->control_type == CT_AI)
218 {
219 D3XExecScript(objp, EVT_AI_INIT, NULL, REF_OBJTYPE, NULL);
220 }
221 }
222 */
223 }
224}
225
226// frees all scripts for an object.
227void FreeObjectScripts(object *objp, bool level_end) {

Callers 13

ProcessTestKeysFunction · 0.85
AssignScriptsForLevelFunction · 0.85
osipf_ObjCreateFunction · 0.85
LGSObjectsFunction · 0.85
MultiDoObjectFunction · 0.85
MultiClearGuidebotFunction · 0.85
DoDeathSpewFunction · 0.85
DemoReadObjCreateFunction · 0.85
PlayerSpewObjectFunction · 0.85
UseMethod · 0.85

Calls 2

Osiris_CallEventFunction · 0.85

Tested by

no test coverage detected