Com.dprintln(String) -> slf4j
This commit is contained in:
@@ -316,7 +316,7 @@ public class CL_parse {
|
||||
// game directory
|
||||
str = MSG.ReadString(Globals.net_message);
|
||||
Globals.cl.gamedir = str;
|
||||
Com.dprintln("gamedir=" + str);
|
||||
log.debug("gamedir={}", str);
|
||||
|
||||
// set gamedir
|
||||
if (str.length() > 0
|
||||
@@ -329,10 +329,10 @@ public class CL_parse {
|
||||
|
||||
// parse player entity number
|
||||
Globals.cl.playernum = MSG.ReadShort(Globals.net_message);
|
||||
Com.dprintln("numplayers=" + Globals.cl.playernum);
|
||||
log.debug("numplayers=", Globals.cl.playernum);
|
||||
// get the full level name
|
||||
str = MSG.ReadString(Globals.net_message);
|
||||
Com.dprintln("levelname=" + str);
|
||||
log.debug("levelname={}", str);
|
||||
|
||||
if (Globals.cl.playernum == -1) { // playing a cinematic or showing a
|
||||
// pic, not a level
|
||||
|
||||
@@ -635,7 +635,7 @@ public final class Cmd {
|
||||
s = Cmd.Args();
|
||||
|
||||
it = GameItems.FindItem(s);
|
||||
Com.dprintln("using:" + s);
|
||||
log.debug("using:{}", s);
|
||||
if (it == null) {
|
||||
SV_GAME.PF_cprintfhigh(ent, "unknown item: " + s + "\n");
|
||||
return;
|
||||
|
||||
@@ -244,7 +244,7 @@ public class GameItems {
|
||||
if (!taken)
|
||||
return;
|
||||
|
||||
Com.dprintln("Picked up:" + ent.classname);
|
||||
log.debug("Picked up:{}", ent.classname);
|
||||
|
||||
if (!((GameBase.coop.value != 0) && (ent.item.flags & Defines.IT_STAY_COOP) != 0)
|
||||
|| 0 != (ent.spawnflags & (Defines.DROPPED_ITEM | Defines.DROPPED_PLAYER_ITEM))) {
|
||||
|
||||
@@ -467,7 +467,7 @@ public class GameSpawn {
|
||||
public static void SpawnEntities(String mapname, String entities,
|
||||
String spawnpoint) {
|
||||
|
||||
Com.dprintln("SpawnEntities(), mapname=" + mapname);
|
||||
log.debug("SpawnEntities(), mapname={}", mapname);
|
||||
edict_t ent;
|
||||
int inhibit;
|
||||
String com_token;
|
||||
|
||||
@@ -346,7 +346,7 @@ public class edict_t {
|
||||
|
||||
if (key.equals("team")) {
|
||||
team = GameSpawn.ED_NewString(value);
|
||||
Com.dprintln("Monster Team:" + team);
|
||||
log.debug("Monster Team: {}", team);
|
||||
return true;
|
||||
} // F_LSTRING),
|
||||
|
||||
|
||||
@@ -779,9 +779,9 @@ public class CM {
|
||||
for (; x < l.filelen && cmod_base[x + l.fileofs] != 0; x++);
|
||||
|
||||
map_entitystring = new String(cmod_base, l.fileofs, x).trim();
|
||||
Com.dprintln("entitystring=" + map_entitystring.length() +
|
||||
" bytes, [" + map_entitystring.substring(0, Math.min (
|
||||
map_entitystring.length(), 15)) + "...]" );
|
||||
log.debug("entitystring={} bytes, [{}...]",
|
||||
map_entitystring.length(),
|
||||
map_entitystring.substring(0, Math.min (map_entitystring.length(), 15)));
|
||||
}
|
||||
|
||||
/** Returns the model with a given id "*" + <number> */
|
||||
|
||||
@@ -303,25 +303,11 @@ public final class Com {
|
||||
}
|
||||
}
|
||||
|
||||
public static void dprintln(String fmt)
|
||||
{
|
||||
DPrintf(_debugContext + fmt + "\n", null);
|
||||
}
|
||||
|
||||
public static void Printf(String fmt)
|
||||
{
|
||||
Printf(_debugContext + fmt, null);
|
||||
}
|
||||
|
||||
public static void DPrintf(String fmt, Vargs vargs)
|
||||
{
|
||||
if (Globals.developer == null || Globals.developer.value == 0)
|
||||
return; // don't confuse non-developers with techie stuff...
|
||||
_debugContext = debugContext;
|
||||
Printf(fmt, vargs);
|
||||
_debugContext="";
|
||||
}
|
||||
|
||||
/** Prints out messages, which can also be redirected to a remote client. */
|
||||
public static void Printf(String fmt, Vargs vargs)
|
||||
{
|
||||
|
||||
@@ -18,12 +18,14 @@
|
||||
|
||||
package lwjake2.qcommon;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import lwjake2.Globals;
|
||||
import lwjake2.game.entity_state_t;
|
||||
import lwjake2.game.usercmd_t;
|
||||
import lwjake2.util.Lib;
|
||||
import lwjake2.util.Math3D;
|
||||
|
||||
@Slf4j
|
||||
public class MSG extends Globals {
|
||||
|
||||
//
|
||||
@@ -493,7 +495,7 @@ public class MSG extends Globals {
|
||||
} while (l < 2047);
|
||||
|
||||
String ret = new String(readbuf, 0, l).trim();
|
||||
Com.dprintln("MSG.ReadStringLine:[" + ret.replace('\0', '@') + "]");
|
||||
log.debug("MSG.ReadStringLine:[{}]", ret.replace('\0', '@'));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,12 +18,14 @@
|
||||
|
||||
package lwjake2.qcommon;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import lwjake2.Defines;
|
||||
import lwjake2.util.Lib;
|
||||
|
||||
/**
|
||||
* SZ
|
||||
*/
|
||||
@Slf4j
|
||||
public final class SZ {
|
||||
|
||||
public static void Clear(sizebuf_t buf) {
|
||||
@@ -82,7 +84,7 @@ public final class SZ {
|
||||
|
||||
//
|
||||
public static void Print(sizebuf_t buf, String data) {
|
||||
Com.dprintln("SZ.print():<" + data + ">" );
|
||||
log.debug("SZ.print():<{}>", data);
|
||||
int length = data.length();
|
||||
byte str[] = Lib.stringToBytes(data);
|
||||
|
||||
|
||||
@@ -476,7 +476,7 @@ public class SV_USER {
|
||||
*/
|
||||
public static void SV_ExecuteUserCommand(String s) {
|
||||
|
||||
Com.dprintln("SV_ExecuteUserCommand:" + s );
|
||||
log.debug("SV_ExecuteUserCommand:{}", s);
|
||||
SV_USER.ucmd_t u = null;
|
||||
|
||||
Cmd.TokenizeString(s.toCharArray(), true);
|
||||
|
||||
Reference in New Issue
Block a user