--[[ requires exploits to be enabled
-- doesn't take into account that you might still be hit after teleport
-- fix: player_move_t:new( ... ) -> adjust cmd for teleport mode -> move:simulate( cmd ) for X ticks -> manual can_hit check
--]]
g_ctx.add_event_callback( "think", function ( cmd )
if not g_expoits.available( ) or not g_exploits.charged( ) or cmd.m_move:length_sqr( 2 ) <= 25.0 then
return
end
local vulnerable = false
g_player_list.for_each_entry( function ( entry )
if entry.m_can_hit_local_estimated then
vulnerable = true
return true
end
return false
end )
if not vulnerable then
return
end
g_exploits.release( e_expoit_teleport.extend )
end )