Ejemplo n.º 1
0
def effect127(model, skin, position, angle, velocity, flags, effects):
    """
    est_effect_27 <player filter> <delay> <model> <subtype/skin> <position x y z> <angle p y r> <velocity x y z> <flags> <effects>
    """
    if not isinstance(model, Model):
        model = Model(model)

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

    if not isinstance(angle, QAngle):
        angle = QAngle(*angle)

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

    te = TempEntity('physicsprop')
    te.model = model
    te.skin = skin
    te.origin = position
    te.angles = angle
    te.velocity = velocity
    te.flags = flags
    te.effects = effects

    return te
Ejemplo n.º 2
0
def effect112(model, origin, angle, size, velocity, randomization, count, time,
              flags):
    """
    est_effect_12 <player filter> <delay> <model> <origin x y z> <angle p y r> <Size x y z> <velocity x y z> <randomization> <count> <time> <flags>

    """
    if not isinstance(model, Model):
        model = Model(model)

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

    if not isinstance(angle, QAngle):
        angle = QAngle(*angle)

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

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

    te = TempEntity('Break Model')
    te.model = model
    te.origin = origin
    te.rotation = angle
    te.size = size
    te.velocity = velocity
    te.randomization = randomization
    te.count = count
    te.life_time = time
    te.flags = flags

    return te