Ejemplo n.º 1
0
 def update_trail(self):
     """Create the sparks trail for the given entity."""
     entity = TempEntity('Sparks')
     entity.origin = self.entity.origin
     direction = self.entity.base_velocity
     direction.negate()
     entity.direction = direction
     entity.trail_length = 3
     entity.magnitude = 1
     self.create_temp_entity(entity)
Ejemplo n.º 2
0
def effect132(position, magnitude, trail_length, direction):
    """
    est_effect_32 <player filter> <delay> <position x y z> <magnitude> <trail length> <direction x y z>
    """
    if not isinstance(position, Vector):
        position = Vector(*position)

    if not isinstance(direction, Vector):
        direction = Vector(*direction)

    te = TempEntity('Smoke')
    te.position = position
    te.magnitude = magnitude
    te.trail_length = trail_length
    te.direction = direction

    return te