#heli signal

1 messages · Page 1 of 1 (latest)

long vortex
#

Hi, I have this plugin.
And It doesn't work as it should.

Helicopters don't shoot missiles. The plugin author writes that it is carbon.

https://codefling.com/files/sc/10066-attack-heli-does-not-fire-rockets/?tab=comments#comment-49584

It could be fixed somehow, because I have a feeling that we will not see it from his side.

Codefling

Hello! Lately we've realized on my server that the attack heli called in with Heli Signals does not fire rockets at players. Any idea what may cause this issue or how to remedy it? Thank you very much!

long vortex
#

New update of plugin

#

And this error is in console

#

191157 c.reload HeliSignals
191157 Unloaded plugin HeliSignals v1.2.1 by ZEODE
191159 Loaded plugin HeliSignals v1.2.1 by ZEODE [550ms]
191159 Checksum validation failed for 'PatrolHelicopterAI.ValidStrafeTarget' [CanHelicopterStrafeTarget]
191159 Checksum validation failed for 'PatrolHelicopterAI.CanUseNapalm' [CanHelicopterUseNapalm]
191159 Checksum validation failed for 'PatrolHelicopterAI.CanStrafe' [CanHelicopterStrafe]
191159 Checksum validation failed for 'HelicopterTurret.SetTarget' [OnHelicopterTarget]
191159 Checksum validation failed for 'PatrolHelicopterAI.PlayerVisible' [CanHelicopterTarget]
191159 Checksum validation failed for 'PatrolHelicopterAI.Retire' [OnHelicopterRetire]

lapis crypt
#

update the server

#

there's been a Rust update yesterday

halcyon dawn
#

Regarding the heli not firing rockets bug for people using my plugin on Carbon, where do I begin to try and find the issue? I do not use carbon at all.

When my plugin spawns helis, it adds a very simple custom component (StrafeHeliAI) which updates one public field ("numRocketsLeft") and a non-public serializable field ("useNapalm").

            public void UpdateSerializeableFields()
            {
                heliAI.numRocketsLeft = config.heli.heliConfig[heliProfile].MaxHeliRockets;

                FieldInfo useNapalm = typeof(PatrolHelicopterAI).GetField("useNapalm", (BindingFlags.Instance | BindingFlags.NonPublic));
                object napalmChance = UseNapalm();
                useNapalm.SetValue(heliAI, napalmChance);
            }

Is this something that might cause an issue with Carbon ?

#

Previously, and in the version currently available I did it using FieldInfo for both:

            public void UpdateSerializeableFields()
            {
                FieldInfo numRocketsLeft = typeof(PatrolHelicopterAI).GetField("numRocketsLeft", (BindingFlags.Public | BindingFlags.Instance));
                object numRockets = config.heli.heliConfig[heliProfile].MaxHeliRockets;
                numRocketsLeft.SetValue(heliAI, numRockets);

                FieldInfo useNapalm = typeof(PatrolHelicopterAI).GetField("useNapalm", (BindingFlags.Instance | BindingFlags.NonPublic));
                object napalmChance = UseNapalm();
                useNapalm.SetValue(heliAI, napalmChance);
            }
lapis crypt
#

Idea #1:

            public void UpdateSerializeableFields()
            {
                FieldInfo numRocketsLeft = typeof(PatrolHelicopterAI).GetField("numRocketsLeft", (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance));
                object numRockets = config.heli.heliConfig[heliProfile].MaxHeliRockets;
                numRocketsLeft.SetValue(heliAI, numRockets);

                FieldInfo useNapalm = typeof(PatrolHelicopterAI).GetField("useNapalm", (BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public));
                object napalmChance = UseNapalm();
                useNapalm.SetValue(heliAI, napalmChance);
            }```
#

Idea #2:

            public void UpdateSerializeableFields()
            {
#if CARBON
                object numRockets = config.heli.heliConfig[heliProfile].MaxHeliRockets;               
                heliAI.numRocketsLeft = numRockets;
                object napalmChance = UseNapalm();
                heliAI.useNapalm = napalmChance;
#else
                FieldInfo numRocketsLeft = typeof(PatrolHelicopterAI).GetField("numRocketsLeft", (BindingFlags.NonPublic | BindingFlags.Instance));
                object numRockets = config.heli.heliConfig[heliProfile].MaxHeliRockets;
                numRocketsLeft.SetValue(heliAI, numRockets);

                FieldInfo useNapalm = typeof(PatrolHelicopterAI).GetField("useNapalm", (BindingFlags.Instance | BindingFlags.NonPublic));
                object napalmChance = UseNapalm();
                useNapalm.SetValue(heliAI, napalmChance);
#endif
            }```
halcyon dawn
#

Ah ok, nice

#

everything public is so nice!

lapis crypt
#

hehe!

#

yeah it causes inconsistencies with Oxide but i won't limit Carbon just cus of that when the fix is so easy too when issues arise

halcyon dawn
#

absolutely

#

ty for the tip