mirror of
https://github.com/nzp-team/quakespasm.git
synced 2024-11-10 06:32:03 +00:00
VITA/NX: Add support for Z axis ADSOfs, adjust zoom amounts
This commit is contained in:
parent
8a21d114d4
commit
3ffcd046ba
3 changed files with 93 additions and 30 deletions
|
@ -2010,39 +2010,96 @@ int GetWeaponZoomAmmount (void)
|
|||
{
|
||||
switch (cl.stats[STAT_ACTIVEWEAPON])
|
||||
{
|
||||
case W_357:
|
||||
case W_SAWNOFF:
|
||||
case W_TRENCH:
|
||||
case W_PANZER:
|
||||
case W_RAY:
|
||||
case W_THOMPSON:
|
||||
case W_COLT:
|
||||
case W_PPSH:
|
||||
case W_TYPE:
|
||||
//case W_TESLA:
|
||||
return 5;
|
||||
break;
|
||||
case W_STG:
|
||||
case W_BROWNING:
|
||||
case W_MP40:
|
||||
return 10;
|
||||
break;
|
||||
case W_KAR:
|
||||
case W_GEWEHR:
|
||||
case W_M1:
|
||||
case W_M1A1:
|
||||
case W_FG:
|
||||
case W_ARMAGEDDON:
|
||||
return 25;
|
||||
break;
|
||||
case W_KAR_SCOPE:
|
||||
case W_PTRS:
|
||||
//case W_HEADCRACKER:
|
||||
//case W_PENETRATOR:
|
||||
case W_HEADCRACKER:
|
||||
return 50;
|
||||
break;
|
||||
case W_THOMPSON:
|
||||
case W_GIBS:
|
||||
return 10;
|
||||
break;
|
||||
case W_TRENCH:
|
||||
case W_GUT:
|
||||
return 10;
|
||||
break;
|
||||
case W_357:
|
||||
case W_KILLU:
|
||||
return 5;
|
||||
break;
|
||||
case W_MG:
|
||||
case W_BARRACUDA:
|
||||
return 15;
|
||||
break;
|
||||
case W_DB:
|
||||
case W_BORE:
|
||||
case W_SAWNOFF:
|
||||
return 10;
|
||||
break;
|
||||
case W_M1A1:
|
||||
case W_WIDDER:
|
||||
return 20;
|
||||
break;
|
||||
case W_BAR:
|
||||
case W_WIDOW:
|
||||
return 30;
|
||||
break;
|
||||
case W_FG:
|
||||
case W_IMPELLER:
|
||||
return 30;
|
||||
break;
|
||||
case W_GEWEHR:
|
||||
case W_COMPRESSOR:
|
||||
return 25;
|
||||
break;
|
||||
case W_PPSH:
|
||||
case W_REAPER:
|
||||
return 10;
|
||||
break;
|
||||
case W_MP40:
|
||||
case W_AFTERBURNER:
|
||||
return 10;
|
||||
break;
|
||||
case W_MP5K:
|
||||
case W_KOLLIDER:
|
||||
return 10;
|
||||
break;
|
||||
case W_STG:
|
||||
case W_SPATZ:
|
||||
return 20;
|
||||
break;
|
||||
case W_M1:
|
||||
case W_M1000:
|
||||
return 25;
|
||||
break;
|
||||
case W_BROWNING:
|
||||
case W_ACCELERATOR:
|
||||
return 15;
|
||||
break;
|
||||
case W_PTRS:
|
||||
case W_PENETRATOR:
|
||||
return 50;
|
||||
break;
|
||||
case W_TYPE:
|
||||
case W_SAMURAI:
|
||||
return 10;
|
||||
break;
|
||||
case W_RAY:
|
||||
case W_PORTER:
|
||||
return 5;
|
||||
break;
|
||||
default:
|
||||
return 5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
float zoomin_time;
|
||||
int original_fov;
|
||||
int original_view_fov;
|
||||
|
|
|
@ -157,7 +157,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define W_KILLU 29 //357
|
||||
#define W_COMPRESSOR 30 // Gewehr
|
||||
#define W_M1000 31 //garand
|
||||
//#define W_KOLLIDER 32
|
||||
#define W_KOLLIDER 32 // mp5
|
||||
#define W_PORTER 33 // Ray
|
||||
#define W_WIDDER 34 // M1A1
|
||||
#define W_FIW 35 //upgraded flamethrower
|
||||
|
|
|
@ -1238,10 +1238,12 @@ void V_CalcRefdef (void)
|
|||
{
|
||||
ADSOffset[0] = 0;
|
||||
ADSOffset[1] = 0;
|
||||
ADSOffset[2] = 0;
|
||||
}
|
||||
//Side offset
|
||||
cADSOfs [0] += (ADSOffset[0] - cADSOfs[0]) * 0.25;
|
||||
cADSOfs [1] += (ADSOffset[1] - cADSOfs[1]) * 0.25; // naievil -- removed "- cADSOfs[1]" because it caused some viewmodel errors. sB re-enabled it for now.
|
||||
cADSOfs [2] += (ADSOffset[2] - cADSOfs[2]) * 0.25;
|
||||
|
||||
temp_right[0] *= cADSOfs[0];
|
||||
temp_right[1] *= cADSOfs[0];
|
||||
|
@ -1251,9 +1253,13 @@ void V_CalcRefdef (void)
|
|||
temp_up[1] *= cADSOfs[1];
|
||||
temp_up[2] *= cADSOfs[1]; // motolegacy -- another vmodel hack: standard ADS offsets don't go up enough. sB was cADSOfs[1]
|
||||
|
||||
view->origin[0] +=(temp_right[0] + temp_up[0]);
|
||||
view->origin[1] +=(temp_right[1] + temp_up[1]);
|
||||
view->origin[2] +=(temp_right[2] + temp_up[2]);
|
||||
temp_forward[0] *= cADSOfs[2];
|
||||
temp_forward[1] *= cADSOfs[2];
|
||||
temp_forward[2] *= cADSOfs[2];
|
||||
|
||||
view->origin[0] +=(temp_forward[0] + temp_right[0] + temp_up[0]);
|
||||
view->origin[1] +=(temp_forward[1] + temp_right[1] + temp_up[1]);
|
||||
view->origin[2] +=(temp_forward[2] + temp_right[2] + temp_up[2]);
|
||||
|
||||
float speed = (0.2 + sqrt((cl.velocity[0] * cl.velocity[0]) + (cl.velocity[1] * cl.velocity[1])));
|
||||
speed = speed/190;
|
||||
|
|
Loading…
Reference in a new issue