2nd Hotfix

Possible fix for Hell Soulcube Issue
New Headshot multiplier cvars
Fix for hands only mode so chest takes damage
Show head in mirrors
Bummsers controller offset
This commit is contained in:
Grant Bagwell 2021-01-16 23:56:20 +01:00
parent 7329dde3de
commit de9747cb44
8 changed files with 50 additions and 25 deletions

View file

@ -2458,6 +2458,7 @@ int idActor::GetDamageForLocation( int damage, int location, bool headMultiplier
//only applies if head damage group is already scaled to take > 1.0x damage.
//limited by calling function to fists, pitsol,shotgun,machinegun,chaingun and plasmagun.
float damageAmt = damage *= damageScale[location];
//common->Printf("Damage Taken at: %s",damageGroups[location].c_str());
if ( headMultiplier )
{
//GBTODO check what the local actor is
@ -2468,15 +2469,19 @@ int idActor::GetDamageForLocation( int damage, int location, bool headMultiplier
{
if(g_skill.GetInteger() == 0)
{
damageAmt *= 2.5f;
damageAmt *= vr_headshotMultiplierRecruit.GetFloat();
}
else if(g_skill.GetInteger() == 1)
{
damageAmt *= 1.75f;
damageAmt *= vr_headshotMultiplierNormal.GetFloat();
}
else if(g_skill.GetInteger() == 2)
{
damageAmt *= 1.25f;
damageAmt *= vr_headshotMultiplierHard.GetFloat();
}
else if(g_skill.GetInteger() == 3)
{
damageAmt *= vr_headshotMultiplierNightmare.GetFloat();
}
//damageAmt *= vr_headshotMultiplier.GetFloat();

View file

@ -513,6 +513,13 @@ void idInventory::RestoreInventory( idPlayer *owner, const idDict &dict ) {
}
}
//Restore the clip data
for( i = 0; i < MAX_WEAPONS; i++ )
{
clip[i] = dict.GetInt( va( "clip%i", i ), "-1" );
clipDuplicate[i] = dict.GetInt( va( "clipDuplicate%i", i ), "-1" );
}
// items
num = dict.GetInt( "items" );
items.SetNum( num );
@ -610,6 +617,7 @@ void idInventory::Save( idSaveGame *savefile ) const {
}
for( i = 0; i < MAX_WEAPONS; i++ ) {
savefile->WriteInt( clip[ i ] );
//savefile->WriteInt( clip[i] + clipDuplicate[ i ]);
}
for( i = 0; i < MAX_POWERUPS; i++ ) {
savefile->WriteInt( powerupEndTime[ i ] );
@ -11806,15 +11814,7 @@ void idPlayer::Think( void ) {
}
else
{
if ( vr_playerBodyMode.GetInteger() != 0 ) // not showing the body
{
headRenderEnt->allowSurfaceInViewID = -1; // hide the head, even in mirror views.
}
else
{
//headRenderEnt->suppressSurfaceInViewID = entityNumber + 1;
headRenderEnt->allowSurfaceInViewID = 0; // show the head.
}
headRenderEnt->allowSurfaceInViewID = 0; // GB show the head in mirrors.
}
}
@ -11827,15 +11827,7 @@ void idPlayer::Think( void ) {
renderEntity.suppressShadowInViewID = entityNumber+1;
if( headRenderEnt )
{
// Koz begin
if ( game->isVR && vr_playerBodyMode.GetInteger() == 0 ) // show the head shadow
{
headRenderEnt->suppressShadowInViewID = 0;
}
else
{
headRenderEnt->suppressShadowInViewID = entityNumber + 1;
}
headRenderEnt->suppressShadowInViewID = 0;
// Koz end
}
}

View file

@ -1649,9 +1649,9 @@ void idTarget_RemoveWeapons::Event_Activate( idEntity *activator ) {
if ( gameLocal.entities[ i ] ) {
idPlayer *player = static_cast< idPlayer* >( gameLocal.entities[i] );
int wIndex[11] = {0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 12};
int wIndex[10] = {0, 1, 2, 3, 5, 6, 7, 8, 9, 10};
int index = 0;
for ( index = 0; index < 11; index++ ) {
for ( index = 0; index < 10; index++ ) {
player->RemoveWeapon( va( "def_weapon%d", wIndex[index] ) );
}

View file

@ -103,6 +103,9 @@ idCVar vr_motionFlashPitchAdj( "vr_motionFlashPitchAdj", "40", CVAR_FLOAT | CVAR
idCVar vr_nodalX( "vr_nodalX", "-3", CVAR_FLOAT | CVAR_ARCHIVE, "Forward offset from eyes to neck" );
idCVar vr_nodalZ( "vr_nodalZ", "-6", CVAR_FLOAT | CVAR_ARCHIVE, "Vertical offset from neck to eye height" );
idCVar vr_controllerOffsetX( "vr_controllerOffsetX", "-1.4", CVAR_FLOAT | CVAR_ARCHIVE, "Controller X offset to handle center" ); // these values work for steam
idCVar vr_controllerOffsetY( "vr_controllerOffsetY", "-1.32", CVAR_FLOAT | CVAR_ARCHIVE, "Controller Y offset to handle center" );
idCVar vr_controllerOffsetZ( "vr_controllerOffsetZ", "-0.9", CVAR_FLOAT | CVAR_ARCHIVE, "Controller Z offset to handle center" );
idCVar vr_vcx( "vr_vcx", "0", CVAR_FLOAT | CVAR_ARCHIVE, "Controller X offset to handle center" ); // these values work for steam
idCVar vr_vcy( "vr_vcy", "0", CVAR_FLOAT | CVAR_ARCHIVE, "Controller Y offset to handle center" );
idCVar vr_vcz( "vr_vcz", "0", CVAR_FLOAT | CVAR_ARCHIVE, "Controller Z offset to handle center" );
@ -188,6 +191,10 @@ idCVar vr_cinematics("vr_cinematics", "0", CVAR_INTEGER | CVAR_ARCHIVE, "Cinemat
idCVar vr_instantAccel( "vr_instantAccel", "1", CVAR_BOOL | CVAR_ARCHIVE, "Instant Movement Acceleration. 0 = Disabled 1 = Enabled" );
idCVar vr_shotgunChoke( "vr_shotgunChoke", "60", CVAR_FLOAT | CVAR_ARCHIVE, "% To choke shotgun. 0 = None, 100 = Full Choke\n" );
idCVar vr_headshotMultiplier( "vr_headshotMultiplier", "2.5", CVAR_FLOAT | CVAR_ARCHIVE, "Damage multiplier for headshots when using Fists,Pistol,Shotgun,Chaingun or Plasmagun.", 1, 5 );
idCVar vr_headshotMultiplierRecruit( "vr_headshotMultiplierRecruit", "2.0", CVAR_FLOAT | CVAR_ARCHIVE, "Recruit Level Damage multiplier for headshots when using Fists,Pistol,Shotgun,Chaingun or Plasmagun.", 1, 5 );
idCVar vr_headshotMultiplierNormal( "vr_headshotMultiplierNormal", "1.5", CVAR_FLOAT | CVAR_ARCHIVE, "Normal Level Damage multiplier for headshots when using Fists,Pistol,Shotgun,Chaingun or Plasmagun.", 1, 5 );
idCVar vr_headshotMultiplierHard( "vr_headshotMultiplierHard", "1.25", CVAR_FLOAT | CVAR_ARCHIVE, "Hard Level Damage multiplier for headshots when using Fists,Pistol,Shotgun,Chaingun or Plasmagun.", 1, 5 );
idCVar vr_headshotMultiplierNightmare( "vr_headshotMultiplierNightmare", "1.0", CVAR_FLOAT | CVAR_ARCHIVE, "Nightmare Level Damage multiplier for headshots when using Fists,Pistol,Shotgun,Chaingun or Plasmagun.", 1, 5 );
// Carl
idCVar vr_weaponCycleMode( "vr_weaponCycleMode", "0", CVAR_INTEGER | CVAR_GAME | CVAR_ARCHIVE, "When cycling through weapons\n0 = skip holstered weapons, 1 = include holstered weapons, 2 = flashlight but not holstered, 3 = holstered+flashlight, 4 = holstered+flashlight+pda" );
@ -933,13 +940,13 @@ void iVr::MotionControlGetHand( int hand, idVec3 &motionPosition, idQuat &motion
if ( hand == vr_weaponHand.GetInteger() && vr_mountedWeaponController.GetBool() )
{
idVec3 controlToHand = idVec3( vr_mountx.GetFloat() / vr_scale.GetFloat(), vr_mounty.GetFloat() / vr_scale.GetFloat(), vr_mountz.GetFloat() / vr_scale.GetFloat() );
idVec3 controlCenter = idVec3( vr_vcx.GetFloat() / vr_scale.GetFloat(), vr_vcy.GetFloat() / vr_scale.GetFloat(), vr_vcz.GetFloat() / vr_scale.GetFloat() );
idVec3 controlCenter = idVec3( vr_controllerOffsetX.GetFloat() / vr_scale.GetFloat(), vr_controllerOffsetY.GetFloat() / vr_scale.GetFloat(), vr_controllerOffsetZ.GetFloat() / vr_scale.GetFloat() );
motionPosition += ( controlToHand - controlCenter ) * motionRotation; // pivot around the new point
}
else
{
motionPosition += idVec3( vr_vcx.GetFloat() / vr_scale.GetFloat(), vr_vcy.GetFloat() / vr_scale.GetFloat(), vr_vcz.GetFloat() / vr_scale.GetFloat() ) * motionRotation;
motionPosition += idVec3( vr_controllerOffsetX.GetFloat() / vr_scale.GetFloat(), vr_controllerOffsetY.GetFloat() / vr_scale.GetFloat(), vr_controllerOffsetZ.GetFloat() / vr_scale.GetFloat() ) * motionRotation;
}
}

View file

@ -440,6 +440,9 @@ extern idCVar vr_weaponPivotOffsetHorizontal;
extern idCVar vr_weaponPivotOffsetVertical;
extern idCVar vr_weaponPivotForearmLength;
extern idCVar vr_controllerOffsetX;
extern idCVar vr_controllerOffsetY;
extern idCVar vr_controllerOffsetZ;
extern idCVar vr_guiScale;
extern idCVar vr_guiSeparation;
@ -529,6 +532,10 @@ extern idCVar vr_instantAccel;
extern idCVar vr_shotgunChoke;
extern idCVar vr_headshotMultiplier;
extern idCVar vr_headshotMultiplierRecruit;
extern idCVar vr_headshotMultiplierNormal;
extern idCVar vr_headshotMultiplierHard;
extern idCVar vr_headshotMultiplierNightmare;
extern idCVar vr_weaponCycleMode;
extern idCVar vr_gripMode;

Binary file not shown.

View file

@ -206,6 +206,10 @@ seta vr_mustEmptyHands "0"
seta vr_gripMode "0"
seta vr_weaponCycleMode "0"
seta vr_headshotMultiplier "2.5"
seta vr_headshotMultiplierRecruit "2.0"
seta vr_headshotMultiplierNormal "1.5"
seta vr_headshotMultiplierHard "1.25"
seta vr_headshotMultiplierNightmare "1.0"
seta vr_shotgunChoke "60"
seta vr_instantAccel "1"
seta vr_cinematics "0"
@ -247,6 +251,9 @@ seta vr_mountx "0"
seta vr_vcz "0"
seta vr_vcy "0"
seta vr_vcx "0"
seta vr_controllerOffsetX "-1.4"
seta vr_controllerOffsetY "-1.32"
seta vr_controllerOffsetZ "-0.9"
seta vr_nodalZ "-6"
seta vr_nodalX "-3"
seta vr_motionFlashPitchAdj "0"

View file

@ -206,6 +206,10 @@ seta vr_mustEmptyHands "0"
seta vr_gripMode "0"
seta vr_weaponCycleMode "0"
seta vr_headshotMultiplier "2.5"
seta vr_headshotMultiplierRecruit "2.0"
seta vr_headshotMultiplierNormal "1.5"
seta vr_headshotMultiplierHard "1.25"
seta vr_headshotMultiplierNightmare "1.0"
seta vr_shotgunChoke "60"
seta vr_instantAccel "1"
seta vr_cinematics "0"
@ -247,6 +251,9 @@ seta vr_mountx "0"
seta vr_vcz "0"
seta vr_vcy "0"
seta vr_vcx "0"
seta vr_controllerOffsetX "-1.4"
seta vr_controllerOffsetY "-1.32"
seta vr_controllerOffsetZ "-0.9"
seta vr_nodalZ "-6"
seta vr_nodalX "-3"
seta vr_motionFlashPitchAdj "0"