コード例 #1
0
ファイル: effects.py プロジェクト: herlak/WCS
def effect5(model, start_userid, end_entity_index, life_time, width,
            fade_length, amplitude, red, green, blue, alpha, speed):
    """
    est_effect 5 <player filter> <delay> <model> <userid> <end index> <life> <width> <spread> <amplitude> <red> <green> <blue> <alpha> <speed>
    """
    if not isinstance(model, Model):
        model = Model(model)

    te = TempEntity('BeamRing')
    te.model = model
    te.halo = model
    te.start_entity_index = index_from_userid(start_userid)
    te.end_entity_index = end_entity_index
    te.life_time = life_time
    te.start_width = width
    te.end_width = width
    te.fade_length = fade_length
    te.amplitude = amplitude
    te.red = red
    te.green = green
    te.blue = blue
    te.alpha = alpha
    te.speed = speed

    return te
コード例 #2
0
ファイル: effects.py プロジェクト: herlak/WCS
def effect10(model, x, y, z, start_radius, end_radius, life_time, width,
             fade_length, amplitude, red, green, blue, alpha, speed):
    """
    est_effect 10 <player filter> <delay> <model> <x> <y> <z> <start radius> <end radius> <life> <width> <spread> <amplitude> <red> <green> <blue> <alpha> <speed>
    """
    if not isinstance(model, Model):
        model = Model(model)

    te = TempEntity('BeamRingPoint')
    te.model = model
    te.halo = model
    te.center = Vector(x, y, z)
    te.start_radius = start_radius
    te.end_radius = end_radius
    te.life_time = life_time
    te.start_width = width
    te.end_width = width
    te.fade_length = fade_length
    te.amplitude = amplitude
    te.red = red
    te.green = green
    te.blue = blue
    te.alpha = alpha
    te.speed = speed

    return te
コード例 #3
0
def effect102(model, start_entity_index, start_point, end_entity_index,
              end_point, frame_rate, life_time, start_width, end_width,
              fade_length, amplitude, red, green, blue, alpha, speed):
    """
    est_effect_02 <player filter> <delay> <model> <start entity> <start position x y z> <end entity> <end position x y z> <framerate> <life> <start width> <end width> <fade distance> <amplitude> <red> <green> <blue> <alpha> <speed>
    """
    if not isinstance(model, Model):
        model = get_model_instance(model)

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

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

    te = TempEntity('BeamEntPoint')
    te.model = model
    te.halo = model
    te.start_entity_index = start_entity_index
    te.start_point = start_point
    te.end_entity_index = end_entity_index
    te.end_point = end_point
    te.frame_rate = frame_rate
    te.life_time = life_time
    te.start_width = start_width
    te.end_width = end_width
    te.fade_length = fade_length
    te.amplitude = amplitude
    te.red = red
    te.green = green
    te.blue = blue
    te.alpha = alpha
    te.speed = speed

    return te
コード例 #4
0
ファイル: effects.py プロジェクト: herlak/WCS
def effect107(model, start_point, end_point, frame_rate, life_time, width,
              fade_length, amplitude, red, green, blue, alpha, speed):
    """
    est_effect_07 <player filter> <delay> <model> <start entity> <end entity> <framerate> <life> <width> <spread> <amplitude> <red> <green> <blue> <alpha> <speed>
    """
    if not isinstance(model, Model):
        model = Model(model)

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

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

    te = TempEntity('BeamPoints')
    te.model = model
    te.halo = model
    te.start_point = start_point
    te.end_point = end_point
    te.frame_rate = frame_rate
    te.life_time = life_time
    te.start_width = width
    te.end_width = width
    te.fade_length = fade_length
    te.amplitude = amplitude
    te.red = red
    te.green = green
    te.blue = blue
    te.alpha = alpha
    te.speed = speed

    return te
コード例 #5
0
ファイル: effects.py プロジェクト: herlak/WCS
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
コード例 #6
0
    def listener_on_entity_spawned(self, base_entity):
        if base_entity.classname != 'flashbang_projectile':
            return

        index = base_entity.index
        entity = Entity(index)

        for player in self._players:
            if player.inthandle == entity.owner_handle:
                break
        else:
            return

        temp_entity = TempEntity('BeamFollow')
        temp_entity.entity_index = index
        temp_entity.model_index = BEAM_MODEL.index
        temp_entity.halo_index = BEAM_MODEL.index
        temp_entity.life_time = 1
        temp_entity.start_width = 3
        temp_entity.end_width = 3
        temp_entity.fade_length = 1
        temp_entity.red = 255
        temp_entity.green = 255
        temp_entity.blue = 255
        temp_entity.alpha = 150

        temp_entity.create(RecipientFilter())
コード例 #7
0
ファイル: flashbang_battle.py プロジェクト: Hackmastr/ArcJail
    def listener_on_entity_spawned(self, index, base_entity):
        if base_entity.classname != 'flashbang_projectile':
            return

        entity = Entity(index)

        if entity.owner_handle not in (self.prisoner.inthandle,
                                       self.guard.inthandle):

            return

        temp_entity = TempEntity('BeamFollow')
        temp_entity.entity_index = index
        temp_entity.model_index = BEAM_MODEL.index
        temp_entity.halo_index = BEAM_MODEL.index
        temp_entity.life_time = 1
        temp_entity.start_width = 3
        temp_entity.end_width = 3
        temp_entity.fade_length = 1
        temp_entity.red = 255
        temp_entity.green = 255
        temp_entity.blue = 255
        temp_entity.alpha = 150

        temp_entity.create(RecipientFilter())
コード例 #8
0
    def listener_on_entity_spawned(self, base_entity):
        if base_entity.classname != 'flashbang_projectile':
            return

        index = base_entity.index
        entity = Entity(index)

        for player in self._players:
            if player.inthandle == entity.owner_handle:
                break
        else:
            return

        temp_entity = TempEntity('BeamFollow')
        temp_entity.entity_index = index
        temp_entity.model_index = BEAM_MODEL.index
        temp_entity.halo_index = BEAM_MODEL.index
        temp_entity.life_time = 1
        temp_entity.start_width = 3
        temp_entity.end_width = 3
        temp_entity.fade_length = 1
        temp_entity.red = 255
        temp_entity.green = 255
        temp_entity.blue = 255
        temp_entity.alpha = 150

        temp_entity.create(RecipientFilter())
コード例 #9
0
ファイル: effects.py プロジェクト: herlak/WCS
def effect105(model, start_entity_index, end_entity_index, frame_rate,
              life_time, start_width, end_width, fade_length, amplitude, red,
              green, blue, alpha, speed):
    """
    est_effect_05 <player filter> <delay> <model> <start entity> <end entity> <framerate> <life> <start width> <end width> <fade distance> <amplitude> <red> <green> <blue> <alpha> <speed>
    """
    if not isinstance(model, Model):
        model = Model(model)

    te = TempEntity('BeamLaser')
    te.model = model
    te.halo = model
    te.start_entity_index = start_entity_index
    te.end_entity_index = end_entity_index
    te.frame_rate = frame_rate
    te.life_time = life_time
    te.start_width = start_width
    te.end_width = end_width
    te.fade_length = fade_length
    te.amplitude = amplitude
    te.red = red
    te.green = green
    te.blue = blue
    te.alpha = alpha
    te.speed = speed

    return te
コード例 #10
0
ファイル: effects.py プロジェクト: herlak/WCS
def effect108(model, center, start_radius, end_radius, frame_rate, life_time,
              width, fade_length, amplitude, red, green, blue, alpha, speed,
              flags):
    """
    est_effect_08 <player filter> <delay> <model> <middle x y z> <start radius> <end radius> <framerate> <life> <width> <spread> <amplitude> <red> <green> <blue> <alpha> <speed> <flags>
    """
    if not isinstance(model, Model):
        model = Model(model)

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

    te = TempEntity('BeamRingPoint')
    te.model = model
    te.halo = model
    te.center = center
    te.start_radius = start_radius
    te.end_radius = end_radius
    te.frame_rate = frame_rate
    te.life_time = life_time
    te.start_width = width
    te.end_width = width
    te.fade_length = fade_length
    te.amplitude = amplitude
    te.red = red
    te.green = green
    te.blue = blue
    te.alpha = alpha
    te.speed = speed
    te.flags = flags

    return te
コード例 #11
0
ファイル: death_beam.py プロジェクト: satoon101/DeathBeam
def _create_beam(start, end, color):
    """Create the beam from the player/weapon's origin to the victim's."""
    width = int(beam_width)
    entity = TempEntity('BeamPoints')
    entity.start_point = start
    entity.start_width = width
    entity.end_point = end
    entity.end_width = width
    entity.color = color
    entity.life_time = int(beam_time)
    entity.model = _model
    entity.halo = _model
    entity.create()
コード例 #12
0
ファイル: death_beam.py プロジェクト: satoon101/DeathBeam
def _create_beam(start, end, color):
    """Create the beam from the player/weapon's origin to the victim's."""
    width = int(beam_width)
    entity = TempEntity('BeamPoints')
    entity.start_point = start
    entity.start_width = width
    entity.end_point = end
    entity.end_width = width
    entity.color = color
    entity.life_time = int(beam_time)
    entity.model = _model
    entity.halo = _model
    entity.create()
コード例 #13
0
ファイル: default2.py プロジェクト: AlexxDone/WCS_GO
def give_trail(ent, team):
    if team == 2:
        color = Color(255, 0, 0)
    if team == 3:
        color = Color(0, 0, 255)
    entity = TempEntity('BeamFollow')
    entity.start_width = 3
    entity.end_width = 3
    entity.color = color
    entity.model = beam_model
    entity.halo = beam_model
    entity.entity_index = ent.index
    entity.life_time = 2
    entity.create()
コード例 #14
0
ファイル: effects.py プロジェクト: herlak/WCS
def effect11(model, x, y, z, life_time, scale, brightness):
    """
    est_effect 11 <player filter> <delay> <model> <x> <y> <z> <life> <size> <brightness>
    """
    if not isinstance(model, Model):
        model = Model(model)

    te = TempEntity('GlowSprite')
    te.model = model
    te.origin = Vector(x, y, z)
    te.life_time = life_time
    te.scale = scale
    te.brightness = brightness

    return te
コード例 #15
0
ファイル: effects.py プロジェクト: AlexxDone/WCS_GO
def est_effect_04(command):
    #est_Effect_04 <player Filter> <delay> <model> <Follow ent> <life> <start width> <end width> <fade distance> <R> <G> <B> <A>
    te = TempEntity('BeamFollow')
    te.alpha = int(command[12])
    te.blue = int(command[11])
    te.green = int(command[10])
    te.end_width = int(command[7])
    te.life_time = float(command[5])
    te.start_width = int(command[6])
    te.entity_index = Player.from_userid(int(command[4])).index
    te.fade_length = int(command[8])
    te.halo_index = Model(str(command[3])).index
    te.model_index = Model(str(command[3])).index
    te.red = int(command[9])
    te.create(delay=float(command[2]))
コード例 #16
0
ファイル: effects.py プロジェクト: herlak/WCS
def effect118(origin, red, green, blue, exponent, radius, life_time, decay):
    """
    est_effect_18 <player filter> <delay> <position x y z> <red> <green> <blue> <exponent> <radius> <time> <decay>
    """
    if not isinstance(origin, Vector):
        origin = Vector(*origin)

    te = TempEntity('Dynamic Light')
    te.origin = origin
    te.red = red
    te.green = green
    te.blue = blue
    te.exponent = exponent
    te.radius = radius
    te.life_time = life_time
    te.decay = decay

    return te
コード例 #17
0
ファイル: effects.py プロジェクト: herlak/WCS
def effect123(model, position, life_time, size, brightness):
    """
    est_effect_23 <player filter> <delay> <model> <position x y z> <life> <size> <brightness>
    """
    if not isinstance(model, Model):
        model = Model(model)

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

    te = TempEntity('GaussExplosion')
    te.model = model
    te.position = position
    te.life_time = life_time
    te.scale = size
    te.brightness = brightness

    return te
コード例 #18
0
ファイル: effects.py プロジェクト: herlak/WCS
def effect4(model, userid, life_time, start_width, end_width, fade_length, red,
            green, blue, alpha):
    """
    est_effect 4 <player filter> <delay> <model> <userid> <life> <width> <end width> <time to fade> <red> <green> <blue> <alpha>
    """
    if not isinstance(model, Model):
        model = Model(model)

    te = TempEntity('BeamFollow')
    te.model = model
    te.halo = model
    te.entity_index = index_from_userid(userid)
    te.life_time = life_time
    te.start_width = start_width
    te.end_width = end_width
    te.fade_length = fade_length
    te.red = red
    te.green = green
    te.blue = blue
    te.alpha = alpha

    return te
コード例 #19
0
ファイル: effects.py プロジェクト: herlak/WCS
def effect2(model, start_userid, end_userid, life_time, start_width, end_width,
            red, green, blue, alpha):
    """
    est_effect 2 <player filter> <delay> <model> <start userid> <end userid> <life> <width> <end width> <red> <green> <blue> <alpha>
    """
    if not isinstance(model, Model):
        model = Model(model)

    te = TempEntity('BeamEntPoint')
    te.model = model
    te.halo = model
    te.start_entity_index = index_from_userid(start_userid)
    te.end_entity_index = index_from_userid(end_userid)
    te.life_time = life_time
    te.start_width = start_width
    te.end_width = end_width
    te.red = red
    te.green = green
    te.blue = blue
    te.alpha = alpha

    return te
コード例 #20
0
ファイル: effects.py プロジェクト: herlak/WCS
def effect104(model, entity_index, life_time, start_width, end_width,
              fade_length, red, green, blue, alpha):
    """
    est_effect_04 <player filter> <delay> <model> <follow entity> <life> <start width> <end width> <fade distance> <red> <green> <blue> <alpha>
    """
    if not isinstance(model, Model):
        model = Model(model)

    te = TempEntity('BeamFollow')
    te.model = model
    te.halo = model
    te.entity_index = entity_index
    te.life_time = life_time
    te.start_width = start_width
    te.end_width = end_width
    te.fade_length = fade_length
    te.red = red
    te.green = green
    te.blue = blue
    te.alpha = alpha

    return te
コード例 #21
0
ファイル: effects.py プロジェクト: herlak/WCS
def effect3(model, x1, y1, z1, x2, y2, z2, life_time, start_width, end_width,
            red, green, blue, alpha):
    """
    est_effect 3 <player filter> <delay> <model> (start <x> <y> <z>) (end <x> <y> <z>) <life> <width> <end width> <red> <green> <blue> <alpha>
    """
    if not isinstance(model, Model):
        model = Model(model)

    te = TempEntity('BeamPoints')
    te.model = model
    te.halo = model
    te.start_point = Vector(x1, y1, z1)
    te.end_point = Vector(x2, y2, z2)
    te.life_time = life_time
    te.start_width = start_width
    te.end_width = end_width
    te.red = red
    te.green = green
    te.blue = blue
    te.alpha = alpha

    return te
コード例 #22
0
ファイル: beam.py プロジェクト: satoon101/ProjectileTrails
    def create_trail(self):
        """Create the beam trail for the given entity."""
        # Get the values for the beam color
        rgb = str(self.convars['beam_color'])

        # Use try/except to split the color values
        try:
            color = Color(*map(int, rgb.split(',')))

        # Otherwise, set the colors to a default value
        except ValueError:
            color = Color(127, 127, 127)

        # Create the beam effect
        entity = TempEntity('BeamFollow')
        entity.start_width = 6
        entity.end_width = 6
        entity.color = color
        entity.model = _model
        entity.halo = _model
        entity.entity_index = self.entity.index
        entity.life_time = 2
        self.create_temp_entity(entity)
コード例 #23
0
ファイル: effects.py プロジェクト: AlexxDone/WCS_GO
def _est_effect(command):
    todo = str(command[1])
    filter = str(command[2])
    delay = float(command[3])
    if todo == "1":
        te = TempEntity('Armor Ricochet')
        te.position = Vector(float(command[4]), float(command[5]),
                             float(command[6]))
        te.direction = Vector(float(command[7]), float(command[8]),
                              float(command[9]))
        te.create()
    if todo == "2":
        te = TempEntity('BeamEntPoint')
        te.alpha = int(command[13])
        te.blue = int(command[12])
        te.green = int(command[11])
        te.end_width = float(command[9])
        te.life_time = float(command[7])
        te.start_width = float(command[8])
        te.end_entity_index = Player.from_userid(int(command[6])).index
        te.halo_index = Model(str(command[4])).index
        te.model_index = Model(str(command[4])).index
        te.start_entity_index = Player.from_userid(int(command[5])).index
        te.red = int(command[11])
        te.create()
    if todo == "3":
        te = TempEntity('BeamPoints')
        model = Model(str(command[4]))
        x1 = float(command[5])
        y1 = float(command[6])
        z1 = float(command[7])
        x2 = float(command[8])
        y2 = float(command[9])
        z2 = float(command[10])
        life = float(command[11])
        width = int(command[12])
        end_width = int(command[13])
        red = int(command[14])
        green = int(command[15])
        blue = int(command[16])
        alpha = int(command[17])
        te.alpha = alpha
        te.green = green
        te.blue = blue
        te.red = red
        te.end_width = end_width
        te.life_time = life
        te.start_width = width
        te.halo_index = model.index
        te.model_index = model.index
        te.end_point = Vector(x1, y1, z1)
        te.start_point = Vector(x2, y2, z2)
        te.create()
    if todo == "4":
        te = TempEntity('BeamFollow')
        te.alpha = int(command[13])
        te.blue = int(command[12])
        te.green = int(command[11])
        te.end_width = int(command[8])
        te.life_time = float(command[6])
        te.start_width = int(command[7])
        te.entity_index = Player.from_userid(int(command[5])).index
        te.fade_length = int(command[9])
        te.halo_index = Model(str(command[4])).index
        te.model_index = Model(str(command[4])).index
        te.red = int(command[10])
        te.create()
    if todo == "5":
        te = TempEntity('BeamRing')
        te.alpha = int(command[14])
        te.blue = int(command[13])
        te.green = int(command[12])
        te.amplitude = float(command[10])
        te.end_width = int(command[8])
        te.life_time = float(command[7])
        te.start_width = int(command[8])
        te.end_entity_index = int(command[6])
        te.halo_index = Model(str(command[4])).index
        te.model_index = Model(str(command[4])).index
        te.speed = int(command[15])
        te.start_entity_index = Player.from_userid(int(command[5])).index
        te.red = int(command[11])
    #est_effect [BeamRing] <player Filter> <delay> <model> <userid> <end index> <life> <width> <spread> <amplitude> <Red> <Green> <Blue> <Alpha> <speed>
    if todo == "6":
        te = TempEntity('Large Funnel')
        te.model_index = Model(str(command[4])).index
        te.reversed = int(command[8])
        te.origin = Vector(float(command[5]), float(command[6]),
                           float(command[7]))
        te.create()
        #est_effect [LargeFunnel] <player Filter> <delay> <model> <x> <y> <z> <reversed>
    if todo == "7":
        te = TempEntity('Smoke')
        te.scale = float(command[8])
        te.frame_rate = int(command[9])
        te.model_index = Model(str(command[4])).index
        te.model = Model(str(command[4]))
        te.origin = Vector(float(command[5]), float(command[6]),
                           float(command[7]))
        te.create()
    if todo == "8":
        te = TempEntity('Metal Sparks')
        te.direction = Vector(float(command[8]), float(command[9]),
                              float(command[10]))
        te.position = Vector(float(command[5]), float(command[6]),
                             float(command[7]))
        te.create()
        #est_effect [MetalSparks] <player Filter> <delay> <model> <x> <y> <z> (towards <x> <y> <z>) +
    if todo == "9":
        te = TempEntity('GaussExplosion')
        te.type = int(command[11])
        te.direction = Vector(float(command[8]), float(command[9]),
                              float(command[10]))
        te.origin = Vector(float(command[5]), float(command[6]),
                           float(command[7]))
        te.create()
        #est_effect [GaussExplosion] <player Filter> <delay> <model> <x> <y> <z> (towards <x> <y> <z>) <type>
    if todo == "10":
        te = TempEntity('BeamRingPoint')
        te.alpha = int(command[17])
        te.blue = int(command[16])
        te.green = int(command[15])
        te.amplitude = float(command[13])
        te.end_width = float(command[11])
        te.life_time = float(command[10])
        te.start_width = float(command[11])
        te.end_radius = float(command[9])
        te.start_radius = float(command[8])
        te.fade_length = int(command[12])
        te.halo_index = Model(str(command[4])).index
        te.model_index = Model(str(command[4])).index
        te.speed = int(command[18])
        te.center = Vector(float(command[5]), float(command[6]),
                           float(command[7]))
        te.red = int(command[14])
        te.create()
    if todo == "11":
        te = TempEntity('GlowSprite')
        te.life_time = float(command[8])
        te.scale = float(command[9])
        te.brightness = int(command[10])
        te.model_index = Model(str(command[4])).index
        te.origin = Vector(float(command[5]), float(command[6]),
                           float(command[7]))
        te.create()