Exemple #1
0
        public static bool CreateFragPatternInfo(ref udtPatternInfo pattern, ArgumentResources resources, udtCutByFragArg rules)
        {
            var pinnedRules = new PinnedObject(rules);
            resources.PinnedObjects.Add(pinnedRules);

            pattern.Type = (UInt32)udtPatternType.FragSequences;
            pattern.TypeSpecificInfo = pinnedRules.Address;

            return true;
        }
Exemple #2
0
        public static bool CutDemosByFrag(ref udtParseArg parseArg, List<string> filePaths, udtCutByFragArg rules, CutByPatternOptions options)
        {
            var resources = new ArgumentResources();
            var patterns = new udtPatternInfo[1];
            if(!CreateFragPatternInfo(ref patterns[0], resources, rules))
            {
                return false;
            }

            return CutDemosByPattern(resources, ref parseArg, filePaths, patterns, options);
        }
Exemple #3
0
        public static udtCutByFragArg CreateCutByFragArg(UdtConfig config, UdtPrivateConfig privateConfig)
        {
            UInt32 flags = 0;
            if(config.FragCutAllowAnyDeath)
            {
                flags |= (UInt32)UDT_DLL.udtCutByFragArgFlags.AllowDeaths;
            }
            if(config.FragCutAllowSelfKills)
            {
                flags |= (UInt32)UDT_DLL.udtCutByFragArgFlags.AllowSelfKills;
            }
            if(config.FragCutAllowTeamKills)
            {
                flags |= (UInt32)UDT_DLL.udtCutByFragArgFlags.AllowTeamKills;
            }

            var rules = new udtCutByFragArg();
            rules.MinFragCount = (UInt32)config.FragCutMinFragCount;
            rules.TimeBetweenFragsSec = (UInt32)config.FragCutTimeBetweenFrags;
            rules.TimeMode = 0; // @TODO:
            rules.Flags = flags;
            rules.AllowedMeansOfDeaths = privateConfig.FragCutAllowedMeansOfDeaths;

            return rules;
        }