Jump to content

NRE Chopping Trees with Beehives On Them

Fixed 0.1.16 0.1.16

Stewie


Stewie

Posted (edited)

When chopping a tree that has a beehive on it, on the last hit when the tree is going to fall I get disconnected with the error:
RPC Error in Player Attack.

The server console reports at the same time:
NullReferenceException: Object reference not set to an instance of an object

When I log back in the tree that disconnected me is unkillable and grants no wood.

v0.1.16, default settings and no other plugins loaded.
v0.1.15 seems to work perfectly fine and does not have this issue.

image.png

Edited by Stewie
  • Like 1
IIIaKa

Posted

Changed Status from Pending to Work in Progress

IIIaKa

Posted

8 hours ago, Stewie said:

When chopping a tree that has a beehive on it, on the last hit when the tree is going to fall I get disconnected with the error:

Thank you very much for the detailed information on how to reproduce the error! Please re-download the plugin, the issue should be resolved.

  • Love 1
IIIaKa

Posted

Changed Status from Work in Progress to Fixed

Changed Fixed In to 0.1.16

IIIaKa

Posted

If you still have any questions, feel free to ask!

Stewie

Posted

49 minutes ago, IIIaKa said:

If you still have any questions, feel free to ask!

Fix confirmed working thank you for resolving that!

  • Like 1
Stewie

Posted

2 hours ago, IIIaKa said:

You are welcome!

Just a heads up your latest reuploaded v0.1.16 with default config and no other plugins seems to enable PVP so players can attack other players...

IIIaKa

Posted (edited)

12 minutes ago, Stewie said:

Just a heads up your latest reuploaded v0.1.16 with default config and no other plugins seems to enable PVP so players can attack other players...

Hello, are you sure you're not in a team and that FriendlyFire isn't enabled?

Edited by IIIaKa
Stewie

Posted

5 minutes ago, IIIaKa said:

Hello, are you sure you're not in a team and that FriendlyFire isn't enabled?

No team.
Default Config.
No other plugins loaded and server is in server.pve = true.

Confirmed by testing against another player and also via "spawn player" for a dummy player.

v0.1.15 - reflects pvp damage back on the attacker anywhere on the map
v0.1.16 - just lets PVP damage happen like normal.

IIIaKa

Posted (edited)

3 minutes ago, Stewie said:

Confirmed by testing against another player and also via "spawn player" for a dummy player.

The plugin ignores such players, it only works with real players, player.userID.IsSteamId().

Edited by IIIaKa
Stewie

Posted

2 minutes ago, IIIaKa said:

The plugin ignores such players, it only works with real players, player.userID.IsSteamId().

I tested with both but that is good to know. The problem still exists if you attack another real player.

Stewie

Posted

Is "PlayersData.json" suppose to be empty? It seems to be on your latest version you uploaded.

Stewie

Posted

@IIIaKaany ideas what might be broken? We are thinking about going back to v0.1.15 as that version works fine unless you can fix this in v0.1.16?

IIIaKa

Posted

14 minutes ago, Stewie said:

@IIIaKaany ideas what might be broken? We are thinking about going back to v0.1.15 as that version works fine unless you can fix this in v0.1.16?

I don't know why it's like that for you. I tested this on both a local server and a hosted one, with sleeping and awake players, with and without firearms, in both cases I couldn’t deal damage to players.
Please check. Are you sure the plugin loaded without errors? Are you sure you’re not in a PvP zone? Are you sure you're not in a team with friendly fire enabled?

Stewie

Posted (edited)

32 minutes ago, IIIaKa said:

I don't know why it's like that for you. I tested this on both a local server and a hosted one, with sleeping and awake players, with and without firearms, in both cases I couldn’t deal damage to players.
Please check. Are you sure the plugin loaded without errors? Are you sure you’re not in a PvP zone? Are you sure you're not in a team with friendly fire enabled?

Made a video for you, completely blank server with only v0.1.16 loaded and Monument watcher, no where near any monuments / pvp zones this is a small 1800 dev map.
Default configuration loaded also and no permissions assigned (assuming defaults).

https://medal.tv/games/rust/clips/k1gl4v6pdi-pUNf-1?invite=cr-MSwySXYsMjA2MjI0ODgy

As you can see he can attack me and I can attack him and we can actually kill but not loot each other.

Same issue does not happen in 0.1.14 or 0.1.15 as I've tested that.

PS: No console or F1 errors.

 

Edited by Stewie
Stewie

Posted

8 minutes ago, IIIaKa said:

The issue is not with RealPVE but with Carbon. For some unclear reason, the overload OnEntityTakeDamage(BasePlayer, HitInfo) doesn't work, and the damage is received in object OnEntityTakeDamage(BaseCombatEntity, HitInfo).

https://codefling.com/files/support/20694-onentitytakedamagebaseplayer-hitinfo/

Thank you this makes total sense. I just added debug statements to your code specifically making sure the harmony patches loaded and that when a player attacks another player it triggers. It seems your plugin has zero knowledge of the other player attacking me as such matches with what you shared above. Hopefully carbon can solve it!

  • Like 1
IIIaKa

Posted (edited)

5 minutes ago, Stewie said:

Thank you this makes total sense. I just added debug statements to your code specifically making sure the harmony patches loaded and that when a player attacks another player it triggers. It seems your plugin has zero knowledge of the other player attacking me as such matches with what you shared above. Hopefully carbon can solve it!

Temporary workaround, until Carbon is fixed, find the method 'object OnEntityTakeDamage(BaseCombatEntity' in the plugin, and inside the method, add the following lines.

if (entity is BasePlayer victim)
	return OnEntityTakeDamage(victim, info);

rPlp4L2.png


I also suspect that the other overloads are affected as well...

Edited by IIIaKa
  • Love 1
Stewie

Posted

19 minutes ago, IIIaKa said:

Temporary workaround, until Carbon is fixed, find the method 'object OnEntityTakeDamage(BaseCombatEntity' in the plugin, and inside the method, add the following lines.

if (entity is BasePlayer victim)
	return OnEntityTakeDamage(victim, info);

rPlp4L2.png


I also suspect that the other overloads are affected as well...

thanks I can confirm that fixes the PVP side of the plugin.

Raul is on the CF Discord if you want to speak to him (he tagged you) as he thinks this is not a Carbon issue.

IIIaKa

Posted (edited)

del

Edited by IIIaKa
IIIaKa

Posted

@Stewie
I understand, if you move the method object OnEntityTakeDamage(BaseCombatEntity) after all the other OnEntityTakeDamage methods, the overload will be called correctly.

Stewie

Posted

6 minutes ago, IIIaKa said:

@Stewie
I understand, if you move the method object OnEntityTakeDamage(BaseCombatEntity) after all the other OnEntityTakeDamage methods, the overload will be called correctly.

if that is the proposed full fix could you maybe push out an update v0.1.17? Or you still think this is a carbon issue?

Stewie

Posted

@IIIaKaCarbon have apparently fixed the broken hooks and pushed this out. Still looks like your plugin is broken unless I use the workarounds you provided.


1.7m

Downloads

Total number of downloads.

7.9k

Customers

Total customers served.

119.1k

Files Sold

Total number of files sold.

2.4m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.