Skip to content

Commit

Permalink
Allow configuring distance to display player name at: Merge branch 'c…
Browse files Browse the repository at this point in the history
…onfig_name'

fogleman/Craft#103
#25
  • Loading branch information
satoshinm committed Apr 6, 2017
2 parents 4adeef9 + 86ccae6 commit 10c3b0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/config.h
Expand Up @@ -13,6 +13,7 @@
#define USE_CACHE 1
#define DAY_LENGTH 600
#define INVERT_MOUSE 0
#define PLAYER_NAME_DISTANCE 96 // Maximum distance to display a player's name at

// rendering options
#define SHOW_LIGHTS 1
Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Expand Up @@ -522,7 +522,7 @@ Player *player_crosshair(Player *player) {
}
float p = player_crosshair_distance(player, other);
float d = player_player_distance(player, other);
if (d < 96 && p / d < threshold) {
if (d < PLAYER_NAME_DISTANCE && p / d < threshold) {
if (best == 0 || d < best) {
best = d;
result = other;
Expand Down

0 comments on commit 10c3b0c

Please sign in to comment.