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

Function aEmitSparksFromGunpoint

scripts/Merc02.cpp:1044–1054  ·  view source on GitHub ↗

$$ACTION Custom Emit [f:Number=20.0] sparks from [o:Object] at [i:Gunpoint] aEmitSparksFromGunpoint 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 Gunpoint: the gunpoint $$END */

Source from the content-addressed store, hash-verified

1042$$END
1043*/
1044void aEmitSparksFromGunpoint(float num_sparks, int objhandle, int gunpoint) {
1045 int room;
1046 vector pos;
1047
1048 if (!qObjExists(objhandle))
1049 return;
1050
1051 Obj_GetGunPos(objhandle, gunpoint, &pos);
1052 Obj_Value(objhandle, VF_GET, OBJV_I_ROOMNUM, &room);
1053 Game_CreateRandomSparks((int)num_sparks, &pos, room);
1054}
1055
1056/*
1057$$ACTION

Callers 1

CallEventMethod · 0.70

Calls 4

qObjExistsFunction · 0.85
Obj_GetGunPosFunction · 0.85
Obj_ValueFunction · 0.85
Game_CreateRandomSparksFunction · 0.85

Tested by

no test coverage detected