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

Method think

game/src/main/java/jake2/game/items/GameItems.java:67–93  ·  view source on GitHub ↗
(SubgameEntity ent, GameExportsImpl gameExports)

Source from the content-addressed store, hash-verified

65 }
66
67 public boolean think(SubgameEntity ent, GameExportsImpl gameExports) {
68 if (ent.team != null) {
69 SubgameEntity master;
70 int count;
71 int choice = 0;
72
73 master = ent.teammaster;
74
75 // count the depth
76 for (count = 0, ent = master; ent != null; ent = ent.chain, count++)
77 ;
78
79 choice = Lib.rand() % count;
80
81 for (count = 0, ent = master; count < choice; ent = ent.chain, count++)
82 ;
83 }
84
85 ent.svflags &= ~Defines.SVF_NOCLIENT;
86 ent.solid = Defines.SOLID_TRIGGER;
87 gameExports.gameImports.linkentity(ent);
88
89 // send an effect
90 ent.s.event = Defines.EV_ITEM_RESPAWN;
91
92 return false;
93 }
94 };
95 static EntInteractAdapter Pickup_Pack = new EntInteractAdapter() {
96 public String getID() { return "pickup_pack";}

Callers

nothing calls this directly

Calls 11

randMethod · 0.95
SetRespawnMethod · 0.95
VectorAddMethod · 0.95
vtosMethod · 0.95
VectorCopyMethod · 0.95
freeEntityMethod · 0.80
linkentityMethod · 0.65
setmodelMethod · 0.65
traceMethod · 0.65
dprintfMethod · 0.65
getOwnerMethod · 0.45

Tested by

no test coverage detected