Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lgtm fixes #589

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Main/Include/devcons.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@

#include "festring.h"

#define DEVCMDMSG(fmt,x,...) ADD_MESSAGE(" > " fmt,x);
#define DEVCMDMSG(fmt,x) ADD_MESSAGE(" > " fmt,x);
#define DEVCMDMSG2(fmt,x,y) ADD_MESSAGE(" > " fmt,x,y);
#define DEVCMDMSG3(fmt,x,y,z) ADD_MESSAGE(" > " fmt,x,y,z);
#define DEVCMDMSG4(fmt,x,y,z,a) ADD_MESSAGE(" > " fmt,x,y,z,a);

typedef void (*callcmd)(std::string);

Expand Down
8 changes: 4 additions & 4 deletions Main/Source/bugworkaround.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ void bugfixdp::DupPlayerFix(character* DupPlayer)
DEVCMDMSG("fixed bodyparts %d",iFixedCount);
//BEWARE!!! this leads to crash: DupPlayer->Remove();

DEVCMDMSG("fixed dup player '%s' id=%d/%d 0x%X",DupPlayer->GetName(DEFINITE).CStr(),idOld,DupPlayer->GetID(),DupPlayer);
DEVCMDMSG4("fixed dup player '%s' id=%d/%d 0x%X",DupPlayer->GetName(DEFINITE).CStr(),idOld,DupPlayer->GetID(),DupPlayer);

DBGCHAR(DupPlayer,"CharFix:CharToBeLost");
}
Expand Down Expand Up @@ -575,7 +575,7 @@ character* bugfixdp::FindByPlayerID1(v2 ReqPosL,bool bAndFixIt)
CharPlayerOk = CharID1;
DEVCMDMSG("%s","ID1 will be ok now");
if(bAndFixIt && CharID1->GetSquareUnder()==NULL){
DEVCMDMSG("placing the character ID1 at %d,%d",ReqPosL.X,ReqPosL.Y);
DEVCMDMSG2("placing the character ID1 at %d,%d",ReqPosL.X,ReqPosL.Y);
CharID1->PutToOrNear(ReqPosL); //place he where expected
}
// }
Expand Down Expand Up @@ -640,9 +640,9 @@ character* bugfixdp::BugWorkaroundDupPlayer(){
// last thing is grant player's stuff is consistent
int iFixedCount=0;
iFixedCount=CharEquipmentsWork(CharPlayerOk,true,false);DBGLN;
DEVCMDMSG("fixed player '%s' equipments %d",CharPlayerOk->GetName(DEFINITE).CStr(),iFixedCount);
DEVCMDMSG2("fixed player '%s' equipments %d",CharPlayerOk->GetName(DEFINITE).CStr(),iFixedCount);
iFixedCount=CharInventoryWork (CharPlayerOk,true,false);DBGLN;
DEVCMDMSG("fixed player '%s' inventory %d",CharPlayerOk->GetName(DEFINITE).CStr(),iFixedCount);
DEVCMDMSG2("fixed player '%s' inventory %d",CharPlayerOk->GetName(DEFINITE).CStr(),iFixedCount);
iFixedCount=TrapsWork();
DEVCMDMSG("fixed traps %d",iFixedCount);

Expand Down
4 changes: 2 additions & 2 deletions Main/Source/devcons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ void devcons::Help(std::string strFilter)
{
for(int j=0;j<vCmd.size();j++){
if(!vCmd[j].bWizardModeOnly || game::WizardModeIsActive())
DEVCMDMSG("%s - %s%s",
DEVCMDMSG3("%s - %s%s",
// ADD_MESSAGE("%s%s - %s%s",cPrompt,
vCmd[j].strCmd.c_str(),
vCmd[j].bWizardModeOnly?"(WIZ) ":"",
Expand Down Expand Up @@ -359,7 +359,7 @@ void devcons::runCommand(festring fsFullCmd)
}

// ADD_MESSAGE("%sTrying to run: %s ('%s' '%s')",cPrompt,strFullCmd.c_str(),strCmd.c_str(),strParams.c_str());
DEVCMDMSG("Trying to run: %s ('%s' '%s')",strFullCmd.c_str(),strCmd.c_str(),strParams.c_str());
DEVCMDMSG3("Trying to run: %s ('%s' '%s')",strFullCmd.c_str(),strCmd.c_str(),strParams.c_str());

callcmd cc = Find(strCmd);
if(cc){
Expand Down