-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring and bug fixes in ESP and spectators list handling #132
Conversation
Hey, interesting PR. In regards of naming schemesEntity id, entity index and entity handle index are basically used synonymously throughout Valthrun. The
The
|
Entity comparison is now done only by entity_index. LocalCameraTarget ViewController |
The changes primarily focus on refactoring and fixing bugs in the handling of ESP and spectators list.
In the
observer.rs
file, in thecreate
function, the 'target_controller_entity_id', which represented 'EntityHandle.get_entity_index()', was replaced by 'target_entity_handle_index', which representsEntityHandle<C_BaseEntity>.value
. This adjustment was made becauseobserver_target
can now also beC_PlantedC4
.The check for matching target entities has been updated to use
observer_target_handle.value
. I am not sure that this is optimal, as I don't even know what the 'serial_number` represents, so I will be happy to hear your opinion.In the
player.rs
file, the local player controller is now fetched directly using theget_local_player_controller
function and is used to updatelocal_team_id
.The code for fetching the local player's pawn position has been removed. The distance calculation for each player now uses
view_world_position
instead oflocal_pos
.In the
world.rs
file, a new functionget_view_world_position
has been added to theViewController
structure. This function calculates the world position based on the view matrix.