summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <trem.redman@gmail.com>2013-09-15 22:29:31 +0200
committerPaweł Redman <trem.redman@gmail.com>2013-09-15 22:29:31 +0200
commit0f00273fe1b2c7044dd23512408632eae6e0dca6 (patch)
tree22304a878f217cdbda5d66c9491f6ace917ac7d9
parent39de4eb91861f8cb08c0eb05e52869190f6dfdad (diff)
admin_higher mindfuck bugfix
-rw-r--r--src/game/g_admin.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c
index 817b1fc..25e3e9b 100644
--- a/src/game/g_admin.c
+++ b/src/game/g_admin.c
@@ -451,11 +451,13 @@ static qboolean admin_higher_admin( g_admin_admin_t *a, g_admin_admin_t *b )
return qtrue;
if( a == b )
- return qfalse;
+ return qtrue;
if( admin_permission( b->flags, ADMF_IMMUTABLE, &perm ) )
+ {
+ Com_Printf( "b is immutable, perm: %d\n", perm );
return !perm;
-
+ }
return b->level <= ( a ? a->level : 0 );
}
@@ -473,7 +475,7 @@ static qboolean admin_higher( gentity_t *admin, gentity_t *victim )
return qtrue;
if( admin == victim )
- return qfalse;
+ return qtrue;
return admin_higher_admin( admin->client->pers.admin,
victim->client->pers.admin );
@@ -3444,7 +3446,7 @@ qboolean G_admin_settitle( gentity_t *ent )
return qfalse;
}
- if( ent && admin_higher_admin( a, ent->client->pers.admin ) )
+ if( ent && !admin_higher_admin( a, ent->client->pers.admin ) )
{
ADMP( "^3settitle: ^7indented victim is immune to your actions\n" );
return qfalse;