diff options
Diffstat (limited to 'src/jake2/game/GameAIAdapters.java')
-rw-r--r-- | src/jake2/game/GameAIAdapters.java | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/jake2/game/GameAIAdapters.java b/src/jake2/game/GameAIAdapters.java index 465e4a3..ea20995 100644 --- a/src/jake2/game/GameAIAdapters.java +++ b/src/jake2/game/GameAIAdapters.java @@ -19,12 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Created on 26.02.2004 by RST. -// $Id: GameAIAdapters.java,v 1.2 2004-07-08 20:24:29 hzi Exp $ +// $Id: GameAIAdapters.java,v 1.1 2004-07-08 15:58:44 hzi Exp $ package jake2.game; import jake2.Defines; -import jake2.Globals; import jake2.client.M; import jake2.qcommon.Com; import jake2.util.*; @@ -254,11 +253,11 @@ public class GameAIAdapters if (self.monsterinfo.idle_time != 0) { self.monsterinfo.search.think(self); - self.monsterinfo.idle_time = GameBase.level.time + 15 + Globals.rnd.nextFloat() * 15; + self.monsterinfo.idle_time = GameBase.level.time + 15 + Lib.random() * 15; } else { - self.monsterinfo.idle_time = GameBase.level.time + Globals.rnd.nextFloat() * 15; + self.monsterinfo.idle_time = GameBase.level.time + Lib.random() * 15; } } } @@ -315,11 +314,11 @@ public class GameAIAdapters if (self.monsterinfo.idle_time != 0) { self.monsterinfo.idle.think(self); - self.monsterinfo.idle_time = GameBase.level.time + 15 + Globals.rnd.nextFloat() * 15; + self.monsterinfo.idle_time = GameBase.level.time + 15 + Lib.random() * 15; } else { - self.monsterinfo.idle_time = GameBase.level.time + Globals.rnd.nextFloat() * 15; + self.monsterinfo.idle_time = GameBase.level.time + Lib.random() * 15; } } } @@ -847,14 +846,12 @@ public class GameAIAdapters trace_t tr; float[] dest = { 0, 0, 0 }; - //float v[]; + float v[]; - //v = Lib.tv(-15, -15, -15); - //Math3D.VectorCopy(v, ent.mins); - ent.mins[0] = ent.mins[1] = ent.mins[2] = -15; - //v = Lib.tv(15, 15, 15); - //Math3D.VectorCopy(v, ent.maxs); - ent.maxs[0] = ent.maxs[1] = ent.maxs[2] = 15; + v = Lib.tv(-15, -15, -15); + Math3D.VectorCopy(v, ent.mins); + v = Lib.tv(15, 15, 15); + Math3D.VectorCopy(v, ent.maxs); if (ent.model != null) GameBase.gi.setmodel(ent, ent.model); @@ -864,7 +861,7 @@ public class GameAIAdapters ent.movetype = Defines.MOVETYPE_TOSS; ent.touch = GameUtilAdapters.Touch_Item; - float v[] = {0, 0, -128}; + v = Lib.tv(0, 0, -128); Math3D.VectorAdd(ent.s.origin, v, dest); tr = GameBase.gi.trace(ent.s.origin, ent.mins, ent.maxs, dest, ent, Defines.MASK_SOLID); @@ -921,7 +918,7 @@ public class GameAIAdapters if (self.s.frame == 10) { self.think = GameUtilAdapters.G_FreeEdictA; - self.nextthink = GameBase.level.time + 8 + Globals.rnd.nextFloat() * 10; + self.nextthink = GameBase.level.time + 8 + Lib.random() * 10; } return true; } |