PDA

View Full Version : ioquake3 + surf pmove + map surf_utopia



kung foo man
19th September 2018, 19:10
fixed my vmf2map converter to support ioquake3 somewhat:


https://www.youtube.com/watch?v=tRC1DwX9pi4

bsp/surface bugs somewhat disappeared aswell since using a bunch of different shaders, I guess it hit some per-shader-limits

kung foo man
19th September 2018, 21:01
Found proper aircontrol function: https://github.com/ETrun/ETrun/blob/master/src/game/bg_pmove.c#L841



static void PM_Aircontrol(pmove_t *pm, vec3_t wishdir, float wishspeed) {
float zspeed, speed, dot, k;
int i;
float smove;

if (!pm_aircontrol) {
return;
}

// accelerate
smove = pm->cmd.rightmove;

if ((smove > 0 || 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->velocity, wishdir);
k = 32.0f * pm_aircontrol * dot * dot * pml.frametime;

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

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



Feels way nicer now

kung foo man
19th September 2018, 22:51
Also fixed the "bsp bugs" lol... solved it by increasing MIN_WALK_NORMAL... seems like a few surf_utopia planes scratch that dot product... sometimes

IzNoGoD
20th September 2018, 15:48
Bookmarking to make my surf thingy more accurate in the future.

kung foo man
20th September 2018, 16:44
There is one last ramp in mp_surf_utopia which acts like a push-player-in-air-ramp when surfing over it with some speed.... I tried for hours all kinds of different ioquake3 settings and even recompiled map often with the gtkradiant q3map2 and every map compiler i could find (ryvens, paulvortex)... but I cannot figure out why it bugs. I guess I will just settle with what I have atm