auto-disable reactor overload inside vehicles (as there's infinite power anyway)
This commit is contained in:
parent
5597411bac
commit
8172af8084
|
@ -355,8 +355,10 @@ pub fn update_physics_lifeforms(
|
|||
&Position,
|
||||
Option<&Player>,
|
||||
)>,
|
||||
q_bike: Query<&PlayerDrivesThis>,
|
||||
) {
|
||||
let d = time.delta_seconds();
|
||||
let inside_vehicle = !q_bike.is_empty();
|
||||
for (mut lifeform, mut hp, mut suit, velocity, pos, player) in query.iter_mut() {
|
||||
if lifeform.adrenaline_jolt.abs() > 1e-3 {
|
||||
lifeform.adrenaline_jolt *= 0.99;
|
||||
|
@ -371,7 +373,7 @@ pub fn update_physics_lifeforms(
|
|||
(lifeform.adrenaline - 0.0001 + lifeform.adrenaline_jolt * 0.01).clamp(0.0, 1.0);
|
||||
|
||||
if player.is_some() {
|
||||
lifeform.is_radioactively_damaged = if settings.reactor_state == 2 {
|
||||
lifeform.is_radioactively_damaged = if !inside_vehicle && settings.reactor_state == 2 {
|
||||
true
|
||||
} else if let Some(pos_jupiter) = id2pos.0.get(cmd::ID_JUPITER) {
|
||||
pos_jupiter.distance(pos.0) < 140_000_000.0
|
||||
|
|
Loading…
Reference in a new issue