Hahah,I m so dumm:(
I forgotted to add cgame/ui to pk3 :mad:
Anyway,while testing I found nice stuff X:D
In bg_pmove.c
Replace PM_CalcLean(line 4408)
With this:
/*
==============
PM_CalcLean
==============
*/
void PM_UpdateLean(playerState_t *ps, usercmd_t *cmd, pmove_t *tpm) {
int leaning = 0; // -1 left, 1 right
float leanofs = 0;
if ( cmd->wbuttons & (WBUTTON_LEANLEFT | WBUTTON_LEANRIGHT)) {
if (ps->pm_type == PM_SPECTATOR ) {
if (cmd->wbuttons & WBUTTON_LEANLEFT)
leaning -= 1;
if (cmd->wbuttons & WBUTTON_LEANRIGHT)
leaning += 1;
} else if ((!cmd->forwardmove && cmd->upmove <= 0)) {
if (cmd->wbuttons & WBUTTON_LEANLEFT)
leaning -= 1;
if (cmd->wbuttons & WBUTTON_LEANRIGHT)
leaning += 1;
}
}
if ( BG_PlayerMounted(ps->eFlags) )
leaning = 0;
if (ps->eFlags & EF_FIRING)
leaning = 1;
if (ps->eFlags & EF_DEAD)
leaning = 0;
if ( ps->weaponstate == WEAPON_FIRING && ps->weapon == WP_DYNAMITE )
leaning = 0;
if ( ps->eFlags & EF_PRONE || ps->weapon == WP_MORTAR_SET )
leaning = 0;
leanofs = ps->leanf;
if (!leaning) {
if ( leanofs > 0 ) {
leanofs -= (((float)pml.msec/(float)LEAN_TIME_FR)*LEAN_MAX);
if ( leanofs < 0 )
leanofs = 0;
} else if ( leanofs < 0 ) {
leanofs += (((float)pml.msec/(float)LEAN_TIME_FR)*LEAN_MAX);
if ( leanofs > 0 )
leanofs = 0;
}
}
if (leaning) {
if (leaning > 0) { // right
if (leanofs < LEAN_MAX)
leanofs += (((float)pml.msec/(float)LEAN_TIME_TO)*LEAN_MAX);
if (leanofs > LEAN_MAX)
leanofs = LEAN_MAX;
} else { // left
if (leanofs > -LEAN_MAX)
leanofs -= (((float)pml.msec/(float)LEAN_TIME_TO)*LEAN_MAX);
if (leanofs < -LEAN_MAX)
leanofs = -LEAN_MAX;
}
} else {
}
ps->leanf = leanofs;
if (leaning) {
vec3_t start, end, tmins, tmaxs, right;
vec3_t viewangles;
trace_t trace;
VectorCopy( ps->origin, start );
start[2] += ps->viewheight;
VectorCopy( ps->viewangles, viewangles );
viewangles[ROLL] += leanofs/2.0f; // Lean_new
AngleVectors( viewangles, NULL, right, NULL );
VectorMA( start, leanofs, right, end );
VectorSet( tmins, -8, -8, -7 );
VectorSet( tmaxs, 8, 8, 4 );
if ( pm )
pm->trace (&trace, start, tmins, tmaxs, end, ps->clientNum, MASK_PLAYERSOLID);
else
tpm->trace (&trace, start, tmins, tmaxs, end, ps->clientNum, MASK_PLAYERSOLID);
ps->leanf *= trace.fraction;
}
if (ps->leanf) {
if (ps->pm_type != PM_SPECTATOR) { //LeanShoot
cmd->rightmove = 0;
}
}
}
No complie/play and shot with thompson 