Skip to content

Commit

Permalink
turret_active_time
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikk155 committed Apr 7, 2024
1 parent beaf259 commit f2fb76c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions game/cfg/skills/skill_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@
"turret_health2": 50,
"turret_health3": 60,

// seconds turret will stay active w/o a target
"turret_active_time1": 15,
"turret_active_time2": 20,
"turret_active_time3": 30,

// 0 = turret can not take damage when it's off
// affects both turret and miniturret.
"turret_takedamage_off1": 1,
Expand Down
3 changes: 1 addition & 2 deletions src/game/server/entities/NPCs/military/turret.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#define TURRET_RANGE (100 * 12)
#define TURRET_SPREAD Vector(0, 0, 0)
#define TURRET_TURNRATE 30 //!< angles per 0.1 second
#define TURRET_MAXWAIT 15 //!< seconds turret will stay active w/o a target
#define TURRET_MAXSPIN 5 //!< seconds turret barrel will spin w/o a target
#define TURRET_MACHINE_VOLUME 0.5

Expand Down Expand Up @@ -383,7 +382,7 @@ void CBaseTurret::Initialize()
m_fTurnRate = TURRET_TURNRATE;
}
if (m_flMaxWait == 0)
m_flMaxWait = TURRET_MAXWAIT;
m_flMaxWait = GetSkillFloat( "turret_active_time"sv, 15 );
m_flStartYaw = pev->angles.y;
if (m_iOrientation == 1)
{
Expand Down

0 comments on commit f2fb76c

Please sign in to comment.