Example #1
0

        
Example #2
0
        /// <summary>
        /// Add the first deathrun spawn as the map spawn point.
        /// </summary>
        /// <param name="instance">The function</param>
        public static List <string> AddSpawn(SRFunction instance)
        {
            List <string> new_lines = instance.Lines;
            int           LineIndex = 3;

            if (new_lines[LineIndex - 1] == null)
            {
                return(new_lines);
            }

            new_lines.Insert(LineIndex,
                             "\t\tthread speedrun\\_way_name::create_spawn_auto(auto_spawn[int(auto_spawn.size / 2)].origin, auto_spawn[int(auto_spawn.size / 2)].angles[1]);");
            new_lines.Insert(LineIndex,
                             "\tif(auto_spawn.size > 0)");
            new_lines.Insert(LineIndex,
                             "\tauto_spawn = getEntArray(\"mp_jumper_spawn\", \"classname\");");

            return(new_lines);
        }
Example #3
0