Skip to content

Commit 3c9ba9f

Browse files
finduraffinduraf
finduraf
authored and
finduraf
committed
fix: Aslona wizard RAND call
1 parent 35233ec commit 3c9ba9f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Main/Source/human.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ truth humanoid::SwitchToCraft(recipedata rpd)
18891889
{DBGLN;
18901890
craft* Craft = craft::Spawn(this);DBGLN;
18911891
DBG4(rpd.GetTool(),rpd.GetTool2(),GetRightArm()?GetRightArm()->IsUsable():0,GetLeftArm()?GetLeftArm()->IsUsable():0);
1892-
1892+
18931893
bool b1OK=false;
18941894
bool b2OK=false;
18951895
item* it;
@@ -1901,7 +1901,7 @@ truth humanoid::SwitchToCraft(recipedata rpd)
19011901
b1OK=true;
19021902
Craft->SetMoveCraftTool(false);
19031903
}
1904-
1904+
19051905
if(!b1OK && GetRightArm() && GetRightArm()->IsUsable()){
19061906
if((it = GetRightWielded())){
19071907
Craft->SetRightBackupID(it->GetID());
@@ -1914,7 +1914,7 @@ truth humanoid::SwitchToCraft(recipedata rpd)
19141914
b1OK=true;
19151915
Craft->SetMoveCraftTool(true);
19161916
}
1917-
1917+
19181918
if(!b1OK && GetLeftArm() && GetLeftArm()->IsUsable()){
19191919
if((it = GetLeftWielded())){
19201920
Craft->SetLeftBackupID(it->GetID());
@@ -1927,19 +1927,19 @@ truth humanoid::SwitchToCraft(recipedata rpd)
19271927
b1OK=true;
19281928
Craft->SetMoveCraftTool(true);
19291929
}
1930-
1930+
19311931
}else{
19321932
b1OK=true; //can craft somethings w/o tools
19331933
}
1934-
1934+
19351935
//TODO let the GetTool2() be equipped too?
19361936

19371937
if(b1OK){
19381938
Craft->SetCraftWhat(rpd);DBGLN;
19391939
SetAction(Craft);DBGLN;
19401940
return true;
19411941
}
1942-
1942+
19431943
ADD_MESSAGE("You have no usable arm.");
19441944
rpd.SetAlreadyExplained();
19451945
return false;
@@ -5390,7 +5390,7 @@ void FixSumoWrestlerHouse(festring fsCmdParams)
53905390
break;
53915391
}
53925392
}
5393-
5393+
53945394
if(SM){
53955395
for(int d = 0; d < SM->GetNeighbourSquares(); ++d)
53965396
{
@@ -5412,7 +5412,7 @@ void sumowrestler::GetAICommand()
54125412
devcons::AddDevCmd("FixSumoHouse",FixSumoWrestlerHouse,
54135413
"BugFix sumo wrestler house in case banana growers over crowd it.");
54145414
return true;}();
5415-
5415+
54165416
EditNP(-25);
54175417

54185418
SeekLeader(GetLeader());
@@ -7227,7 +7227,7 @@ void aslonawizard::GetAICommand()
72277227
}
72287228

72297229
if(NearestEnemy && NearestEnemy->GetPos().IsAdjacent(Pos) &&
7230-
(!(RAND() & 4) || StateIsActivated(PANIC)))
7230+
(!(RAND() % 4) || StateIsActivated(PANIC)))
72317231
{
72327232
if(CanBeSeenByPlayer())
72337233
ADD_MESSAGE("%s invokes a spell and disappears.", CHAR_NAME(DEFINITE));

0 commit comments

Comments
 (0)