if current < 4

This commit is contained in:
owein D 2020-10-05 14:45:07 +02:00
parent fc82b52505
commit fdb1c09c8e

7
bfg.c
View file

@ -215,7 +215,7 @@ char *bf_next(_Bool rainy) {
if(rainy)
{
if(bf_options.current > 2) {
if(bf_options.current > 3) {
if(bf_options.current % 2) {
bf_options.ptr[0] = bf_options.crs[bf_options.state[0]];
bf_options.ptr[1] = bf_options.crs[bf_options.state[1]];
@ -226,7 +226,6 @@ char *bf_next(_Bool rainy) {
bf_options.rotate ++;
}
}
}
else {
if(bf_options.current % 2) {
bf_options.ptr[0] = bf_options.crs[bf_options.state[0]];
@ -237,6 +236,10 @@ char *bf_next(_Bool rainy) {
}
}
}
}
else
for(i=0; i<bf_options.current; ++i) {
bf_options.ptr[i] = bf_options.crs[bf_options.state[i]]
}//we don't subtract the same depending on wether the length is odd or even
bf_options.strafe++;
bf_options.ptr[bf_options.current] = 0;