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

Function aEmitSparks

scripts/Merc02.cpp:1018–1028  ·  view source on GitHub ↗

$$ACTION Custom Emit [f:Number=20.0] sparks from [o:Object] aEmitSparks Make object spark Makes an object emit sparks Parameters: Number: the number of sparks to create Object: the object to make sparks come out of $$END */

Source from the content-addressed store, hash-verified

1016$$END
1017*/
1018void aEmitSparks(float num_sparks, int objhandle) {
1019 int room;
1020 vector pos;
1021
1022 if (!qObjExists(objhandle))
1023 return;
1024
1025 Obj_Value(objhandle, VF_GET, OBJV_V_POS, &pos);
1026 Obj_Value(objhandle, VF_GET, OBJV_I_ROOMNUM, &room);
1027 Game_CreateRandomSparks((int)num_sparks, &pos, room);
1028}
1029
1030/*
1031$$ACTION

Callers 1

CallEventMethod · 0.70

Calls 3

qObjExistsFunction · 0.85
Obj_ValueFunction · 0.85
Game_CreateRandomSparksFunction · 0.85

Tested by

no test coverage detected