Title, sounded simple, OnEntityEnter on Oxide API for Rust doesn't fire when I jump in the water so that's not viable I guess, any suggestions?
I know I could have a periodic foreach loop through all active players and check their .IsSwimming() but it'd be nice if this could be handled through an event
Detecting a player jumping in water
Discussion in 'Rust Development' started by Scarsz, Jun 25, 2016.
-
This is a bit difficult, because the server doesn't really fire an event by itself, so Oxide would need to add an extra check to the "UpdateModelStateFromTick" method (or similar).
-
I can settle for
if this isn't doable, doesn't seem like it makes any hit in performanceCode:private void OnPlayerInput(BasePlayer player, InputState input) { if (!player.IsSwimming()) return; ForcePlayerPosition(player, defaultSpawnPoint); }
