-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Crash - Ham_Item_GetWeaponPtr #754
Comments
Can you please provide a simple test plugin and how to reproduce the crash? Also, please try again, and before, update to the latest AMXX version, whatever 1.9 or master. |
Sure, I'll make a test example. But my guess is that it crashes simply because it's checking if an entity that's actually not an item is a weapon. So more like if being called on classes such as info_target it would crash, whereas with classes such as item_ it will return -1 and weapon_ the weapon entity id. |
Here I'm attaching a test plug-in. Also, can you update the gamedata files for TFC and the other goldsrc games excluding CS 1.6? It seems that a new memebr was added to CbaseMonster so some pdata offsets are no longer valid. In this example it is suposed to check if the player is a weapon, but, rather than crashing, still return -1 even if it's not part of CBasePlayerItem/Weapon. But it crashes instead. Test it on TFC. I am using latest AMXX v1.10 dev build.
|
Also, take a look here: ValveSoftware/halflife#2458 m_flLastYawTime or whatever is the new member that was added. |
Please keep content related only to the actual issue. I've already created one in #765. |
This comment has been minimized.
This comment has been minimized.
Have you tested the attached plug-in? Does it crash the server? My intention was to use it on my EntMod when searching for entities to tell if an entity is a weapon, then get it's owner, if ti equals the player, skip it. That's because I sue a special technique for the ent to grab entities with solidity <= SOLID_TRIGGER. So that's what I was tyring to use the function for. I was hoping that it would return -1, but it crashed the server. |
I can reproduce the crash under windows. Basically, the function from the game returns @WPMGPRoSToTeMa any idea? |
Hello. I have not tested in other Half-Life One engine based games, but on the internet computer game Team Fortress Classic the HAM forward Ham_Item_GetWeaponPtr crashes the server whenever being used on a valid entity edict. So if I do something like if(ExecuteHam(Ham_Item_GetWeaponPtr, iEnt) != FM_NULLENT) where iEnt is a valid entity edict that exists on the map I am getting a nice crash with no errors on Windows, but segmentation fault on Linux. The forward is supposed to return minus one if the given entity is not a weapon, the correct entity identifier otherwise.
The text was updated successfully, but these errors were encountered: