Results 1 to 5 of 5

Thread: ioquake3 + surf pmove + map surf_utopia

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Found proper aircontrol function: https://github.com/ETrun/ETrun/blob/...g_pmove.c#L841

    PHP Code:
    static void PM_Aircontrol(pmove_t *pmvec3_t wishdirfloat wishspeed) {
        
    float zspeedspeeddotk;
        
    int   i;
        
    float smove;

        if (!
    pm_aircontrol) {
            return;
        }

        
    // accelerate
        
    smove pm->cmd.rightmove;

        if ((
    smove || smove 0) || (wishspeed == 0.0)) {
            return; 
    // can't control movement if not moving forward or backward
        
    }

        
    zspeed              pm->ps->velocity[2];
        
    pm->ps->velocity[2] = 0;
        
    speed               VectorNormalize(pm->ps->velocity);

        
    dot DotProduct(pm->ps->velocitywishdir);
        
    k   32.0f pm_aircontrol dot dot pml.frametime;

        if (
    dot 0) {
            
    // we can't change direction while slowing down
            
    for (02; ++i) {
                
    pm->ps->velocity[i] = pm->ps->velocity[i] * speed wishdir[i] * k;
            }
            
    VectorNormalize(pm->ps->velocity);
        }

        for (
    02; ++i) {
            
    pm->ps->velocity[i] *= speed;
        }
        
    pm->ps->velocity[2] = zspeed;


    Feels way nicer now
    timescale 0.01

  2. The Following User Says Thank You to kung foo man For This Useful Post:

    kubislav23 (19th September 2018)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •