MCPcopy Create free account
hub / github.com/demoth/jake2 / PickFirst

Method PickFirst

game/src/main/java/jake2/game/PlayerTrail.java:94–117  ·  view source on GitHub ↗
(SubgameEntity self)

Source from the content-addressed store, hash-verified

92 }
93
94 SubgameEntity PickFirst(SubgameEntity self) {
95
96 if (!trail_active)
97 return null;
98
99 int marker = trail_head;
100
101 for (int n = TRAIL_LENGTH; n > 0; n--) {
102 if (trail[marker].timestamp <= self.monsterinfo.trail_time)
103 marker = NEXT(marker);
104 else
105 break;
106 }
107
108 if (GameUtil.visible(self, trail[marker], this.gameExports)) {
109 return trail[marker];
110 }
111
112 if (GameUtil.visible(self, trail[PREV(marker)], this.gameExports)) {
113 return trail[PREV(marker)];
114 }
115
116 return trail[marker];
117 }
118
119 SubgameEntity PickNext(SubgameEntity self) {
120

Callers 1

aiMethod · 0.80

Calls 3

NEXTMethod · 0.95
visibleMethod · 0.95
PREVMethod · 0.95

Tested by

no test coverage detected