mirror of
https://github.com/SWG-Source/client-tools.git
synced 2026-01-16 23:04:27 -05:00
Remove client production constraint on isAdmin
This commit is contained in:
@@ -54,9 +54,7 @@
|
||||
#include "swgSharedUtility/JediConstants.h"
|
||||
|
||||
|
||||
#if PRODUCTION == 0
|
||||
bool PlayerObject::s_admin = false;
|
||||
#endif
|
||||
|
||||
namespace PlayerObjectNamespace
|
||||
{
|
||||
@@ -2071,11 +2069,7 @@ void PlayerObject::getObjectInfo(std::map<std::string, std::map<std::string, Uni
|
||||
|
||||
void PlayerObject::setAdmin(bool admin)
|
||||
{
|
||||
#if PRODUCTION == 0
|
||||
s_admin = admin;
|
||||
#else
|
||||
UNREF(admin);
|
||||
#endif
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@@ -414,9 +414,7 @@ private:
|
||||
|
||||
private:
|
||||
|
||||
#if PRODUCTION == 0
|
||||
static bool s_admin;
|
||||
#endif
|
||||
|
||||
void shouldShowBackpack(bool show);
|
||||
void shouldShowHelmet(bool show);
|
||||
@@ -933,11 +931,7 @@ inline std::string const & PlayerObject::getDefaultAttackOverride() const
|
||||
|
||||
inline bool PlayerObject::isAdmin()
|
||||
{
|
||||
#if PRODUCTION == 0
|
||||
return s_admin;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@@ -1742,7 +1742,7 @@ bool CuiPreferences::getDragOntoContainers ()
|
||||
|
||||
bool CuiPreferences::getAllowTargetAnything ()
|
||||
{
|
||||
return ms_allowTargetAnything;
|
||||
return ms_allowTargetAnything && PlayerObject::isAdmin();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@@ -198,11 +198,9 @@ namespace SwgCuiHudNamespace
|
||||
|
||||
const ClientObject * const clientObject = obj ? obj->asClientObject () : 0;
|
||||
|
||||
#if PRODUCTION == 0
|
||||
const bool allowTargetAnything = CuiPreferences::getAllowTargetAnything ();
|
||||
//-- don't target buildings and shit
|
||||
if (!allowTargetAnything)
|
||||
#endif
|
||||
{
|
||||
//-- we are looking at an untargettable object
|
||||
if (!clientObject)
|
||||
|
||||
Reference in New Issue
Block a user