Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Sets up a boxed beam effect.
- *
- * Ported from eventscripts vecmath library
- *
- * @param client The client to show the box to.
- * @param upc One upper corner of the box.
- * @param btc One bottom corner of the box.
- * @param ModelIndex Precached model index.
- * @param HaloIndex Precached model index.
- * @param StartFrame Initital frame to render.
- * @param FrameRate Beam frame rate.
- * @param Life Time duration of the beam.
- * @param Width Initial beam width.
- * @param EndWidth Final beam width.
- * @param FadeLength Beam fade time duration.
- * @param Amplitude Beam amplitude.
- * @param color Color array (r, g, b, a).
- * @param Speed Speed of the beam.
- * @noreturn
- * -------------------------------------------------------------------------- */
- TE_SendBeamBoxToClient(client, const Float:upc[3], const Float:btc[3], ModelIndex, HaloIndex, StartFrame, FrameRate, const Float:Life, const Float:Width, const Float:EndWidth, FadeLength, const Float:Amplitude, const Color[4], Speed)
- {
- // Create the additional corners of the box
- decl Float:tc1[] = {0.0, 0.0, 0.0};
- decl Float:tc2[] = {0.0, 0.0, 0.0};
- decl Float:tc3[] = {0.0, 0.0, 0.0};
- decl Float:tc4[] = {0.0, 0.0, 0.0};
- decl Float:tc5[] = {0.0, 0.0, 0.0};
- decl Float:tc6[] = {0.0, 0.0, 0.0};
- AddVectors(tc1, upc, tc1);
- AddVectors(tc2, upc, tc2);
- AddVectors(tc3, upc, tc3);
- AddVectors(tc4, btc, tc4);
- AddVectors(tc5, btc, tc5);
- AddVectors(tc6, btc, tc6);
- tc1[0] = btc[0];
- tc2[1] = btc[1];
- tc3[2] = btc[2];
- tc4[0] = upc[0];
- tc5[1] = upc[1];
- tc6[2] = upc[2];
- // Draw all the edges
- TE_SetupBeamPoints(upc, tc1, ModelIndex, HaloIndex, StartFrame, FrameRate, Life, Width, EndWidth, FadeLength, Amplitude, Color, Speed);
- TE_SendToClient(client);
- TE_SetupBeamPoints(upc, tc2, ModelIndex, HaloIndex, StartFrame, FrameRate, Life, Width, EndWidth, FadeLength, Amplitude, Color, Speed);
- TE_SendToClient(client);
- TE_SetupBeamPoints(upc, tc3, ModelIndex, HaloIndex, StartFrame, FrameRate, Life, Width, EndWidth, FadeLength, Amplitude, Color, Speed);
- TE_SendToClient(client);
- TE_SetupBeamPoints(tc6, tc1, ModelIndex, HaloIndex, StartFrame, FrameRate, Life, Width, EndWidth, FadeLength, Amplitude, Color, Speed);
- TE_SendToClient(client);
- TE_SetupBeamPoints(tc6, tc2, ModelIndex, HaloIndex, StartFrame, FrameRate, Life, Width, EndWidth, FadeLength, Amplitude, Color, Speed);
- TE_SendToClient(client);
- TE_SetupBeamPoints(tc6, btc, ModelIndex, HaloIndex, StartFrame, FrameRate, Life, Width, EndWidth, FadeLength, Amplitude, Color, Speed);
- TE_SendToClient(client);
- TE_SetupBeamPoints(tc4, btc, ModelIndex, HaloIndex, StartFrame, FrameRate, Life, Width, EndWidth, FadeLength, Amplitude, Color, Speed);
- TE_SendToClient(client);
- TE_SetupBeamPoints(tc5, btc, ModelIndex, HaloIndex, StartFrame, FrameRate, Life, Width, EndWidth, FadeLength, Amplitude, Color, Speed);
- TE_SendToClient(client);
- TE_SetupBeamPoints(tc5, tc1, ModelIndex, HaloIndex, StartFrame, FrameRate, Life, Width, EndWidth, FadeLength, Amplitude, Color, Speed);
- TE_SendToClient(client);
- TE_SetupBeamPoints(tc5, tc3, ModelIndex, HaloIndex, StartFrame, FrameRate, Life, Width, EndWidth, FadeLength, Amplitude, Color, Speed);
- TE_SendToClient(client);
- TE_SetupBeamPoints(tc4, tc3, ModelIndex, HaloIndex, StartFrame, FrameRate, Life, Width, EndWidth, FadeLength, Amplitude, Color, Speed);
- TE_SendToClient(client);
- TE_SetupBeamPoints(tc4, tc2, ModelIndex, HaloIndex, StartFrame, FrameRate, Life, Width, EndWidth, FadeLength, Amplitude, Color, Speed);
- TE_SendToClient(client);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement