CTEDynamicLight: Difference between revisions

From SigMod
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Overview ==
== Overview ==
A temporary light entity.
A temporary light entity. Each client can only display one light at a time, displaying another while the previous is active will simply delete the old one. So if you send this entity to all players, that is the only instance you will be able to concurrently use. If you send a separate light specifically to each client they will be able to see their own light (but not other lights sent to other clients).


'''Source location : [https://github.com/sreechar/TF2-Source-Code/tree/master/tf2_src/game/server/te_dynamiclight.cpp /game/server/te_dynamiclight.cpp]'''
'''Source location : [https://github.com/sreechar/TF2-Source-Code/tree/master/tf2_src/game/server/te_dynamiclight.cpp /game/server/te_dynamiclight.cpp]'''
<pre>
tempents.Send("Dynamic Light", {m_vecOrigin=Vector(0, 0, 0),
                                r=200,
                                g=100,
                                b=0,
                                exponent=5,
                                m_fRadius=512,
                                m_fTime=100,
                                m_fDecay=0}, nil);
</pre>


==[[Classes|Class Structure]]==
==[[Classes|Class Structure]]==

Latest revision as of 17:17, 25 November 2022

Overview[edit | edit source]

A temporary light entity. Each client can only display one light at a time, displaying another while the previous is active will simply delete the old one. So if you send this entity to all players, that is the only instance you will be able to concurrently use. If you send a separate light specifically to each client they will be able to see their own light (but not other lights sent to other clients).

Source location : /game/server/te_dynamiclight.cpp

tempents.Send("Dynamic Light", {m_vecOrigin=Vector(0, 0, 0),
                                r=200,
                                g=100,
                                b=0,
                                exponent=5,
                                m_fRadius=512,
                                m_fTime=100,
                                m_fDecay=0}, nil);

Class Structure[edit | edit source]

SendProps[edit | edit source]

CTEDynamicLight
Name Type Description
m_vecOrigin Vector The origin of the light
r Integer The red value
g Integer The green value
b Integer The blue value
exponent Integer The brightness. 1 - 10 is a good range, past around the 20 mark the light begins to cease to function properly.
m_fRadius Float The radius or range in Hammer Units that the light casts
m_fTime Float How long in seconds this light will remain on
m_fDecay Float How fast should this light fade away (does not interact with or consider m_fTime). Specifying a negative value does not make the light "grow"