Runs thinking code for this frame if necessary.
(SubgameEntity ent, GameExportsImpl gameExports)
| 78 | * Runs thinking code for this frame if necessary. |
| 79 | */ |
| 80 | private static boolean SV_RunThink(SubgameEntity ent, GameExportsImpl gameExports) { |
| 81 | float thinktime; |
| 82 | |
| 83 | thinktime = ent.think.nextTime; |
| 84 | if (thinktime <= 0) |
| 85 | return true; |
| 86 | if (thinktime > gameExports.level.time + 0.001) |
| 87 | return true; |
| 88 | |
| 89 | ent.think.nextTime = 0; |
| 90 | |
| 91 | if (ent.think.action == null) |
| 92 | gameExports.gameImports.error(Defines.ERR_FATAL, "ent.think == null"); |
| 93 | |
| 94 | ent.think.action.think(ent, gameExports); |
| 95 | |
| 96 | return false; |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * Two entities have touched, so run their touch functions. |
no test coverage detected