Jump to content

Untested Diagonal Movement


Shenmue
 Share

Recommended Posts

16 hours ago, Justn said:

 

 

 

Mine still follow me just fine. The only issue is that they do not move southeast or northeast after they target me. They will move up, down, up, down instead of diagonal. They will move southwest and northwest just fine when targeting.. also when they are not targeting a player they move just fine in all directions. Also getting an error on my server once they start chasing a player.

 


 Message: Index was outside the bounds of the array.
    Stack:   at Intersect.Server.Entities.Pathfinding.SpatialAStar.StoreNeighborNodes (Intersect.Server.Entities.Pathfinding.PathNode inAround, Intersect.Server.Entities.Pathfinding.PathNode[] inNeighbors) [0x0016c] in C:\Users\Justin\Documents\New Intersect\Intersect-Engine\Intersect.Server\Entities\Pathfinding\SpatialAStar.cs:355 
  at Intersect.Server.Entities.Pathfinding.SpatialAStar.Search (Intersect.Point inStartNode, Intersect.Point inEndNode, Intersect.Server.Entities.Pathfinding.PathNode inUserContext) [0x0019e] in C:\Users\Justin\Documents\New Intersect\Intersect-Engine\Intersect.Server\Entities\Pathfinding\SpatialAStar.cs:185 
  at Intersect.Server.Entities.Pathfinding.Pathfinder.Update (System.Int64 timeMs) [0x008b2] in C:\Users\Justin\Documents\New Intersect\Intersect-Engine\Intersect.Server\Entities\Pathfinding\Pathfinder.cs:299 

 

*I stated above that SE and NE were working.. I meant SW and NW are working.

 

Works fine for me in a quick test with the 6.1 version as a base. 

Link to comment
Share on other sites

On 8/25/2020 at 12:04 PM, Justn said:

 

 

 

Mine still follow me just fine. The only issue is that they do not move southeast or northeast after they target me. They will move up, down, up, down instead of diagonal. They will move southwest and northwest just fine when targeting.. also when they are not targeting a player they move just fine in all directions. Also getting an error on my server once they start chasing a player.

 


 Message: Index was outside the bounds of the array.
    Stack:   at Intersect.Server.Entities.Pathfinding.SpatialAStar.StoreNeighborNodes (Intersect.Server.Entities.Pathfinding.PathNode inAround, Intersect.Server.Entities.Pathfinding.PathNode[] inNeighbors) [0x0016c] in C:\Users\Justin\Documents\New Intersect\Intersect-Engine\Intersect.Server\Entities\Pathfinding\SpatialAStar.cs:355 
  at Intersect.Server.Entities.Pathfinding.SpatialAStar.Search (Intersect.Point inStartNode, Intersect.Point inEndNode, Intersect.Server.Entities.Pathfinding.PathNode inUserContext) [0x0019e] in C:\Users\Justin\Documents\New Intersect\Intersect-Engine\Intersect.Server\Entities\Pathfinding\SpatialAStar.cs:185 
  at Intersect.Server.Entities.Pathfinding.Pathfinder.Update (System.Int64 timeMs) [0x008b2] in C:\Users\Justin\Documents\New Intersect\Intersect-Engine\Intersect.Server\Entities\Pathfinding\Pathfinder.cs:299 

 

*I stated above that SE and NE were working.. I meant SW and NW are working.

 

I don't know about that, maybe it's related to another modification? In my knowledge, every game that used this mod don't have this issue. I guess I will need more information if you want me to help like your "Intersect.Server\Entities\Pathfinding\SpatialAStar.cs" code or other installed mods you have.

 

19 hours ago, Xiphoid said:

@Shenmue this addon working on development branch too bro? we need for stable version :)

 

I may do a master version, but I don't know when since I am somehow busy.

 

Link to comment
Share on other sites

I think I may of solved my issue. I went through the source and my source is missing this change! I will test and update this post. Thanks Shenmue

-   if (mEntity.X < newX)
+   if (mEntity.X < newX && mEntity.Y == newY)

 

Ok the error is gone. Moving SE still doesnt work once a npc locks on to the player but NE is fixed. Since I am the only one having this issue I assume it is the numerous sprite animations I have for players and npcs. Im sure I will get it worked out. 

Edited by Justn
Link to comment
Share on other sites

  • 2 months later...

Latest commit via this thread:

764255c9f62277dcda55f47998b7157e.png

 

Using latest:

2abd6d2135d3670bdccfe654ee0f84dd.png

 

Applying basic mod and then trying the mods via the zip on the latest working commit:

74b0286bf058bae18a9bb920834e5490.png

 

Any suggestions? Am I doing something wrong?

 

Edit: Figured it out. I'm a noob to using github but I figured it out (myself actually ;) ) so for other github noobs the fix was to revert to the old branch using 'git reset --hard <commit ID>' and after doing that it worked flawlessly. 

Link to comment
Share on other sites

  • 4 weeks later...
10 minutes ago, Squidly said:

What's the best way to install this now? Manually adding the code? The guides I can find for applying patches are all outdated. Thanks!

 

They're not outdated, follow the guides.

Link to comment
Share on other sites

On 12/18/2020 at 9:50 AM, Scaly said:

 

Scaly or anyone else-- would you be able to help me out with this? This is my terminal log. I don't get any errors when checking the patch (on a clean build of stable Intersect) but when I apply the patch it's giving me tons of errors I can't reconcile. Is my version of git an issue?

 

C:\Users\Name\Desktop\Git>git --version
git version 2.29.2.windows.3

C:\Users\Name\Desktop\Git>cd Intersect_Engine

C:\Users\Name\Desktop\Git\Intersect_Engine>git apply --check first.patch

C:\Users\Name\Desktop\Git\Intersect_Engine>git am --signoff < first.patch
.git/rebase-apply/patch:127: trailing whitespace.
                    case 4: // NW
error: Intersect (Core)/Network/Packets/Client/MovePacket.cs: does not exist in index
error: Intersect.Client/Entities/Entity.cs: does not exist in index
error: Intersect.Client/Entities/Player.cs: does not exist in index
error: Intersect.Client/Networking/PacketSender.cs: does not exist in index
error: Intersect.Server/Networking/PacketHandler.cs: does not exist in index
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Applying: diagonal movement
Patch failed at 0001 diagonal movement
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

C:\Users\Name\Desktop\Git\Intersect_Engine>git am --abort

Link to comment
Share on other sites

  • 1 month later...

Do you have to activate any configuration for this to work in the players? When I finished adding the patch I tried walking diagonally but I couldn't, I thought it was badly implemented but I tried with some npcs and it works fine when assigning the commands.

73ba66e00713761ca53f1cb75a385d9b.jpeg

 

Link to comment
Share on other sites

8 hours ago, Shenmue said:

No configuration to activate.

I will have to check that out then, but I don't know when. It will probably take some time. :/

The problem is in prerelease 7, I just confirmed with someone else that it is bugging the players but in the npcs you can give them diagonal movement orders and they do it without problems, I was trying to find the problem but as there are many changes that apply the patch I could not identify well where is causing the bug.

Link to comment
Share on other sites

3 hours ago, Shenmue said:

Oh OK I see, if I happen to update the patch I will check all that out.

 

You may want to look the "ProcessMoveRoute" method of "Intersect.Server.Entities.Entity".

Thanks for the indication, if I can find something about it I will let you know since I need this functionality in my project and it seems to me that your code is a good option.

Link to comment
Share on other sites

I have tried to solve the problem and according to the logic of the processMoveRoute everything is fine since the npcs if they can detect the route changes diagonally, I tried to investigate in the player.cs to see if there was something different related to the movement but I did not get results either.

 

If someone has found the site where the bug is with the pre-release and this patch, please do not hesitate to communicate it to try to solve it.

Link to comment
Share on other sites

  • 3 weeks later...

I have a project on the 0.6.2.457 build and I really need to add these patches but I can't find the right download. I can only seem to get the 0.7.0.0 files that aren't already built. The patches don't seem to work with that one, so I'm trying to find the files for 0.6.2.457 so I can try this out.

Alternatively, is there a way to apply patches to an already built project?

Link to comment
Share on other sites

46 minutes ago, Ogreleg said:

I have a project on the 0.6.2.457 build and I really need to add these patches but I can't find the right download. I can only seem to get the 0.7.0.0 files that aren't already built. The patches don't seem to work with that one, so I'm trying to find the files for 0.6.2.457 so I can try this out.

Alternatively, is there a way to apply patches to an already built project?

 

I confirm that it does not work in the latest builds of prerelease 7, you can try to apply the patch manually using this tool https://www.ascensiongamedev.com/topic/5092-hint-examine-patches-with-diffy just Download the source of 6.2 that in theory should work and modify the files manually.

Link to comment
Share on other sites

16 hours ago, Blinkuz said:

 

I confirm that it does not work in the latest builds of prerelease 7, you can try to apply the patch manually using this tool https://www.ascensiongamedev.com/topic/5092-hint-examine-patches-with-diffy just Download the source of 6.2 that in theory should work and modify the files manually.


You rock. This is exactly the kind of thing I was looking for. I got it working and even figured out how to move my progress from one project to another, so that's sweet. Just having trouble with the editor now, it's popping some kind of error regarding monogame versions and shaders. Other than the editor, though, everything works great now. Thanks!

Link to comment
Share on other sites

14 minutes ago, Ogreleg said:


You rock. This is exactly the kind of thing I was looking for. I got it working and even figured out how to move my progress from one project to another, so that's sweet. Just having trouble with the editor now, it's popping some kind of error regarding monogame versions and shaders. Other than the editor, though, everything works great now. Thanks!

Did you do it for version 6.2?

Link to comment
Share on other sites

8 minutes ago, Blinkuz said:

Did you do it for version 6.2?

Yeah, I grabbed a clean 6.2.0 and used diffy to find out what goes where. That's a really sweet tool. Once it was running, I moved my old 6.2.457 server files over (minus the exe) and that seems to have taken care of getting my work to the 6.2 patched project.

EDIT: wait, there was another step actually. For some reason it wouldn't work until I saw Scaly's post and did this -- "Edit: Figured it out. I'm a noob to using github but I figured it out (myself actually ) so for other github noobs the fix was to revert to the old branch using 'git reset --hard <commit ID>' and after doing that it worked flawlessly. "

For some reason, that was a big deal. The 'git reset --hard commitID' was necessary. The server says it's a 0.6.2.0 version.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...