Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vehicle Secondary Guns not functioning #910

Closed
Glowstonesword opened this issue May 12, 2018 · 13 comments
Closed

Vehicle Secondary Guns not functioning #910

Glowstonesword opened this issue May 12, 2018 · 13 comments

Comments

@Glowstonesword
Copy link

Version: 5.5.2 (main download from https://flansmod.com/download)

Minecraft Version: 1.12.2

Issue: Secondary guns for any vehicle do not seem to function; while (for example) bombs function on right-click for planes with them, using left click, right click or the default hotkey (have tried changing the hotkey but to no effect) does not fire the secondary guns. A good example is the Fokker's machine guns not firing as they count as a secondary gun.

@coldblade2000
Copy link
Contributor

coldblade2000 commented Dec 28, 2018

I have made SOME progress fixing this, but I'm not experienced with forge enough to go the whole way. The main issues are in EntityDrivable.java's shootEach() method. The first issue, which I managed to solve had to do with Vectors. the gunVec Vector seems to be a local vector, and is never added to the player's coordinates, so the gunVec points to coordinates within a few blocks of 0,0,0 (Think -2, 1, 2.5 instead of the vehicle's position of 536, 64, -1850). I solve this by instead doing this for gunVec:

Vector3f GunVec = Vector3f.add(new Vector3f(posX, posY, posZ), getOrigin(shootPoint), null);

I used a debug chat message to tell me where the bullet would hit.

https://gist.github.com/coldblade2000/59ba2acf7420bb201df7862fea303bf0 in line 615

Finally, this is the main problem I've noticed. Flans tries to use ServerHandleShotData in ItemGun to register the bullets, but then ServerHandleShotData quickly returns nothing, as the first thing SeverHandleShotData does is check if the "entity" given is an instance of EntityPlayerMP (which it isn't, its a tank, plane, etc). Thus, nothing else runs. I can go further into detail if needed. Point is, the shotData is just never handled, thus nothing else happens

Edit: I realize the code is badly formatted, give me a sec

Edit 2: https://gist.github.com/coldblade2000/59ba2acf7420bb201df7862fea303bf0

@Simpyo
Copy link

Simpyo commented Mar 24, 2019

Any progress on this? I'm using the 1017 fix and I'm having this issue with all vehicles.

Apache won't fire Hellfires or Hydras but the co-pilot can fire the turret, Bofors won't fire etc. #

@ChrisLane
Copy link
Member

@Simpyo the guns were broken again in the version for #1017 I'll publish a new beta version on here later today with working vehicle guns.

@itsyaboiiOliver
Copy link

Hello im completely new to all this, and i have no idea how this works, but I have the same Problem. @ChrisLane could you explain to me how i use your solution?

@ChrisLane
Copy link
Member

@itsyaboiiOliver Download the latest version of the mod and content packs from here: https://github.com/FlansMods/FlansMod/releases

Though supposedly things work better in beta 3 so you might want to try that.

@itsyaboiiOliver
Copy link

Ok so i can download those, but like the bugfixes things? More down the page i can download the mod, are the fixes already in there?

@ChrisLane
Copy link
Member

ChrisLane commented Jun 21, 2019 via email

@Datboi727
Copy link

Hi, im trying to install the beta version, but i dont know how to do it, there is a video tutorial "How to install BETA version"??

@Liruxo
Copy link
Contributor

Liruxo commented Apr 24, 2020

If you need a video tutorial, you are to my knowledge out of luck
However this should cover all steps and explain them in a understandable manner:
https://github.com/FlansMods/FlansMod/wiki/Installing-FlansMod

@Datboi727
Copy link

Thx, but i dont know what to do with this folder
15877487509675437250031271604952

@Liruxo
Copy link
Contributor

Liruxo commented Apr 24, 2020

I do not know how you acquired that folder. Did you follow the steps described in the wiki, and if so at what step are you

@Xeladin
Copy link

Xeladin commented Nov 21, 2022

so this bug was never solved? i'm experiencing the same issue with my bomber and all my vehicles, they don't shoot projectiles rather the projectiles don't leave from the machines (tanks/airplanes/ground turrets) and I have the beta v9. Does anyone know what might be causing this issue. I know about the issue with malisis doors mod problem, but is there something I can do now that would go around this bug?

@RafaelJunior1
Copy link

When I try to spawn the vehicles, they don't appear, only their shadows appear. Previously the game crashed and closed after I downloaded the latest mod version of Flan, now the game no longer crashes but the bug remains
If anyone knows how I can fix this bug can you tell me here now please

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

No branches or pull requests

9 participants