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

[TFC] Entity Error #2381

Closed
DarthMan opened this issue May 3, 2019 · 9 comments

Comments

Projects
None yet
6 participants
@DarthMan
Copy link

commented May 3, 2019

Hello. Basically with new TFC there's an issue with plug-ins that use Hamsandwich and Orpheu especially for virtual functions. Hooking CBasePlayer::Kiled, when a player is killed I get this: FATAL ERROR (shutting down): Bad entity in IndexOfEdict() and the server crashes . This doesn't happen on other HL1 engine-based games, just TFC. Hooking the DeathMsg event works fine and doesn't make the server crash, but it's not a reliable method to detect when a player is killed. There are cases when a player can be killed by an entity and the event would not be sent to the client.

@SamVanheer

This comment has been minimized.

Copy link

commented May 3, 2019

Sounds like you may be using an out of date offset list, ask for help on the AMX Mod X forums. This issue is beyond the purview of this issue tracker.

@DarthMan

This comment has been minimized.

Copy link
Author

commented May 3, 2019

Offsets should be fine. I checked andI have the latest hamdata, and Killed sometimes works just fine.

@PM32

This comment has been minimized.

Copy link

commented May 3, 2019

Are you using Orpheu or other 3rd party addons that hooks gamedll functions? This is actually not related to the main valve's purpose on "fixing" things, because it's not broken. I agree with @SamVanheer , you should check your addons

@DarthMan

This comment has been minimized.

Copy link
Author

commented May 3, 2019

People from Allied Modders no longer care about a thing. They didn't care to update gamedata offsets for Fortress Forever. All they care about is Counter-Strike games, that's all. For a game like TFC I'm pretty sure nobody, not even Arkshine would look and make sure all offsets are right. No CS = No support ! Anyways, I updated using the beta command and now I think everything's fixed. Because so far I've been playing on my server for a few hours and no crashes.

@LucesEnBabel

This comment has been minimized.

Copy link

commented May 3, 2019

Sadly if there's no one to create an updated hamdata.ini file for TFC you can't really force them, but the thing about Open Source projects like AMXX is that people can volunteer and create pull requests containing the updated indexes.

@DarthMan

This comment has been minimized.

Copy link
Author

commented May 3, 2019

But the hamdata I believe is right, some linux difference offsets for pdata changed from 4 to 5 and I guess that's it.

@Arkshine

This comment has been minimized.

Copy link

commented May 3, 2019

The virtual table seems to be unchanged at first glance.

Talking about Hamsandwich.
Does it crash if you're hooking Killed alone and does the param values seems correct?
If no crash, please identify first what is the cause from your code and report back.

@DarthMan

This comment has been minimized.

Copy link
Author

commented May 3, 2019

The virtual table seems to be unchanged unless i'm wrong.

Talking about Hamsandwich.
Does it crash if you're hooking Killed alone and does the param values seems correct?
If no crash, please identify first what is the cause from your code and report back.

It no longer seems to crash. Either my tfc.dll was buggy or idk. Updated to beta and now everything seems fine. By the way Arkshine, are u able to compile Observer_SetMode for me? I need Rage ahndler and function to be able to call it in a plug-in that I'm working on. I have already made the signature, but I can't seem to be able to make the stuff right because when the plug-in is loaded it simply crashes.

About pdata offsets, a few were changed. For example ammo_shells on Windows is 53 but now the linux difference is 5. Previously it was 4 and on the old 2012 linux .so it was 3. A friend tested on his server and it didn't work with 4, but did with 5.

I posted on AM about CBasePlayer::StartObserver . Would be cool if you can share it there so other can see it too. https://forums.alliedmods.net/showthread.php?t=179706&page=21

@PM32

This comment has been minimized.

Copy link

commented May 3, 2019

The virtual table seems to be unchanged unless i'm wrong.
Talking about Hamsandwich.
Does it crash if you're hooking Killed alone and does the param values seems correct?
If no crash, please identify first what is the cause from your code and report back.

It no longer seems to crash. Either my tfc.dll was buggy or idk. Updated to beta and now everything seems fine. By the way Arkshine, are u able to compile Observer_SetMode for me? I need Rage ahndler and function to be able to call it in a plug-in that I'm working on. I have already made the signature, but I can't seem to be able to make the stuff right because when the plug-in is loaded it simply crashes.

About pdata offsets, a few were changed. For example ammo_shells on Windows is 53 but now the linux difference is 5. Previously it was 4 and on the old 2012 linux .so it was 3. A friend tested on his server and it didn't work with 4, but did with 5.

I posted on AM about CBasePlayer::StartObserver . Would be cool if you can share it there so other can see it too. https://forums.alliedmods.net/showthread.php?t=179706&page=21

Are you aware that this is not the right section to ask that? Here we are debating engine's enhancement, please leave your modding doubt on Alliedmodders on it respective section

@DarthMan DarthMan closed this May 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.