mirror of
https://github.com/UberGames/rpgxEF.git
synced 2025-03-17 16:12:13 +00:00
Bugfix for ui_transporter-stuff
Im my desire to make sure every command was adminprotected I killed the commands communicating with the trigger... I reverted that and added SQLF_BEAM as a check for restricted destination clearance Signed-off-by: Harry Young <hendrik.gerritzen@googlemail.com>
This commit is contained in:
parent
0f9ef785f5
commit
be557e0052
2 changed files with 9 additions and 26 deletions
|
@ -7127,18 +7127,6 @@ static void Cmd_UiTransporterLoc_f(gentity_t *ent) {
|
|||
gentity_t *trTrigger;
|
||||
char arg[MAX_QPATH];
|
||||
|
||||
#ifndef SQL
|
||||
if ( !IsAdmin( ent ) ) {
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"ERROR: You are not logged in as an admin.\n\" ") );
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if ( !IsAdmin( ent ) || !G_Sql_UserDB_CheckRight(ent->client->uid, SQLF_UITRANS ) ) {
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"ERROR: You are not logged in as a user with the appropiate rights.\n\" ") );
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(trap_Argc() < 2) return;
|
||||
|
||||
trap_Argv(1, arg, sizeof(arg));
|
||||
|
@ -7166,10 +7154,17 @@ static void Cmd_UiTransporterLoc_f(gentity_t *ent) {
|
|||
|
||||
if(locTarget) {
|
||||
if(locTarget->sound1to2) {
|
||||
#ifndef SQL
|
||||
if ( !IsAdmin( ent ) ) {
|
||||
G_PrintfClient(ent, "Destination is a restricted location.\n");
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if ( !IsAdmin( ent ) || !G_Sql_UserDB_CheckRight(ent->client->uid, SQLF_BEAM) ) {
|
||||
G_PrintfClient(ent, "Destination is a restricted location.\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
trTrigger->target_ent = locTarget;
|
||||
trTrigger->count = 0;
|
||||
|
@ -7199,18 +7194,6 @@ static void Cmd_UiTransporterExt_f(gentity_t *ent) {
|
|||
gentity_t *trTrigger;
|
||||
char arg[MAX_QPATH];
|
||||
|
||||
#ifndef SQL
|
||||
if ( !IsAdmin( ent ) ) {
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"ERROR: You are not logged in as an admin.\n\" ") );
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if ( !IsAdmin( ent ) || !G_Sql_UserDB_CheckRight(ent->client->uid, SQLF_UITRANS ) ) {
|
||||
trap_SendServerCommand( ent-g_entities, va("print \"ERROR: You are not logged in as a user with the appropiate rights.\n\" ") );
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(!rpg_serverchange.integer) {
|
||||
trap_SendServerCommand(ent-g_entities, "print \"Serverchange is disabled.\n\"");
|
||||
return;
|
||||
|
|
|
@ -84,7 +84,7 @@ typedef enum {
|
|||
SQLF_MESSAGE = 16384,
|
||||
SQLF_DEBUG = 32768, //Debugging Tools
|
||||
SQLF_MUSIC = 65536,
|
||||
SQLF_UITRANS = 131072,
|
||||
//unused = 131072,
|
||||
SQLF_USEENT = 262144,
|
||||
SQLF_BEAM = 524288,
|
||||
//unused = 1048576,
|
||||
|
|
Loading…
Reference in a new issue