Skip to content

Commit

Permalink
Fixed Player model Field of view Lighting
Browse files Browse the repository at this point in the history
  • Loading branch information
MadDeCoDeR committed May 26, 2020
1 parent 7ffa2b1 commit d9626ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 6 additions & 2 deletions neo/d3xp/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ idCVar pm_clientAuthoritative_minSpeedSquared( "pm_clientAuthoritative_minSpeedS
idCVar pm_flip("pm_flip", "0", CVAR_BOOL, "");
extern idCVar pm_cursor;

extern idCVar pm_vmfov;

extern idCVar g_demoMode;

/*
Expand Down Expand Up @@ -10582,8 +10584,10 @@ void idPlayer::CalculateViewWeaponPos( idVec3& origin, idMat3& axis )
const idVec3& viewOrigin = firstPersonViewOrigin;
const idMat3& viewAxis = firstPersonViewAxis;

float vmfov = pm_vmfov.GetInteger() / 12.0;
float classicOffs = 0.0;
// these cvars are just for hand tweaking before moving a value to the weapon def
idVec3 gunpos( g_gun_x.GetFloat(), g_gun_y.GetFloat(), g_gun_z.GetFloat() );
idVec3 gunpos( g_gun_x.GetFloat() + vmfov, g_gun_y.GetFloat() + classicOffs, g_gun_z.GetFloat() );

// as the player changes direction, the gun will take a small lag
idVec3 gunOfs = GunAcceleratingOffset();
Expand Down Expand Up @@ -10814,7 +10818,7 @@ void idPlayer::CalculateFirstPersonView()
{
// offset for local bobbing and kicks
GetViewPos( firstPersonViewOrigin, firstPersonViewAxis );
#if 0
#if 1
// shakefrom sound stuff only happens in first person
firstPersonViewAxis = firstPersonViewAxis * playerView.ShakeAxis();
#endif
Expand Down
5 changes: 1 addition & 4 deletions neo/d3xp/Weapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2653,13 +2653,10 @@ void idWeapon::PresentWeapon( bool showViewModel )
}
}
viewWeaponOrigin += hideOffset * viewWeaponAxis[ 2 ];
//GK: Complex Math stuff
double vmfov = (100.0 - pm_vmfov.GetInteger()) / 100.0;
viewWeaponAxis = viewWeaponAxis * vmfov;

// kick up based on repeat firing
MuzzleRise( viewWeaponOrigin, viewWeaponAxis );
}

// set the physics position and orientation
GetPhysics()->SetOrigin( viewWeaponOrigin );
GetPhysics()->SetAxis( viewWeaponAxis );
Expand Down

0 comments on commit d9626ad

Please sign in to comment.