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

Function aTurnOnSpew

scripts/DallasFuncs.cpp:2259–2282  ·  view source on GitHub ↗

$$ACTION Spew Turn ON spew from [o:Object] at gunpoint [i:GunNum];[e:SpewType=7],[f:Mass=0.0],[f:Drag=0.0],[g:PhysicsFlags=65536:100480],[b:IsRealObject=FALSE],[f:BlobLifetime=1.5],[f:BlobInterval=0.15],[f:SpewLife=30.0],[f:BlobSize=4.0],[f:BlobSpeed=20.0],[b:Randomize]. Handle = [e:SpewHandle] aTurnOnSpew Turn on spew Turns on spew and sets the spew type and other variables Parameters: Object:

Source from the content-addressed store, hash-verified

2257$$END
2258*/
2259void aTurnOnSpew(int objref, int gunpoint, int effect_type, float mass, float drag, int gravity_type, uint8_t isreal,
2260 float lifetime, float interval, float longevity, float size, float speed, uint8_t random,
2261 int handle_slot) {
2262 msafe_struct mstruct;
2263
2264 mstruct.objhandle = objref;
2265 mstruct.gunpoint = gunpoint;
2266 mstruct.effect_type = effect_type;
2267 mstruct.mass = mass;
2268 mstruct.drag = drag;
2269 mstruct.phys_info = gravity_type;
2270 mstruct.is_real = isreal;
2271 mstruct.lifetime = lifetime;
2272 mstruct.interval = interval;
2273 mstruct.longevity = longevity;
2274 mstruct.size = size;
2275 mstruct.speed = speed;
2276 mstruct.random = (random) ? SPEW_RAND_SIZE | SPEW_RAND_LIFETIME | SPEW_RAND_SPEED : 0;
2277
2278 MSafe_CallFunction(MSAFE_OBJECT_START_SPEW, &mstruct);
2279
2280 if ((handle_slot >= 0) && (handle_slot < MAX_SPEW_HANDLES))
2281 Spew_handles[handle_slot] = mstruct.id;
2282}
2283
2284/*
2285$$ACTION

Callers 15

CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
SetMatCenToLevel0Function · 0.85
CallEventMethod · 0.85
SetModeMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected