mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-06 04:51:40 -07:00
fixed rotation broken due to a typo.
This commit is contained in:
parent
fd8e83d0b1
commit
a6a87f11f4
1 changed files with 17 additions and 13 deletions
30
bfg.c
30
bfg.c
|
@ -207,22 +207,26 @@ char *bf_next(_Bool rainy) {
|
||||||
|
|
||||||
if(rainy)
|
if(rainy)
|
||||||
{
|
{
|
||||||
int strafeValue;
|
int mpldisp = bf_options.current/2+3;
|
||||||
|
int mplmod2 = bf_options.current % 2;
|
||||||
|
int strafeIndex;
|
||||||
for(i=0; i<bf_options.current; ++i) {
|
for(i=0; i<bf_options.current; ++i) {
|
||||||
if(bf_options.current > 4) {
|
if(mplmod2) strafeIndex = (strafe[loop]+i)%bf_options.current;
|
||||||
if(bf_options.current % 2)
|
else strafeIndex = (i+mpldisp)%bf_options.current;
|
||||||
strafeValue = (bf_options.strafe+i)%bf_options.current;
|
|
||||||
else
|
bf_options.ptr[i] = bf_options.crs[(bf_options.state[strafeIndex] + bf_options.rotate) % bf_options.crs_len];
|
||||||
strafeValue = strafeValue = (i+bf_options.current/2+3)%bf_options.current;
|
bf_options.rotate += i+1;
|
||||||
}
|
|
||||||
else
|
|
||||||
strafeValue = i;
|
|
||||||
|
|
||||||
bf_options.ptr[i] = bf_options.crs[(bf_options.state[strafeValue] + bf_options.rotate) % bf_options.crs_len];
|
|
||||||
bf_options.rotate += 1;
|
|
||||||
bf_options.strafe += 3;
|
bf_options.strafe += 3;
|
||||||
}
|
}
|
||||||
bf_options.rotate -= bf_options.current - 2 + bf_options.crs_len % 2;
|
#define accu(i) \
|
||||||
|
do { \
|
||||||
|
int j; \
|
||||||
|
for(j=1; j<=i; ++j) k += j; \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
|
int k = 0;
|
||||||
|
accu(mpl);
|
||||||
|
bf_options.rotate[loop] -= k-4;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
for (i = 0; i < bf_options.current; i++)
|
for (i = 0; i < bf_options.current; i++)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue