Revert cv_chams settings
Remove FRIEND_CHAMS and ENEMY_CHAMS, that way PLAYER_CHAMS always displays both teams
This commit is contained in:
parent
ab806a0a8f
commit
5321ee311e
|
@ -14,7 +14,7 @@ bool cvars_init(void) {
|
|||
cv_bhop = REGISTER_CVAR("bhop", "1");
|
||||
cv_autostrafe = REGISTER_CVAR("autostrafe", "0");
|
||||
cv_esp = REGISTER_CVAR("esp", "3");
|
||||
cv_chams = REGISTER_CVAR("chams", "3");
|
||||
cv_chams = REGISTER_CVAR("chams", "1");
|
||||
cv_crosshair = REGISTER_CVAR("crosshair", "0");
|
||||
cv_clmove = REGISTER_CVAR("clmove", "0");
|
||||
|
||||
|
|
|
@ -8,13 +8,10 @@
|
|||
|
||||
enum chams_settings {
|
||||
DISABLED = 0,
|
||||
ENEMY_CHAMS = 1,
|
||||
FRIEND_CHAMS = 2,
|
||||
/* ALL_PLAYER is 3, but we can OR player and hands */
|
||||
HAND_CHAMS = 4,
|
||||
/* ALL is 5, but we will convert it to 7 so every setting can be OR'd */
|
||||
PLAYER_CHAMS = 1,
|
||||
HAND_CHAMS = 2,
|
||||
/* ALL is 3, but we can OR player and hands */
|
||||
};
|
||||
|
||||
visible_flags visible_mode;
|
||||
|
||||
bool chams(void* this_ptr) {
|
||||
|
@ -34,19 +31,14 @@ bool chams(void* this_ptr) {
|
|||
visible_mode = NONE; /* Reset for future calls */
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
return true;
|
||||
} else if (!valid_player(ent) || !is_alive(ent)) {
|
||||
} else if (!(setting & PLAYER_CHAMS) || !valid_player(ent) ||
|
||||
!is_alive(ent)) {
|
||||
/* If we don't want player chams, or this is not a player, stop */
|
||||
return false;
|
||||
}
|
||||
|
||||
const bool friendly = is_friend(ent);
|
||||
|
||||
/* Friendly ent but we dont want to render friends OR
|
||||
* Not friendly ent and we dont want to render enemies*/
|
||||
if ((friendly && !(setting & FRIEND_CHAMS)) ||
|
||||
(!friendly && !(setting & ENEMY_CHAMS)))
|
||||
return false;
|
||||
|
||||
/* If we got here it means we are rendering a valid player */
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
||||
|
|
Loading…
Reference in New Issue