(SubgameEntity ent, GameExportsImpl gameExports)
| 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";} |
nothing calls this directly
no test coverage detected