Example #1
0
 //Computed in local machine, server/local client;
 public sbyte[] get_bullet_seed(float firecone, int frame_stack = 1)
 {
     sbyte[] blt_dir = new sbyte[burst_shots * frame_stack];
     for (int i = 0; i < burst_shots * frame_stack; i++)
     {
         blt_dir[i] = CONSTANTS.seed_float_to_sbyte(Random.Range(-precise - firecone, precise + firecone), precise + accuracy); //CONSTANTS.MAX_GUN_BIAS);// precise + firecone_angle);
     }
     return(blt_dir);
 }
Example #2
0
    //Fps stack purpose
    public sbyte[] get_bullet_seed_single_incremental(float firecone, float aim_suppress, int frame_stack)
    {
        sbyte[] blt_dir = new sbyte[frame_stack];
        float   bias    = aim_suppress * accuracy / bias_factor;

        for (int i = 0; i < frame_stack; i++)
        {
            blt_dir[i] = CONSTANTS.seed_float_to_sbyte(Random.Range(-precise - firecone, precise + firecone), precise + accuracy); //CONSTANTS.MAX_GUN_BIAS);// precise + (firecone + bias * i));
            firecone   = Mathf.Clamp(firecone + bias, 0, accuracy - accuracy / bias_factor);
        }
        return(blt_dir);
    }