wiremod-svn-archive/wire/lua/effects/jump_out/init.lua
tad2020 c480a91fcd added some server vars for overlaytext mitigation:
sv_Wire_SlowerOverlayTextUpdate 1: forces an extra second dealy on sending overlay text added some server vars for overlaytext mitigation:
sv_Wire_SlowerOverlayTextUpdate 1: forces an extra second delay on sending all wired overlay text.
sv_Wire_DisableOverlayTextUpdate 1: disables all wired overlay text.
sv_Wire_ForceDelayOverlayTextUpdate 1: forces all wired ents that don't have a minimum overlay text update rate set to have the minimum delay, this is now the default for non single player games.

changed wired netwars update send rate (now occures more often)

added function DebugDuplicator.GetAllConstrainedEntities: works like Duplicator.GetAllConstrainedEntitiesAndConstraints but only good for ents and is faster.

changed debug printing of wire types on link

added expermental jump drive to hover drive controller (don't ask how to use it)
added effects for jump (stargate required for sounds and maybe required for jump to function at all, untested w/o stargates)
2007-04-29 11:02:53 +00:00

63 lines
1.7 KiB
Lua

EFFECT.Mat = Material( "effects/select_ring" )
/*---------------------------------------------------------
Initializes the effect. The data is a table of data
which was passed from the server.
---------------------------------------------------------*/
function EFFECT:Init( data )
local TargetEntity = data:GetEntity()
if ( !TargetEntity || !TargetEntity:IsValid() ) then return end
local vOffset = TargetEntity:GetPos()
local Low, High = TargetEntity:WorldSpaceAABB()
local Center = data:GetOrigin() //High - (( High - Low ) * 0.5)
local NumParticles = TargetEntity:BoundingRadius()
NumParticles = NumParticles * 2
NumParticles = math.Clamp( NumParticles, 10, 500 )
local emitter = ParticleEmitter( vOffset )
for i=0, NumParticles do
local vPos = Vector( math.Rand(Low.x,High.x), math.Rand(Low.y,High.y), math.Rand(Low.z,High.z) )
local vVel = (Center - vPos) * 6
local particle = emitter:Add( "effects/spark", vPos )
if (particle) then
particle:SetVelocity( vVel )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 0.1, 0.3 ) )
particle:SetStartAlpha( math.Rand( 200, 255 ) )
particle:SetEndAlpha( 0 )
particle:SetStartSize( 20 )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand(0, 360) )
particle:SetRollDelta( 0 )
end
end
emitter:Finish()
end
/*---------------------------------------------------------
THINK
---------------------------------------------------------*/
function EFFECT:Think( )
return false
end
/*---------------------------------------------------------
Draw the effect
---------------------------------------------------------*/
function EFFECT:Render()
end