Skip to content

Commit

Permalink
More bxt_ch_ additions (#415)
Browse files Browse the repository at this point in the history
* Add more bxt_ch_get_ commands to dump player info

* Add bxt_ch_get_gravity and bxt_ch_get_friction

* Removed cmds in favor of 'bxt_ch_get_other_player_info'

* Added 'bxt_ch_teleport_to_entity'

* Improved 'bxt_print_entities'

* Add new mode of output for 'bxt_print_entities'

* Fix origin for func_ladder/func_friction/func_water entities

* Print now some player flags in 'bxt_ch_get_other_player_info'

* bxt_print_entities: added 'strcmp' mode

* bxt_print_entities: merged coordinates into one to make it easier for copy

* More information in 'bxt_ch_get_other_player_info'

* Changed code due of reviews

* Add 'bxt_print_entities_by_index'

* bxt_print_entities: add 'strstr' mode and move some 'strcmp' checks outside of loop

* PrintEntities: switch to 'GetOriginOfEntity' for get origin

* Removed loop from 'bxt_ch_teleport_to_entity' code

* Returned no-arguments mode for 'bxt_print_entities' and added 'bxt_print_entities_help'

* bxt_print_entities: removed some arguments and use by default 'strcmp' for finding classname

* Renamed 'PrintEntities' to 'PrintEntity'

* Renamed 'check1' to 'match_substring'

* Removed 'bxt_print_entities_help'

* Added 'bxt_ch_entity_set_health'

* Added 'bxt_ch_monster_set_origin'
  • Loading branch information
SmileyAG authored Mar 5, 2023
1 parent bc6425f commit 2709c6c
Show file tree
Hide file tree
Showing 3 changed files with 438 additions and 19 deletions.
7 changes: 1 addition & 6 deletions BunnymodXT/hud_custom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -866,13 +866,8 @@ namespace CustomHud
{
out << "Yaw: " << ent->v.angles[1] << '\n';

// Borrowed from https://github.com/SNMetamorph/goldsrc-monitor/blob/08c368e246d09996b2d85e4367d4d8cc1e507712/sources/library/displaymode_entityreport.cpp#L45
Vector origin;

if (ent->v.solid == SOLID_BSP || ent->v.movetype == MOVETYPE_PUSHSTEP)
origin = ent->v.origin + ((ent->v.mins + ent->v.maxs) / 2.f);
else
origin = ent->v.origin;
HwDLL::GetInstance().GetOriginOfEntity(origin, ent);

out << "X: " << origin.x << '\n';
out << "Y: " << origin.y << '\n';
Expand Down
Loading

0 comments on commit 2709c6c

Please sign in to comment.