Bee Grenades killing sleepers.

I am pretty sure this was not happening before the last FP update.  I just died when someone threw a bee grenade at me while I was offline.  Not sure how to prevent this. Anyone able to give me some direction please?

Thanks

Any progress on this issue? I traced it seems like when a player uses right click and drops the bee grenade the plugin doesn't see it as a player damage and allows it.

hi, ill take a look but thats most likely another plugin. the game sets the attacker already so it would not be missed unless thats bugged or another plugin breaks it. ill make sure it works on my end though.

Merged post

ive taken a look into this, but it looks like a game bug. the initiator is set when the bee grenade is dropped, but it's lost by the time the damage occurs. I'll sort this out on a vanilla server and see what I come up with. 

add the rule bees cannot hurt players in the mean time and it will block all bee damage until some solution can be determined. I will not use harmony though.

Merged post

it's a game bug and I've reported it.

for anyone curious:

`ThrownWeapon.DoThrowImpl` calls `timedExplosive.SetCreator(owningPlayer);`, so both `creatorEntity` and `creatorPlayer` are correctly set for thrown explosives

`ThrownWeapon.DoDrop` sets `creatorEntity` but doesn't call `SetCreator`, so `creatorPlayer` is null

when `BeeGrenade.Explode` tries to set `baseEntity.OwnerID` & `baseEntity.creatorEntity` using `creatorPlayer` it can't because it's null

tested on a vanilla server

Hi there,

Anyone know if theres been any change with this since it was reported to FP?
Thanks!

NBB5BdIwu5WEatg.jpg dogigniter

Hi there,

Anyone know if theres been any change with this since it was reported to FP?
Thanks!

heya dogigniter, I've confirmed that this is still a game bug, and that my fix for it still works in 2.3.7. if the fix is not working for you then damage would be allowed by something else. you can do a trace using the above link. just make sure you run the tpve.trace command from within the game near the player you want to drop the bee grenade on. if there is no trace feedback then another plugin is most likely telling truepve to allow that damage. in general, the players cannot hurt players rule will block this damage.

nivex

heya dogigniter, I've confirmed that this is still a game bug, and that my fix for it still works in 2.3.7. if the fix is not working for you then damage would be allowed by something else. you can do a trace using the above link. just make sure you run the tpve.trace command from within the game near the player you want to drop the bee grenade on. if there is no trace feedback then another plugin is most likely telling truepve to allow that damage. in general, the players cannot hurt players rule will block this damage.

Thanks that was helpful!



Merged post

OK had some time to do some testing and using the trace to figure out what's what
Dropped or thrown bee grenade damage does seem to get blocked by players cannot hurt players
We have bees cannot hurt players in the config but that doesn't seem to block all bee damage - do we need to definte that as an entity group?
The bee catapult bomb does hurt players - this is from that:

From: BeeSwarmAI, beeswarm
To: BasePlayer, player
Checking exclusions between [empty] and [empty]
Shared locations: none
No shared locations, or no matching exclusion mapping - no exclusions
No shared locations with attacker (empty locations for victim) - no exclusions
No exclusion found - looking up RuleSet...
Using RuleSet "default"
No match in pre-checks; evaluating RuleSet rules...
Initiator EntityGroup matches: none
Target EntityGroup matches: players
Evaluating Rules...
No matching group->Any rules found; continuing with Any->group...
Evaluating "any->players"...
Match found; allow damage? True

The trace from bees from natural beehives is identifical, which is annoying. Ideally I want to prevent bee damage from the catapult bomb, but doesn't look like there is any way to distinguish this from "natural" beehive beeswarms.

heya, bees entity group is in the default config but you do not need it if you use the below fix. the game is what distinguishes them apart, which is why it's important that they fix this issue so PVE can work as intended. 

add line 3061 in TruePVE.cs

        private void OnEntitySpawned(BeeGrenade ent)
        {
            if (ent != null && ent.creatorEntity.Is(out BasePlayer owner))
            {
                ent.creatorPlayer = owner;
            }
        }

this will replace OnExplosiveDropped hook in the next update as it will work with bee grenades and bombs.

Great, I've added that line to the cs file and removed the bee reference in the config json, I will double check it all works when I have a minute but if you've tested it I'm sure it does. Fantastic plugin by the way, our servers would not exist without your work :) So thank you

hi, I was not able to test but it should work. you're welcome.

Yes this works, thanks again!

Merged post

Although, if i throw a grenade at a sleeper, then disconnect, the sleeper does start taking damage and eventually die

Not sure if theres any way to prevent that from happening?

hi ill check it out

Merged post

this is just a game limitation. the easiest solution is to add BeeGrenade to an entity group that blocks damage, such as players. this will block damage when no player is set by the game. it's not possible for the game to fix this, the attacker could just suicide and log off to bypass any fix.