(SubgameEntity ent, GameExportsImpl gameExports)
| 364 | public static EntThinkAdapter M_droptofloor = new EntThinkAdapter() { |
| 365 | public String getID() { return "m_drop_to_floor";} |
| 366 | public boolean think(SubgameEntity ent, GameExportsImpl gameExports) { |
| 367 | float[] end = { 0, 0, 0 }; |
| 368 | trace_t trace; |
| 369 | |
| 370 | ent.s.origin[2] += 1; |
| 371 | Math3D.VectorCopy(ent.s.origin, end); |
| 372 | end[2] -= 256; |
| 373 | |
| 374 | trace = gameExports.gameImports.trace(ent.s.origin, ent.mins, ent.maxs, end, |
| 375 | ent, Defines.MASK_MONSTERSOLID); |
| 376 | |
| 377 | if (trace.fraction == 1 || trace.allsolid) |
| 378 | return true; |
| 379 | |
| 380 | Math3D.VectorCopy(trace.endpos, ent.s.origin); |
| 381 | |
| 382 | gameExports.gameImports.linkentity(ent); |
| 383 | M.M_CheckGround(ent, gameExports); |
| 384 | setWaterLevel(ent, gameExports); |
| 385 | return true; |
| 386 | } |
| 387 | }; |
| 388 | |
| 389 | public static void M_SetEffects(SubgameEntity ent, float time) { |
no test coverage detected