help me to finish zoom in goc tird person view on crysis 1 to fix the weapon offsets

I followed this tutorial on the old forum: ... 91&t=28560

to add the zoom on goc mod of crysis 1 with succes, I am looking for a person who can help me to fix the position of weapon accesories change in the hud to the thirdperson!

I followed this tutorial, I miss a function in the hud.cpp to fix !

thank you

look here:

end here:

Re: help me to finish zoom in goc tird person view on crysis 1 to fix the weapon offsets

is the function in hud.cpp:

CWeapon *pCurrentWeapon = GetCurrentWeapon();
if(pCurrentWeapon && pCurrentWeapon->IsModifying())
IGameTokenSystem *pGameTokenSystem = gEnv->pGame->GetIGameFramework()->GetIGameTokenSystem();

char tempBuf[HUD_MAX_STRING_SIZE];

const CItem::THelperVector& helpers = pCurrentWeapon->GetAttachmentHelpers();

for (int i = 0; i < helpers.size(); i++)
CItem::SAttachmentHelper helper = helpers;
//NEW STUFF if (helper.slot != CItem::eIGS_FirstPerson&& helper.slot != CItem::eIGS_ThirdPerson) //NEW STUFF!!!!

Vec3 vWorldPos = pCurrentWeapon->GetSlotHelperPos(CItem::eIGS_FirstPerson, helper.bone,true);
Vec3 vScreenSpace;

float fScaleX = 0.0f;
float fScaleY = 0.0f;
float fHalfUselessSize = 0.0f;

vScreenSpace.x = vScreenSpace.x * fScaleX + fHalfUselessSize;
vScreenSpace.y = vScreenSpace.y * fScaleY;


_snprintf(tempBuf, sizeof(tempBuf), "hud.WS%sX",;
tempBuf[sizeof(tempBuf)-1] = '\0';
_snprintf(tempBuf, sizeof(tempBuf), "hud.WS%sY",;
tempBuf[sizeof(tempBuf)-1] = '\0';

I change the line if (helper.slot != CItem::eIGS_FirstPerson) to
if (helper.slot != CItem::eIGS_FirstPerson && helper.slot != CItem::eIGS_ThirdPerson)

Technically, weapons are supposed to be defined based on whether their first person or third person, but some of the third person weapons are set to the first person slot.

The other suspect is AdjustWeaponAccessory. I nedd a function for handling the offsets???

you need to read the first post on the old forum, the problem is that the angle of the camera in third person or after the zoom does not have the same position as the first person

tank you

Re: help me to finish zoom in goc tird person view on crysis 1 to fix the weapon offsets

I found the lines changed to show the weapon hub position to the third person same as the first person:

Vec3 vWorldPos = pCurrentWeapon-> GetSlotHelperPos (CItem :: eIGS_FirstPerson, helper.bone, true);

Vec3 vWorldPos = pCurrentWeapon-> GetSlotHelperPos (CItem :: eIGS_ThirdPerson, helper.bone, true);

and add

vScreenSpace.z = 1;

with these changes the weapon hub is displayed to the third person correctly but has the first person, I can not modify the code so that it appears correctly in the firt person and the third person at the same time!

the problem is that I have to modify the code to make the difference between the first and the last person

my knowledge is limited in c ++, can someone help me?
thank you

Who is online

Users browsing this forum: No registered users and 0 guests