Skip to main content

tick_vehicle_passengers_with_ticked_if

Function tick_vehicle_passengers_with_ticked_if 

Source
pub(crate) fn tick_vehicle_passengers_with_ticked_if(
    vehicle: &dyn Entity,
    ticked_entities: &mut FxHashSet<i32>,
    post_tick: &mut impl FnMut(&SharedEntity),
    can_tick: &mut impl FnMut(&SharedEntity) -> bool,
)
Expand description

Recursively ticks vehicle passengers that are eligible in the caller’s tick context.

Mirrors vanilla ServerLevel.tickPassenger: invalid vehicle links are detached, and passengers only recurse when the server-level entity tick list says they may tick.