Home » MODDING HQ 1.13 » v1.13 Coding Talk » New Stealth Mechanics
Re: New Stealth Mechanics[message #340007 is a reply to message #340006] Tue, 10 March 2015 22:16 Go to previous messageGo to previous message
Deleted.

 
Messages:2657
Registered:December 2012
Location: Russian Federation
Also, it looks like moving in the dark gives more cover penalty than moving in the bright light

INT8 GetSightAdjustmentThroughMovement( SOLDIERTYPE* pSoldier, const INT8& bTilesMoved, const UINT8& ubLightLevel  )
{
	if (gGameExternalOptions.ubMovementEffectiveness == 0) {
		return 0;
	}

	INT8 stealth = GetStealth(pSoldier);

	INT8 bMovementAdjustment = bTilesMoved * ( 100 - stealth ) / 100;

	// SANDRO - added reduction of penalty for moving for Stealthy trait with new traits
	if ( gGameOptions.fNewTraitSystem && HAS_SKILL_TRAIT( pSoldier, STEALTHY_NT ))
		bMovementAdjustment = max(0, (bMovementAdjustment * (100 - gSkillTraitValues.ubSTStealthPenaltyForMovingReduction) / 100) );

	UINT8 ubBrightness = GetBrightness( ubLightLevel );

	return MINMAX100N( bMovementAdjustment * ubBrightness / 100 * gGameExternalOptions.ubMovementEffectiveness / 100 );
}

because GetBrightness( ubLightLevel ); is actually opposite and should be named GetDarkness, because it returns 100% at zero light level.



Left this community.

Report message to a moderator

Lieutenant

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Strategic Map load in source code
Next Topic: (New) Common Attachment Framework (new title; was The NAS Receiver)
Goto Forum:
  


Current Time: Fri Jan 10 04:17:27 GMT+2 2025

Total time taken to generate the page: 0.01039 seconds