Skip to content

Fix a bug which causes the bullet can phase through obstacles and soliders#31

Open
Cmd-GZ wants to merge 5 commits into
catabriga:masterfrom
Cmd-GZ:fix/missing-collide-if-distance-is-too-long-in-one-step
Open

Fix a bug which causes the bullet can phase through obstacles and soliders#31
Cmd-GZ wants to merge 5 commits into
catabriga:masterfrom
Cmd-GZ:fix/missing-collide-if-distance-is-too-long-in-one-step

Conversation

@Cmd-GZ

@Cmd-GZ Cmd-GZ commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

In ODE mode, instead of end the bullet, if the step is too small and the distance between is still too big, the bullet will move to the next position in once, which cause the bullet can phase through obstacles and soldiers
图片
It's fixed by splitting a big distance step into some smaller steps whose distance is smaller than the maximal allowed distance defined in the Constant.java
图片
This fix is based on the optimize/Function branch

Cmd-GZ added 5 commits July 4, 2026 07:01
Integrate many repeative codes and nested codes
…eft corner in y' mode

In y' mode, if you send a function that is undefined, such as `log(x)`, `sqrt(x)`, `ln(x)`, at the starting point, instead of exploding at the starting point, the bullet will explode on the top-left corner.
I have no idea that what stuff exactly causes it, but it's suprise that I fixed it when I try reorganising the `Function.java` unconsciously.
Just like I said, the code in `src/Graphwar/Function.java` is organized to make it more readable, which fixes the bug somehow.
…ter the branch `fix/Function`

It's clearly that process(Function/RK4/RK42)Range is unnecessary after abstract them as processRange.
So I make peocessRange be a public method and remove process(Function/RK4/RK42)Range. And modify the caller (GameData.jar, ComputerPlayer.java)'s code for the change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant