Skip to content

Commit 5aebfda

Browse files
revolucasXottab-DUTY
authored andcommitted
* changed cycle down in WeaponMagazined.cpp
* increased the Y distance for the floor/ceiling wall look prevention
1 parent 6f704f1 commit 5aebfda

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

src/xrGame/WeaponMagazined.cpp

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void CWeaponMagazined::Load(LPCSTR section)
9696

9797
m_sSndShotCurrent = "sndShot";
9898

99-
//звуки и партиклы глушителя, еслит такой есть
99+
//звуки и партиклы глушителя, если такой есть
100100
if (m_eSilencerStatus == ALife::eAddonAttachable || m_eSilencerStatus == ALife::eAddonPermanent)
101101
{
102102
if (pSettings->line_exist(section, "silencer_flame_particles"))
@@ -532,12 +532,6 @@ void CWeaponMagazined::state_Fire(float dt)
532532

533533
VERIFY(!m_magazine.empty());
534534

535-
//Alundaio: Use fModeShotTime instead of fOneShotTime if current fire mode is 2-shot burst
536-
float rpm = fOneShotTime;
537-
if (GetCurrentFireMode() == 2)
538-
rpm = modeShotTime;
539-
//Alundaio: END
540-
541535
while (!m_magazine.empty() && fShotTimeCounter < 0 && (IsWorking() || m_bFireSingleShot) &&
542536
(m_iQueueSize < 0 || m_iShotNum < m_iQueueSize))
543537
{
@@ -549,14 +543,11 @@ void CWeaponMagazined::state_Fire(float dt)
549543

550544
m_bFireSingleShot = false;
551545

546+
//Alundaio: Use fModeShotTime instead of fOneShotTime if current fire mode is 2-shot burst
552547
//Alundaio: Cycle down RPM after two shots; used for Abakan/AN-94
553-
if (cycleDown == true)
554-
{
555-
if (m_iShotNum <= 2)
556-
rpm = modeShotTime;
557-
else
558-
rpm = fOneShotTime;
559-
}
548+
float rpm = fOneShotTime;
549+
if (GetCurrentFireMode() == 2 || (cycleDown == true && m_iShotNum <= 1))
550+
rpm = modeShotTime;
560551

561552
fShotTimeCounter += rpm;
562553
//Alundaio: END

src/xrGame/stalker_combat_actions.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ void CStalkerActionTakeCover::execute()
559559
}
560560
else
561561
{
562-
if (_abs(object().Position().y - mem_object.m_object_params.m_position.y) > 3.f)
562+
if (_abs(object().Position().y - mem_object.m_object_params.m_position.y) > 3.5f)
563563
{
564564
Fvector3 Vpos = { mem_object.m_object_params.m_position.x, object().Position().y + 1.f, mem_object.m_object_params.m_position.z };
565565
object().sight().setup(CSightAction(SightManager::eSightTypePosition, Vpos, true));
@@ -644,7 +644,7 @@ void CStalkerActionLookOut::execute()
644644
return;
645645

646646
//Alundaio: Prevent stalkers from staring at floor or ceiling for this action
647-
if (_abs(object().Position().y - mem_object.m_object_params.m_position.y) > 3.f)
647+
if (_abs(object().Position().y - mem_object.m_object_params.m_position.y) > 3.5f)
648648
{
649649
Fvector3 Vpos = { mem_object.m_object_params.m_position.x, object().Position().y + 1.f, mem_object.m_object_params.m_position.z };
650650
object().sight().setup(CSightAction(SightManager::eSightTypePosition, Vpos, true));
@@ -745,7 +745,7 @@ void CStalkerActionHoldPosition::execute()
745745
m_storage->set_property(eWorldPropertyLookedOut, false);
746746

747747
//Alundaio: Prevent stalkers from staring at floor or ceiling for this action
748-
if (_abs(object().Position().y - mem_object.m_object_params.m_position.y) > 3.f)
748+
if (_abs(object().Position().y - mem_object.m_object_params.m_position.y) > 3.5f)
749749
{
750750
Fvector3 Vpos = { mem_object.m_object_params.m_position.x, object().Position().y + 1.f, mem_object.m_object_params.m_position.z };
751751
object().sight().setup(CSightAction(SightManager::eSightTypePosition, Vpos, true));
@@ -870,7 +870,7 @@ void CStalkerActionDetourEnemy::execute()
870870
}
871871

872872
//Alundaio: Prevent stalkers from staring at floor or ceiling for this action
873-
if (_abs(object().Position().y - mem_object.m_object_params.m_position.y) > 3.f)
873+
if (_abs(object().Position().y - mem_object.m_object_params.m_position.y) > 3.5f)
874874
{
875875
Fvector3 Vpos = { mem_object.m_object_params.m_position.x, object().Position().y + 1.f, mem_object.m_object_params.m_position.z };
876876
object().sight().setup(CSightAction(SightManager::eSightTypePosition, Vpos, true));

src/xrGame/stalker_danger_in_direction_actions.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@ void CStalkerActionDangerInDirectionHoldPosition::execute()
236236
// if (!mem_object.m_object)
237237
// return;
238238

239+
//Alundaio:
240+
if (!object().memory().danger().selected())
241+
return;
242+
//-Alundaio
243+
239244
Fvector position = object().memory().danger().selected()->position();
240245

241246
if (current_cover(m_object) < 3.f)

0 commit comments

Comments
 (0)