Skip to content

Commit 997ea40

Browse files
committed
cg_x_obituary to hide killfeed
(adding changes from private repo)
1 parent 057d272 commit 997ea40

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

cgame.cpp

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,79 @@ void CG_DrawFPS(float y) {
727727
}
728728
}
729729

730+
typedef enum {
731+
TR_STATIONARY,
732+
TR_INTERPOLATE, // non-parametric, but interpolate between snapshots
733+
TR_LINEAR,
734+
TR_LINEAR_STOP,
735+
TR_LINEAR_STOP_BACK, //----(SA) added. so reverse movement can be different than forward
736+
TR_SINE, // value = base + sin( time / duration ) * delta
737+
TR_GRAVITY,
738+
// Ridah
739+
TR_GRAVITY_LOW,
740+
TR_GRAVITY_FLOAT, // super low grav with no gravity acceleration (floating feathers/fabric/leaves/...)
741+
TR_GRAVITY_PAUSED, //----(SA) has stopped, but will still do a short trace to see if it should be switched back to TR_GRAVITY
742+
TR_ACCELERATE,
743+
TR_DECCELERATE,
744+
// Gordon
745+
TR_SPLINE,
746+
TR_LINEAR_PATH
747+
} trType_t;
748+
749+
typedef struct {
750+
trType_t trType;
751+
int trTime;
752+
int trDuration; // if non 0, trTime + trDuration = stop time
753+
//----(SA) removed
754+
vec3_t trBase;
755+
vec3_t trDelta; // velocity, etc
756+
//----(SA) removed
757+
} trajectory_t;
758+
759+
typedef struct entityState_s {
760+
int number;
761+
entityTypes eType; //4
762+
int eFlags; //8
763+
trajectory_t pos; //12
764+
trajectory_t apos; //48
765+
int unk; //84 //time??
766+
int unk2; //88 //time2??
767+
vec3_t origin2; //92
768+
vec3_t angles2; //104 (guessed name)
769+
int otherEntityNum; //116
770+
int otherEntityNum2; //120
771+
int groundEntityNum; //124
772+
int constantLight; //128
773+
int loopSound; //132
774+
int surfaceFlags; //136
775+
int modelindex; //140
776+
int clientNum; //144
777+
char ___cba[0x34];
778+
/*
779+
gentity_t *teammaster; //152
780+
int eventParm; //160
781+
int eventSequence; //164
782+
int events[4]; //168
783+
int eventParms[4]; //184
784+
*/
785+
786+
int weapon; //200
787+
int legsAnim; //204
788+
int torsoAnim; //208
789+
float leanf; //212
790+
int loopfxid; //216
791+
int hintstring; //220
792+
int animMovetype; //224
793+
} entityState_t;
794+
795+
void CG_Obituary(entityState_t* ent) {
796+
if (!Cvar_VariableIntegerValue("cg_x_obituary")) return;
797+
798+
void(*call)(entityState_t*);
799+
*(int*)(&call) = CGAME_OFF(0x3001D6C0);
800+
call(ent);
801+
}
802+
730803
void CG_Init(DWORD base) {
731804
cgame_mp = base;
732805
CG_ServerCommand = (CG_ServerCommand_t)(cgame_mp + 0x2E0D0);
@@ -753,6 +826,8 @@ void CG_Init(DWORD base) {
753826

754827
__call(CGAME_OFF(0x3001509E), (int)CG_DrawFPS);
755828

829+
__call(CGAME_OFF(0x3001E6A1), (int)CG_Obituary);
830+
756831
*(UINT32*)CGAME_OFF(0x300749EC) = 1; // Enable cg_fov
757832
// *(UINT32*)CGAME_OFF(0x30074EBC) = 0; // Enable cg_thirdperson
758833

cl_main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ void CL_Init(void) {
275275
Cvar_Get("g_scoreboard_kills", "Kills", 0);
276276
Cvar_Get("g_scoreboard_deaths", "Deaths", 0);
277277
Cvar_Get("g_scoreboard_ping", "Ping", 0);
278+
Cvar_Get("cg_x_obituary", "1", 0);
279+
278280
Cvar_Set("r_overbrightbits", "0");
279281
Cvar_Set("r_ignorehwgamma", "0");
280282
Cvar_Set("cl_languagewarnings", "0");

0 commit comments

Comments
 (0)