diff options
Diffstat (limited to 'src/jake2/qcommon')
-rw-r--r-- | src/jake2/qcommon/Cvar.java | 15 | ||||
-rw-r--r-- | src/jake2/qcommon/FS.java | 9 | ||||
-rw-r--r-- | src/jake2/qcommon/Q2DataDialog.java | 12 | ||||
-rw-r--r-- | src/jake2/qcommon/Qcommon.java | 6 |
4 files changed, 27 insertions, 15 deletions
diff --git a/src/jake2/qcommon/Cvar.java b/src/jake2/qcommon/Cvar.java index d14cadd..c0aa6ab 100644 --- a/src/jake2/qcommon/Cvar.java +++ b/src/jake2/qcommon/Cvar.java @@ -2,7 +2,7 @@ * Cvar.java * Copyright (C) 2003 * - * $Id: Cvar.java,v 1.7 2005-02-08 18:00:02 cawe Exp $ + * $Id: Cvar.java,v 1.8 2005-05-26 16:56:32 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -294,10 +294,21 @@ public class Cvar extends Globals { /* * ============ Cvar_SetValue ============ */ - public static void SetValue(String var_name, float value) { + // the overloading is very important + // there was a problem with networt "rate" string + // 10000 became "10000.0" and that wasn't right + public static void SetValue(String var_name, int value) { Cvar.Set(var_name, "" + value); } + public static void SetValue(String var_name, float value) { + if (value == (int)value) { + Cvar.Set(var_name, "" + (int)value); + } else { + Cvar.Set(var_name, "" + value); + } + } + /* * ============ Cvar_VariableValue ============ */ diff --git a/src/jake2/qcommon/FS.java b/src/jake2/qcommon/FS.java index b4fe7eb..0bea72b 100644 --- a/src/jake2/qcommon/FS.java +++ b/src/jake2/qcommon/FS.java @@ -2,7 +2,7 @@ * FS.java * Copyright (C) 2003 * - * $Id: FS.java,v 1.13 2005-05-20 15:05:54 cawe Exp $ + * $Id: FS.java,v 1.14 2005-05-26 16:56:32 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -659,14 +659,11 @@ public final class FS extends Globals { * ExecAutoexec */ public static void ExecAutoexec() { + String dir = fs_userdir; - String dir; String name; - - dir = Cvar.VariableString("gamedir"); - if (dir != null && dir.length() > 0) { - name = fs_basedir.string + '/' + dir + "/autoexec.cfg"; + name = dir + "/autoexec.cfg"; } else { name = fs_basedir.string + '/' + Globals.BASEDIRNAME + "/autoexec.cfg"; diff --git a/src/jake2/qcommon/Q2DataDialog.java b/src/jake2/qcommon/Q2DataDialog.java index 16c1bf5..2d28629 100644 --- a/src/jake2/qcommon/Q2DataDialog.java +++ b/src/jake2/qcommon/Q2DataDialog.java @@ -2,7 +2,7 @@ * Q2DataDialog.java * Copyright (C) 2003 * - * $Id: Q2DataDialog.java,v 1.13 2005-05-12 12:52:50 hzi Exp $ + * $Id: Q2DataDialog.java,v 1.14 2005-05-26 16:56:32 hzi Exp $ */ package jake2.qcommon; @@ -35,7 +35,7 @@ public class Q2DataDialog extends javax.swing.JDialog { int x = (mode.getWidth() - getWidth()) / 2; int y = (mode.getHeight() - getHeight()) / 2; setLocation(x, y); - dir = home + sep + "jake2" + sep + "baseq2"; + dir = home + sep + "Jake2" + sep + "baseq2"; jTextField1.setText(dir); } @@ -183,7 +183,7 @@ public class Q2DataDialog extends javax.swing.JDialog { } private void okButtonActionPerformed(java.awt.event.ActionEvent evt) { - + dir = jTextField1.getText(); if (dir != null) { Cvar.Set("cddir", dir); FS.setCDDir(); @@ -227,7 +227,7 @@ public class Q2DataDialog extends javax.swing.JDialog { private InstallPanel installPanel; private NotFoundPanel notFoundPanel; private JLabel status; - private javax.swing.JTextField jTextField1; + javax.swing.JTextField jTextField1; private javax.swing.JButton okButton; // End of variables declaration//GEN-END:variables @@ -441,7 +441,7 @@ public class Q2DataDialog extends javax.swing.JDialog { public InstallPanel(Q2DataDialog d) { initComponents(); - String dir = Q2DataDialog.home + Q2DataDialog.sep + "jake2"; + String dir = Q2DataDialog.home + Q2DataDialog.sep + "Jake2"; destDir.setText(dir); initMirrors(); parent = d; @@ -760,7 +760,7 @@ public class Q2DataDialog extends javax.swing.JDialog { void endInstall(String message) { parent.notFoundPanel.message.setText(message); - parent.dir = destDir + "/baseq2"; + parent.jTextField1.setText(destDir + "/baseq2"); parent.showChooseDialog(); parent.okButtonActionPerformed(null); } diff --git a/src/jake2/qcommon/Qcommon.java b/src/jake2/qcommon/Qcommon.java index ed81b71..1035b73 100644 --- a/src/jake2/qcommon/Qcommon.java +++ b/src/jake2/qcommon/Qcommon.java @@ -2,7 +2,7 @@ * Qcommon.java * Copyright 2003 * - * $Id: Qcommon.java,v 1.16 2005-05-14 10:10:45 hzi Exp $ + * $Id: Qcommon.java,v 1.17 2005-05-26 16:56:32 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -246,6 +246,10 @@ public final class Qcommon extends Globals { Cbuf.AddText("exec default.cfg\n"); Cbuf.AddText("bind MWHEELUP weapnext\n"); Cbuf.AddText("bind MWHEELDOWN weapprev\n"); + Cbuf.AddText("bind w +forward\n"); + Cbuf.AddText("bind s +back\n"); + Cbuf.AddText("bind a +moveleft\n"); + Cbuf.AddText("bind d +moveright\n"); Cbuf.Execute(); Cvar.Set("vid_fullscreen", "0"); Cbuf.AddText("exec config.cfg\n"); |