From: Rene S. <sa...@us...> - 2005-11-16 22:25:02
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13343/src/jake2/client Modified Files: M.java Log Message: sorted the methods according to their original locations in the c files. Index: M.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/M.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** M.java 7 Oct 2004 14:13:07 -0000 1.6 --- M.java 16 Nov 2005 22:24:53 -0000 1.7 *************** *** 50,54 **** } ! // if the hull point one-quarter unit down is solid the entity is on // ground point[0] = ent.s.origin[0]; --- 50,54 ---- } ! // if the hull point one-quarter unit down is solid the entity is on // ground point[0] = ent.s.origin[0]; *************** *** 65,72 **** } ! // ent.groundentity = trace.ent; ! // ent.groundentity_linkcount = trace.ent.linkcount; ! // if (!trace.startsolid && !trace.allsolid) ! // VectorCopy (trace.endpos, ent.s.origin); if (!trace.startsolid && !trace.allsolid) { Math3D.VectorCopy(trace.endpos, ent.s.origin); --- 65,72 ---- } ! // ent.groundentity = trace.ent; ! // ent.groundentity_linkcount = trace.ent.linkcount; ! // if (!trace.startsolid && !trace.allsolid) ! // VectorCopy (trace.endpos, ent.s.origin); if (!trace.startsolid && !trace.allsolid) { Math3D.VectorCopy(trace.endpos, ent.s.origin); *************** *** 145,150 **** /* ! * =============== M_ChangeYaw ! * * =============== *///ok --- 145,150 ---- /* ! * =============== ! * M_ChangeYaw * =============== *///ok *************** *** 182,187 **** /* ! * ====================== M_MoveToGoal ====================== ! */// ok public static void M_MoveToGoal(edict_t ent, float dist) { edict_t goal = ent.goalentity; --- 182,189 ---- /* ! * ====================== ! * M_MoveToGoal ! * ====================== ! */ public static void M_MoveToGoal(edict_t ent, float dist) { edict_t goal = ent.goalentity; *************** *** 204,208 **** /* ! * =============== M_walkmove =============== */ public static boolean M_walkmove(edict_t ent, float yaw, float dist) { --- 206,212 ---- /* ! * =============== ! * M_walkmove ! * =============== */ public static boolean M_walkmove(edict_t ent, float yaw, float dist) { *************** *** 268,272 **** if (dmg > 15) dmg = 15; ! GameUtil.T_Damage(ent, GameBase.g_edicts[0], GameBase.g_edicts[0], Globals.vec3_origin, ent.s.origin, Globals.vec3_origin, dmg, 0, --- 272,276 ---- if (dmg > 15) dmg = 15; ! GameCombat.T_Damage(ent, GameBase.g_edicts[0], GameBase.g_edicts[0], Globals.vec3_origin, ent.s.origin, Globals.vec3_origin, dmg, 0, *************** *** 285,289 **** if (dmg > 15) dmg = 15; ! GameUtil.T_Damage(ent, GameBase.g_edicts[0], GameBase.g_edicts[0], Globals.vec3_origin, ent.s.origin, Globals.vec3_origin, dmg, 0, --- 289,293 ---- if (dmg > 15) dmg = 15; ! GameCombat.T_Damage(ent, GameBase.g_edicts[0], GameBase.g_edicts[0], Globals.vec3_origin, ent.s.origin, Globals.vec3_origin, dmg, 0, *************** *** 309,313 **** if (ent.damage_debounce_time < GameBase.level.time) { ent.damage_debounce_time = GameBase.level.time + 0.2f; ! GameUtil.T_Damage(ent, GameBase.g_edicts[0], GameBase.g_edicts[0], Globals.vec3_origin, ent.s.origin, Globals.vec3_origin, 10 * ent.waterlevel, --- 313,317 ---- if (ent.damage_debounce_time < GameBase.level.time) { ent.damage_debounce_time = GameBase.level.time + 0.2f; ! GameCombat.T_Damage(ent, GameBase.g_edicts[0], GameBase.g_edicts[0], Globals.vec3_origin, ent.s.origin, Globals.vec3_origin, 10 * ent.waterlevel, *************** *** 319,323 **** if (ent.damage_debounce_time < GameBase.level.time) { ent.damage_debounce_time = GameBase.level.time + 1; ! GameUtil.T_Damage(ent, GameBase.g_edicts[0], GameBase.g_edicts[0], Globals.vec3_origin, ent.s.origin, Globals.vec3_origin, 4 * ent.waterlevel, --- 323,327 ---- if (ent.damage_debounce_time < GameBase.level.time) { ent.damage_debounce_time = GameBase.level.time + 1; ! GameCombat.T_Damage(ent, GameBase.g_edicts[0], GameBase.g_edicts[0], Globals.vec3_origin, ent.s.origin, Globals.vec3_origin, 4 * ent.waterlevel, *************** *** 449,525 **** } - public static void M_ReactToDamage(edict_t targ, edict_t attacker) { - if ((null != attacker.client) - && 0 != (attacker.svflags & Defines.SVF_MONSTER)) - return; - - if (attacker == targ || attacker == targ.enemy) - return; - - // if we are a good guy monster and our attacker is a player - // or another good guy, do not get mad at them - if (0 != (targ.monsterinfo.aiflags & Defines.AI_GOOD_GUY)) { - if (attacker.client != null - || (attacker.monsterinfo.aiflags & Defines.AI_GOOD_GUY) != 0) - return; - } - - // we now know that we are not both good guys - - // if attacker is a client, get mad at them because he's good and we're - // not - if (attacker.client != null) { - targ.monsterinfo.aiflags &= ~Defines.AI_SOUND_TARGET; - - // this can only happen in coop (both new and old enemies are - // clients) - // only switch if can't see the current enemy - if (targ.enemy != null && targ.enemy.client != null) { - if (GameUtil.visible(targ, targ.enemy)) { - targ.oldenemy = attacker; - return; - } - targ.oldenemy = targ.enemy; - } - targ.enemy = attacker; - if (0 == (targ.monsterinfo.aiflags & Defines.AI_DUCKED)) - GameUtil.FoundTarget(targ); - return; - } - - // it's the same base (walk/swim/fly) type and a different classname and - // it's not a tank - // (they spray too much), get mad at them - if (((targ.flags & (Defines.FL_FLY | Defines.FL_SWIM)) == (attacker.flags & (Defines.FL_FLY | Defines.FL_SWIM))) - && (!(targ.classname.equals(attacker.classname))) - && (!(attacker.classname.equals("monster_tank"))) - && (!(attacker.classname.equals("monster_supertank"))) - && (!(attacker.classname.equals("monster_makron"))) - && (!(attacker.classname.equals("monster_jorg")))) { - if (targ.enemy != null && targ.enemy.client != null) - targ.oldenemy = targ.enemy; - targ.enemy = attacker; - if (0 == (targ.monsterinfo.aiflags & Defines.AI_DUCKED)) - GameUtil.FoundTarget(targ); - } - // if they *meant* to shoot us, then shoot back - else if (attacker.enemy == targ) { - if (targ.enemy != null && targ.enemy.client != null) - targ.oldenemy = targ.enemy; - targ.enemy = attacker; - if (0 == (targ.monsterinfo.aiflags & Defines.AI_DUCKED)) - GameUtil.FoundTarget(targ); - } - // otherwise get mad at whoever they are mad at (help our buddy) unless - // it is us! - else if (attacker.enemy != null && attacker.enemy != targ) { - if (targ.enemy != null && targ.enemy.client != null) - targ.oldenemy = targ.enemy; - targ.enemy = attacker.enemy; - if (0 == (targ.monsterinfo.aiflags & Defines.AI_DUCKED)) - GameUtil.FoundTarget(targ); - } - } - /** Stops the Flies. */ public static EntThinkAdapter M_FliesOff = new EntThinkAdapter() { --- 453,456 ---- |