Skip to content

Commit

Permalink
use #bool(debug) and #bool(locdebug)
Browse files Browse the repository at this point in the history
  • Loading branch information
Die4Ever committed Sep 23, 2024
1 parent c9a48c5 commit da834ee
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions DXRCore/DeusEx/Classes/DXRActorsBase.uc
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ static function Actor GlowUp(Actor a, optional byte hue, optional byte saturatio
function DebugMarkKeyActor(Actor a, coerce string id)
{
local ActorDisplayWindow actorDisplay;
if( ! #defined(locdebug)) {
if( ! #bool(locdebug)) {
err("Don't call DebugMarkKeyActor without locdebug mode! Add locdebug to the compiler_settings.default.json file");
return;
}
Expand All @@ -1760,7 +1760,7 @@ function DebugMarkKeyPosition(vector pos, coerce string id)
{
local ActorDisplayWindow actorDisplay;
local Actor a;
if( ! #defined(locdebug)) {
if( ! #bool(locdebug)) {
err("Don't call DebugMarkKeyPosition without locdebug mode! Add locdebug to the compiler_settings.default.json file");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion DXRModules/DeusEx/Classes/DXRFlags.uc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ simulated function PlayerAnyEntry(#var(PlayerPawn) p)
p.bCrowdControl = (crowdcontrol!=0);
#endif

if(!VersionIsStable() || #defined(debug))
if(!VersionIsStable() || #bool(debug))
p.bCheatsEnabled = true;

if(difficulty_names[difficulty] == "Super Easy QA" && dxr.dxInfo.missionNumber > 0 && dxr.dxInfo.missionNumber < 99) {
Expand Down
12 changes: 6 additions & 6 deletions DXRando/DeusEx/Classes/DXRAnimTracker.uc
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ function Init(string part)
local rotator rot;
local int a, i;

if(#defined(debug)) SaveConfig();// create/update the config file
if(#defined(debug) && part == config_part) return;
if(#bool(debug)) SaveConfig();// create/update the config file
if(#bool(debug) && part == config_part) return;

for(a=0; a<ArrayCount(anim_offsets); a++) {
anim_offsets[a].frames[0] = -1;
Expand Down Expand Up @@ -122,7 +122,7 @@ function Init(string part)
break;
}

if(#defined(debug)) SaveConfig();// write back new values to config
if(#bool(debug)) SaveConfig();// write back new values to config
}

function edit()
Expand All @@ -142,7 +142,7 @@ function edit()

ForceFrame = Owner.AnimFrame;

if(!#defined(debug)) Human(GetPlayerPawn()).ClientMessage("DXRAnimTracker WARNING: not compiled in debug mode!");
if(!#bool(debug)) Human(GetPlayerPawn()).ClientMessage("DXRAnimTracker WARNING: not compiled in debug mode!");
}

simulated function Tick(float deltaTime)
Expand Down Expand Up @@ -185,14 +185,14 @@ simulated function Tick(float deltaTime)
loc = (a_off * (1.0-f)) + (b_off * f);
}

if(#defined(debug) && editing) {
if(#bool(debug) && editing) {
Human(GetPlayerPawn()).ClientMessage(Owner.AnimSequence @ Owner.AnimFrame @ loc);
}
ApplyOffset(loc);
return;
}

if(#defined(debug) && Owner.AnimSequence != '' && editing) {
if(#bool(debug) && Owner.AnimSequence != '' && editing) {
Human(GetPlayerPawn()).ClientMessage(Owner.AnimSequence @ Owner.AnimFrame);
}

Expand Down
2 changes: 1 addition & 1 deletion DXRando/DeusEx/Classes/TriggerEnable.uc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static function DXRTriggerEnable Create(Actor a, Name tag, Name Event)
foreach t.AllActors(class'Actor', a, Event) {
a.SetCollision(false, a.bBlockActors, a.bBlockPlayers);
}
if(#defined(debug)) {
if(#bool(debug)) {
t.Trigger(None, None);
}
return t;
Expand Down

0 comments on commit da834ee

Please sign in to comment.