Reduce NPC interaction radius to 100px
This commit is contained in:
1 parent
b43b116f45
commit
24968c227a
1 file changed
+2
-2
@@ -451,7 +451,7 @@ class Game {
|
|||||||
_checkNPCProximity() {
|
_checkNPCProximity() {
|
||||||
const {viewW, viewH} = this._getViewport();
|
const {viewW, viewH} = this._getViewport();
|
||||||
const dist = this._npcScreenDist();
|
const dist = this._npcScreenDist();
|
||||||
const near = !(this.state.npcWorldX === 0 && this.state.npcWorldY === 0) && dist < 200;
|
const near = !(this.state.npcWorldX === 0 && this.state.npcWorldY === 0) && dist < 100;
|
||||||
|
|
||||||
const hint = document.getElementById('map-talk-hint');
|
const hint = document.getElementById('map-talk-hint');
|
||||||
const bub = document.getElementById('npc-bubble');
|
const bub = document.getElementById('npc-bubble');
|
||||||
@@ -504,7 +504,7 @@ class Game {
|
|||||||
|
|
||||||
_nearNPC() {
|
_nearNPC() {
|
||||||
if (this.state.npcWorldX === 0 && this.state.npcWorldY === 0) return false;
|
if (this.state.npcWorldX === 0 && this.state.npcWorldY === 0) return false;
|
||||||
return this._npcScreenDist() < 200;
|
return this._npcScreenDist() < 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
_talkToNPC() {
|
_talkToNPC() {
|
||||||
|
|||||||
Reference in new issue
Block a user