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

Function aEmitSparks

scripts/merc5.cpp:740–750  ·  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

738$$END
739*/
740void aEmitSparks(float num_sparks, int objhandle) {
741 int room;
742 vector pos;
743
744 if (!qObjExists(objhandle))
745 return;
746
747 Obj_Value(objhandle, VF_GET, OBJV_V_POS, &pos);
748 Obj_Value(objhandle, VF_GET, OBJV_I_ROOMNUM, &room);
749 Game_CreateRandomSparks((int)num_sparks, &pos, room);
750}
751
752#define N_REGIONS 2
753const char *RegionList[N_REGIONS] = {"LeftLabR", "RightLabR"};

Callers 1

CallEventMethod · 0.70

Calls 3

qObjExistsFunction · 0.85
Obj_ValueFunction · 0.85
Game_CreateRandomSparksFunction · 0.85

Tested by

no test coverage detected