Search in sources :

Example 26 with Vargs

use of jake2.util.Vargs in project narchy by automenta.

the class SV_CCMDS method SV_Status_f.

/*
	================
	SV_Status_f
	================
	*/
public static void SV_Status_f() {
    int i, j, l;
    client_t cl;
    String s;
    int ping;
    if (SV_INIT.svs.clients == null) {
        Com.Printf("No server running.\n");
        return;
    }
    Com.Printf("map              : " + SV_INIT.sv.name + '\n');
    Com.Printf("num score ping name            lastmsg address               qport \n");
    Com.Printf("--- ----- ---- --------------- ------- --------------------- ------\n");
    for (i = 0; i < SV_MAIN.maxclients.value; i++) {
        cl = SV_INIT.svs.clients[i];
        if (0 == cl.state)
            continue;
        Com.Printf("%3i ", new Vargs().add(i));
        Com.Printf("%5i ", new Vargs().add(cl.edict.client.ps.stats[Defines.STAT_FRAGS]));
        if (cl.state == Defines.cs_connected)
            Com.Printf("CNCT ");
        else if (cl.state == Defines.cs_zombie)
            Com.Printf("ZMBI ");
        else {
            ping = cl.ping < 9999 ? cl.ping : 9999;
            Com.Printf("%4i ", new Vargs().add(ping));
        }
        Com.Printf("%s", new Vargs().add(cl.name));
        l = 16 - cl.name.length();
        for (j = 0; j < l; j++) Com.Printf(" ");
        Com.Printf("%7i ", new Vargs().add(SV_INIT.svs.realtime - cl.lastmessage));
        s = NET.AdrToString(cl.netchan.remote_address);
        Com.Printf(s);
        l = 22 - s.length();
        for (j = 0; j < l; j++) Com.Printf(" ");
        Com.Printf("%5i", new Vargs().add(cl.netchan.qport));
        Com.Printf("\n");
    }
    Com.Printf("\n");
}
Also used : Vargs(jake2.util.Vargs)

Aggregations

Vargs (jake2.util.Vargs)26 IOException (java.io.IOException)3 jake2.render.image_t (jake2.render.image_t)2 jake2.sound.sfx_t (jake2.sound.sfx_t)1 jake2.sound.sfxcache_t (jake2.sound.sfxcache_t)1 QuakeFile (jake2.util.QuakeFile)1 FileNotFoundException (java.io.FileNotFoundException)1 FileWriter (java.io.FileWriter)1 ByteBuffer (java.nio.ByteBuffer)1 Calendar (java.util.Calendar)1