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

Method SV_RunThink

game/src/main/java/jake2/game/SV.java:80–97  ·  view source on GitHub ↗

Runs thinking code for this frame if necessary.

(SubgameEntity ent, GameExportsImpl gameExports)

Source from the content-addressed store, hash-verified

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.

Callers 5

SV_Physics_PusherMethod · 0.95
SV_Physics_NoneMethod · 0.95
SV_Physics_NoclipMethod · 0.95
SV_Physics_TossMethod · 0.95
SV_Physics_StepMethod · 0.95

Calls 2

errorMethod · 0.65
thinkMethod · 0.45

Tested by

no test coverage detected