Giter VIP home page Giter VIP logo

jasdk_modbase's People

Contributors

dionrhys avatar ensiform avatar razish avatar redsaurus avatar thesil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jasdk_modbase's Issues

force regen bug: saber throw

related to the g_forceRegenTime framerate-independent fix

throw saber, takes away 50 force points
saber returns, all your force replenishes.

Ragnos crash

Infamous client-side Ragnos crash, related to G2 bones.

0x4DFAF9 related

Userinfo being set/changed twice when connecting

Cause seems to be saber1/saber2 fields not being properly read from userinfo in ClientUserinfoChanged.
Instead, ClientUserinfoChanged reads from session data (Which is not valid on the first connection) so saber1/saber2 will be treated as "Kyle" and "none" respectively
Saber-related session data is set in ClientBegin.

Recommended fix: Moving saber data out of session data and into client persistent data?
ClientUserinfoChanged should read from userinfo and set persistent data
ClientBegin should read values from client persistent data, not session.

Consolidate weapon data, general cleanup

damage/velocity defines in g_weapon.c -> (b?)g_weapons.h
could generalise weapons, e.g. fire(), alt_fire(), damage, velocity?
remove unused/commented code for: gauntlet, lightning gun, powerups, railgun..

Cmd_LevelShot_f is derp.

void Cmd_LevelShot_f(gentity_t *ent)
{
    if(!ent->client->pers.localClient)
    {
        trap_SendServerCommand(ent-g_entities,
            "print \"The levelshot command must be executed by a local client\n\"");
        return;
    }

    if(!CheatsOk(ent))
        return;

    // doesn't work in single player
    if(g_gametype.integer == GT_SINGLE_PLAYER)
    {
        trap_SendServerCommand(ent-g_entities,
            "print \"Must not be in singleplayer mode for levelshot\n\"" );
        return;
    }

    BeginIntermission();
    trap_SendServerCommand(ent-g_entities, "clientLevelShot");
}

ClientCommand rewrite

  1. Remove leftover/broken debug commands?
  2. Hash table for commands to drastically shrink code and speed up command execution

Add chat token support for /say cmds

Add chat token support for say cmds.

Perhaps something more like:
$h - health
$a - armor
$f - force pool
$g - ammo in current weapon
$n - name
$s - force side
$l (L not I) - location
$d - last death location
$c - team color (red,blue,free,spectator)
$t - team name (^1Red Team, ^4Blue Team, ^3Free, Spectator)
$e - enemy team color(blue,red,free,spectator)
$w - current weapon name
$i - player id
$h - siege class name
$o - current held flag in ctf

Open for other styles, we used this method in ETF, even allowed $r to show reader name. I used a different method in EnsiMod though. More along the lines of:
[h] [a] [f] [g] [n] [s] [l] [d] [c] [t] [e] [w] [id] [cl] [o]

EF_DISINTEGRATION rendering bug

When EF_DISINTEGRATION (e.g. hit with a fully charged disruptor shot) is set on a client performing a special move (notably staff saber butterfly) their disintegrating body will move quickly in a (random?) direction.

Fix entitylist command to not skip client-0 and add missing types.

/*
===================
Svcmd_EntityList_f
===================
*/
void    Svcmd_EntityList_f (void) {
    int         e;
    gentity_t       *check;

    check = g_entities;
    for (e = 0; e < level.num_entities ; e++, check++) {
        if ( !check->inuse ) {
            continue;
        }
        G_Printf("%3i:", e);
        switch ( check->s.eType ) {
        case ET_GENERAL:
            G_Printf("ET_GENERAL          ");
            break;
        case ET_PLAYER:
            G_Printf("ET_PLAYER           ");
            break;
        case ET_ITEM:
            G_Printf("ET_ITEM             ");
            break;
        case ET_MISSILE:
            G_Printf("ET_MISSILE          ");
            break;
        case ET_SPECIAL:
            G_Printf("ET_SPECIAL          ");
            break;
        case ET_HOLOCRON:
            G_Printf("ET_HOLOCRON         ");
            break;
        case ET_MOVER:
            G_Printf("ET_MOVER            ");
            break;
        case ET_BEAM:
            G_Printf("ET_BEAM             ");
            break;
        case ET_PORTAL:
            G_Printf("ET_PORTAL           ");
            break;
        case ET_SPEAKER:
            G_Printf("ET_SPEAKER          ");
            break;
        case ET_PUSH_TRIGGER:
            G_Printf("ET_PUSH_TRIGGER     ");
            break;
        case ET_TELEPORT_TRIGGER:
            G_Printf("ET_TELEPORT_TRIGGER ");
            break;
        case ET_INVISIBLE:
            G_Printf("ET_INVISIBLE        ");
            break;
        case ET_NPC:
            G_Printf("ET_NPC              ");
            break;
        case ET_BODY:
            G_Printf("ET_BODY             ");
            break;
        case ET_TERRAIN:
            G_Printf("ET_TERRAIN          ");
            break;
        case ET_FX:
            G_Printf("ET_FX               ");
            break;
        default:
            G_Printf("%-3i                ", check->s.eType);
            break;
        }

        if ( check->classname ) {
            G_Printf("%s", check->classname);
        }
        G_Printf("\n");
    }
}

Also correctly left justifies the default case instead of right justify.

Missing functions/files cleanup

missing functions: PrecacheItem, TossClientCubes, SetRespawn, ArmorIndex, Think_Weapon, UseHoldableItem, CheckGauntletAttack, [...]
missile files: p_hud.c, g_pweapon.c, [...]
unnecessary extern keyword usage everywhere

charge_stick possible minor bug

self->s.pos.trDelta[0] += vNor[0]*(tN[0]*(((float)Q_irand(1, 10))*0.1));
self->s.pos.trDelta[1] += vNor[1]*(tN[1]*(((float)Q_irand(1, 10))*0.1));
self->s.pos.trDelta[2] += vNor[1]*(tN[2]*(((float)Q_irand(1, 10))*0.1));

specifically vNor[1] usage
need to investigate further

Usage info cleanup for g_svcmds.c

G_Printf("Usage: addip <ip-mask>\n");
G_Printf("Usage: removeip <ip-mask>\n");

Add this to forceteam:

    if ( trap_Argc() < 3 ) {
        G_Printf("Usage: forceteam <player> <team>\n");
        return;
    }

donedl exploit

Results in disappearing powerups and other client data (JA+ grapple etc)

Issue lies in ClientBegin being called without a chance for player_die to be called.
Has been hooked on windows and linux servers, but we've yet to determine a way to check if it is valid use of the command. Could just always block on some servers but this is not an ideal fix.

Could check if they have an active download (cl->download?), if they've already been in the game, etc.

Another "fix" is to call player_die from ClientBegin in under certain conditions.
This is not ideal, and may be error-prone.
Waiting on @TheSil for some experimenting

    //assign the pointer for bg entity access
    ent->playerState = &ent->client->ps;

    //fix for donedl command bug, that could cause powerup dissapearing
    if ( ent->health && ent->client && ent->client->sess.sessionTeam != TEAM_SPECTATOR
        && clientNum == ent->client->ps.clientNum) {
        // Kill him (makes sure he loses flags, etc)
        ent->flags &= ~FL_GODMODE;
        ent->client->ps.stats[STAT_HEALTH] = ent->health = 0;
        g_dontPenalizeTeam = qtrue;
        player_die( ent, ent, ent, 100000, MOD_TEAM_CHANGE );
        g_dontPenalizeTeam = qfalse;
    }

Alt Attack should cycle backwards through specs (if already following only)

Code to do this: (SpectatorThink g_active.c)

        /* the regular attack button check is here don't include this line */

        // alt attack button cycles through spectators
        if ( client->sess.spectatorState == SPECTATOR_FOLLOW ) {
            if ( ( client->buttons & BUTTON_ALT_ATTACK ) && ! ( client->oldbuttons & BUTTON_ALT_ATTACK ) ) {
                Cmd_FollowCycle_f( ent, -1 );
            }
        }

        /* the jump button check is here don't include this line */

We check for is already following because JKA has the speed mode when in free flight.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.