rtcw vs ET dead viewangles - question


(brugal) #1

One of the nice features/bugs of rtcw is that players will often turn really sharply when they are killed. It’s one of the reasons I like rtcw frag videos better than ET ones. Killing someone in rtcw is more “dramatic.” The player snapping is really nice feedback.

In addition to the rate of fire, of course, it’s this that makes rtcw seem much faster to me. In ET, even with b_wolfrof, the fights seem to drag on – “Oh, he’s finally dead.”

Anyway, I was trying to re-implement the bug:

game/g_combat.c


void player_die(...) {
...
        //self->s.angles[2] = 0;
        self->s.powerups = 0;
        self->s.loopSound = 0;
        
        self->client->limboDropWeapon = self->s.weapon; // store this so it can be dropped in limbo

    if (g_rtcw_deathAngles.integer == 1) {
        self->s.angles[2] = 0;
        LookAtKiller (self, inflictor, attacker);
        VectorCopy (self->s.angles, self->client->ps.viewangles);
        trap_UnlinkEntity (self);
    } else {
        LookAtKiller( self, inflictor, attacker );
        self->client->ps.viewangles[0] = 0;
        self->client->ps.viewangles[2] = 0;
        //VectorCopy( self->s.angles, self->client->ps.viewangles );
    }

game/bg_pmove.c


#ifdef GAMEDLL
extern vmCvar_t g_rtcw_deathAngles;
#endif

void PM_UpdateViewAngles(...) {
...
        if ( ps->pm_type != PM_SPECTATOR && ps->stats[STAT_HEALTH] <= 0 ) {

                // DHM - Nerve :: Allow players to look around while 'wounded' or lock to a medic if nearby
                temp = cmd->angles[1] + ps->delta_angles[1];
                // rain - always allow this.  viewlocking will take precedence
                // if a medic is found
                // rain - using a full short and converting on the client so that
                // we get >1 degree resolution
#ifdef GAMEDLL
        if (g_rtcw_deathAngles.integer) {
            if (ps->stats[STAT_DEAD_YAW] == 999)
                ps->stats[STAT_DEAD_YAW] = SHORT2ANGLE(temp);
                        return;
        }
#endif

Does anyone know what else needs to be changed? I’ve only tried it using omnibots and it doesn’t work quite right. :frowning:

Wasn’t sure if it was an omnibot thing.


(Jaquboss) #2

Anyway, I was trying to re-implement the bug

good luck, never heard about adding bug intentionaly before :slight_smile:
well you will have to say whatis actualy wrong?
try that with another ET instance on your computer…
IMO this thing is really ugly, it gives me the feeling that enemies of the recorder are lame and can’t face him


(brugal) #3

Sorry. It didn’t work at all with etpub+omnibots, even though I could simulate it by setting self->s.angles.

Ok. Now I tried it by just patching 2.60 sdk and using 2 local clients. It works.

Thanks dude.


(=>ETK<=Elite) #4

Maybe put a cvar on that one…some players gib on the way down.


(squadjot) #5

good luck, never heard about adding bug intentionaly before

what about the quake strafe jump “bug” in q4 ^^


(kamikazee) #6

And this is how people started to misuse the word “feature”.