Skip to content

Commit

Permalink
Fix OICW grip offset
Browse files Browse the repository at this point in the history
  • Loading branch information
fholger committed Aug 19, 2023
1 parent 2f11cb3 commit 379793b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion FCData/scripts/Default/Entities/Weapons/AG36.lua
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ AG36MP = {
character = "Objects/Weapons/ag36/ag36.cgf",

BoneRightHand = "Bone67",
BoneLeftArm = "Bone25",
BoneLeftHand = "Bone19",
RHOffsetAngles = {-2.0, -8.0, 2.0},

fireCanceled = 0,

Expand Down
8 changes: 5 additions & 3 deletions FCData/scripts/Default/Entities/Weapons/OICW.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ OICWSP = {

BoneRightHand = "Bone67",
BoneLeftHand = "Bone19",
RHOffset = {0.0, -0.08, 0.01},
RHOffsetAngles = {-33.0, 0.0, -15.0},
RHOffsetAngles = {-34.5, 18.0, -2.0},
DefaultIdle = "Idle22",

-- if the weapon supports zooming then add this...
ZoomActive = 0, -- initially always 0
Expand Down Expand Up @@ -221,7 +221,9 @@ OICWMP = {
character = "Objects/Weapons/oicw/oicw.cgf",

BoneRightHand = "Bone67",
BoneLeftArm = "Bone25",
BoneLeftHand = "Bone19",
RHOffsetAngles = {-34.5, 18.0, -2.0},
DefaultIdle = "Idle22",

fireCanceled = 0,

Expand Down
6 changes: 4 additions & 2 deletions Sources/CryGame C++/Solution1/CryGame/WeaponClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -827,14 +827,16 @@ bool CWeaponClass::InitModels()
if (m_rWeaponSystem.IsLeftHanded())
m_pCharacter->SetScale(Vec3d(-1,1,1));

const char* defaultIdle = "Idle11";
m_soWeaponClass->GetValue("DefaultIdle", defaultIdle);
// set keyframe 1
CryCharAnimationParams ccap;
ccap.fBlendInTime = 0;
ccap.fBlendOutTime = 0;
ccap.nLayerID = 0;
m_pCharacter->SetAnimationSpeed(1.0f);
m_pCharacter->SetDefaultIdleAnimation(0,"Idle11");
m_pCharacter->StartAnimation("Idle11",ccap);
m_pCharacter->SetDefaultIdleAnimation(0,defaultIdle);
m_pCharacter->StartAnimation(defaultIdle,ccap);
m_pCharacter->Update();
m_pCharacter->ForceUpdate();
}
Expand Down

0 comments on commit 379793b

Please sign in to comment.