| A bug appeared after 4870 version.[message #304730]
|
Tue, 15 May 2012 17:04
|
|
cnagorneac |
 |
Messages:187
Registered:April 2012 |
|
|
I found a strange bug in the game using ArilkoFoldingStocks.
It appears that Aiming cap modifier makes shots more accurate even if it is has Minus sign. during my tests looks like no matter + or - is the modifier, it gives increase in accuracy.
I checked two weapons.cpp files. One from 4870 (was told that this versions works as intended) and one from 5272 build.
Found that almost all places where ToHit bonuses or penalties are present were changed. For example.
in 4870
// Add percent-based modifier from the gun and its attachments
uiCap += (INT32)(uiCap * GetPercentCapModifier( pInHand, gAnimControl[ pSoldier->usAnimState ].ubEndHeight )) / 100;
in 5272
// Add percent-based modifier from the gun and its attachments
UINT32 uimoda = (UINT32)(uiCap * GetPercentCapModifier( pInHand, stance )) / 100;
UINT32 uimodb = (UINT32)(uiCap * GetPercentCapModifier( pInHand, gAnimControl[ pSoldier->usAnimState ].ubEndHeight )) / 100;
uiCap += (UINT32)((gGameExternalOptions.ubProneModifierPercentage * uimoda + (100 - gGameExternalOptions.ubProneModifierPercentage) * uimodb)/100);
or
in 4870
iGunAimDifficulty += (iGunAimDifficulty * GetPercentHandlingModifier( pInHand, gAnimControl[ pSoldier->usAnimState ].ubEndHeight )) / 100;
in 5272
FLOAT umoda = (iGunAimDifficulty * GetPercentHandlingModifier( pInHand, stance )) / 100;
FLOAT umodb = (iGunAimDifficulty * GetPercentHandlingModifier( pInHand, gAnimControl[ pSoldier->usAnimState ].ubEndHeight )) / 100;
iGunAimDifficulty += (gGameExternalOptions.ubProneModifierPercentage * umoda + (100 - gGameExternalOptions.ubProneModifierPercentage) * umodb)/100;
Hope this info helps.
Report message to a moderator
|
Staff Sergeant
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: A bug appeared after 4870 version.[message #304749]
|
Tue, 15 May 2012 22:07 
|
|
| Wil473 |
  |
Messages:2808
Registered:September 2004 Location: Canada |
|
|
cnagorneacwil473Found it, ChrisL only fixed it recently: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=290405#Post290405
EDIT: also Percent Tracking needs to be checked as well, ChrisL in September found it was subject to the same bug.
It is hard for me to understand what is written in the topic you mentioned, but I do not understand you at all. Found it? fixed? I do not understand. Where is it fixed if the last build has this bug? or you mean that it should be fixed again?
If it should be fixed again, I will pationly wait for the fix, but if there is another workaround, please tell me.
A time-line may help here:
1)Known - ChrisL found in September of last year that negative Percent Cap values was causing NCTH accuracy to jump (ie. what we're seeing now).
2)Known - He fixed it in September of last year, allowing me to use negative Percent Cap values (ie. the broken FSS system). Not being a programmer, I cannot understand what the fix is either but it was fixed and described as:
ChrisLafter fixing this bug with a simple variable recast, this same test merc ends up with a uiCap of 88 and maxAim of 75 when I set the weapon's PercentCap=-10.
uiCap += (INT32)(uiCap * GetPercentCapModifier( pInHand, gAnimControl[ pSoldier->usAnimState ].ubEndHeight )) / 100;
I'll commit this small fix to the release branch so it's available the next time a build is released.
EDIT: I fixed a similar issue with PercentTargetTrackingSpeed
"simple variable recast" = swapping in INT32 instead UINT32 in the right places?
3)Suspected - HAM5 may have been using a form of NCTH from before the fix, it started within a month or two of ChrisL's post. Hopefully this is the case, because the other possibility is that Headrock needed to "break" Percent Cap for some other feature.
Report message to a moderator
|
|
|
|
|
|
|
| Re: A bug appeared after 4870 version.[message #304751]
|
Tue, 15 May 2012 22:20 
|
|
Strohmann |
  |
Messages:280
Registered:August 2011 Location: Division Thought Crimes |
|
|
i doubt 3), i didn't have the problem with any HAM 5 version and equivalents until the latest sci from Tai. looking at the code line for 5272 in the first post from cnagorneac i suspect the weapon resting feature from flugente.
(Thread Feature: Overheating Weapons, p2)
Toggle SpoilerFlugenteI'm too lazy too open a new thread for this small feature...
I coded 'resting your weapon on a surface'.
Basically, you can now rest your weapon on a surface. That means when the next tile your looking at is crate, or rock, or small wall, or sandbag, or a open window, your weapon is rested. This measn that you'll get the handling modifiers for PRONE position, including a bipod. This onyl works on crouched position.
A small pic:

In this picture, Barry is aiming with his MG while resting his weapon on a carwreck. He'll receive superior handling modifiers for this.
Note the little 'A'. This indicates he is resting his weapon.
Weapon resting and the display can be toggled on and off in the Ja2_Options.ini under the 'Tactical Overheating Settings'.
exe can be found here, built upon r5088: http://www.mediafire.com/?3rve8q0pddu5buv
I've sent it to RoWa.
Note: The aforementioned update from my previous posts is already in the trunk.
Edit: too late^^
Report message to a moderator
|
Master Sergeant
|
|
|
|
|
|
|
|
|
|
|
|
| Re: A bug appeared after 4870 version.[message #304756]
|
Tue, 15 May 2012 23:18
|
|
cnagorneac |
 |
Messages:187
Registered:April 2012 |
|
|
DepressivesBrotEither update your local copy of the source code SVN repository and compile ...
... or just follow the link in my sig that says 'Latest builds'
A-HA... Thanks.
Ha, I am in the changelog =))))))
[Updated on: Tue, 15 May 2012 23:23] by Moderator Report message to a moderator
|
Staff Sergeant
|
|
|
|