Hamsandwich Updating
This update is now integrated to the next 1.8.3 version.
LASTEST VERSION CAN BE DOWNLOADED FROM THERE : https://forums.alliedmods.net/showpo...9&postcount=34 Hello dear individuals. To begin, me and Arkshine are fixing the functions in hamsandwich that return a Vector (so they can be executed since the could for hooks is ok). It is fixed in Windows and I'm guessing that in linux it won't need to be fixed because it is done other way. So, we would like to ask if someone can test in Linux to execute with ExecuteHam: at least one of these functions: Code:
Ham_Center Code:
Ham_BodyTarget |
Re: Setting a client's maxspeed permanently and efficiently
Tested and work fine.
|
Re: Setting a client's maxspeed permanently and efficiently
Quote:
The "project" will be at this address: https://github.com/joaquimandrade/Hamsandwich-Update/ If someone is experienced with this of github that is a new world for me (that's why the author is the misterious unknown (as fysiks kindly pointed to me in steam)), I kindly accept suggestions. For now you can check the current advances at https://github.com/joaquimandrade/Ha...pdate/commits/ |
Re: Setting a client's maxspeed permanently and efficiently
1 Attachment(s)
Added so far (after the name there is the return type and arguments, please tell me if you don't understand. This is needed because documentation isn't ready yet):
Added to CS and DOD Code:
Ham_ChangeYaw, float (id,int) Code:
Ham_CS_ResetMaxSpeed void(id) (the one already being used with the trick reported on this thread) Code:
Ham_DOD_Item_SpawnDeploy int (id) Code:
Ham_Center |
Re: Setting a client's maxspeed permanently and efficiently
Here goes a stupid example. When you scream in pain it also shows gibs. Also it shows how you can write more concise and efficient code when more functions are exposed:
PHP Code:
|
Re: Setting a client's maxspeed permanently and efficiently
Edit: (This post was made before this thread was here in "Module Coding")
As my good friend fysiks wisely pointed me, this thread is no place for this. I therefore request, if you don't mind, if you can split the posts related to the hamsandwich update to a new thread in Module Coding with a name related to "Hamsandwich Updating" or something like that. Thanks in advance. |
Re: Hamsandwich Updating
Thanks.
|
Re: Hamsandwich Updating
You forgot to close your comment on line 964 of ham_const.inc FYI.
EDIT: So, I was working with Ham_DOD_Weapon_ZoomIn and Ham_DOD_Weapon_ZoomOut and the latter really screws things up just by hooking it: PHP Code:
|
Re: Hamsandwich Updating
2 Attachment(s)
fysiks, the comment thing is because there are nested comments that are there so one does not forget to update the documentation. It's ok.
Now, to the bug. My guess is that that is failing because I assumed that the function doesn't return a value and it indeed returns. Im gonna attach two versions of the library. One that returns an integer and other that returns a float (by ref). When you use them remove the prefix. Unfortunately I'm not being able to test myself because my windows client isn't able to access my linux server I have to figure out why. Also issue the following command on the console: Code:
ham hooks Code:
Key | Classname | Pre | Post |
Re: Hamsandwich Updating
Dear fysiks, had the chance to test it out and is indeed the return type. It must be set to int so the int_ file I've sent you should work (please test it because I tested on Windows alone but it should be fine). It seems that if you return values higher than 0 it applies an effect on the player (like an effect because you zoomed out). Thanks for detecting that.
|
Re: Hamsandwich Updating
Thanks, int_* fixed it.
|
Re: Hamsandwich Updating
2 Attachment(s)
joaquimandrade, please, may you find and add offsets for Adrenaline Gamer 6.6 Steam and Opposing Force to new hamdata.ini? It would be very useful for half-life scripters.
|
Re: Hamsandwich Updating
Quote:
Now, let me warn you in advance that the functions that hamsandwich support are a relatively small subset called virtual functions so they might be not that useful for you so don't raise your expectations too much. |
Re: Hamsandwich Updating
Checked the library of "Adrenaline Gamer 6.6" and those are the only functions that seem to be useful:
Code:
CTurret::SpinDownCall(void) |
Re: Hamsandwich Updating
Thanks for your reply :)
|
Re: Hamsandwich Updating
Quote:
|
Re: Hamsandwich Updating
Yep, i am searching for having the "normal" hamsandwich functions for those mods. I have already found offsets for ag and op4, but not sure if they 100% right.
Code:
@section ag linux |
Re: Hamsandwich Updating
How did you do to find them? By the way, how did you find "base"
|
Re: Hamsandwich Updating
Going to check and adding them, KORD_12.7. Thanks.
EDIT: There is no linux binary for OP4 ? I guess offsets are the same as HLDM. |
Re: Hamsandwich Updating
Quote:
And one man helped me to find op4 offsets without linux binary (but not shure if they 100% right, need to check :D). Quote:
|
Re: Hamsandwich Updating
Quote:
Arkshine added the offsets, you can check it here: https://github.com/joaquimandrade/Hamsandwich-Update Now, I don't know if he tested them but since there is no linux binary what you can do to put it together yourself is to start from the first function and try to find the first that makes it crash. If you find it try to see if you add +1 it doesn't crash anymore (try this 3 times). If it works as It should increase the next offsets of the list by the same amount you increased that one. If it doesn't maybe they have different headers so pass to the next function and tell us :) Example: Code:
scream 32 Make it 34. It works? make shut 35, stuff 36, levitate 37. It doesn't? make it 35. It works? make shut 36, stuff 37, levitate 38. It doesn't? make it 36 It works? make shut 37, stuff 38, levitate 39. It doesn't? ignore it and check shut. |
Re: Hamsandwich Updating
Ok, I will try to check them with your method :)
|
Re: Hamsandwich Updating
Hey, cool stuff you guys have here!
I have quite some experience with Git and Github so if you want any help feel free to ask. I can also test on a Linux server. Keep on with the nice work :) |
Re: Hamsandwich Updating
Quote:
The purpose of this "project" is to make a "final" version of hamsandwich with all functions functional, no bugs, and more mod specific functions. So, everyone is welcome to join us helping in make the documentation better, suggestions, point us to other mods, code, whatever. We shall call it then Hamsandwich Community Edition :D |
Re: Hamsandwich Updating
I have just checked up these offsets for AG 6.6
Code:
@section ag linux For now, windows section of ag offsets is incorrect in repository: https://github.com/joaquimandrade/Ha...ig/hamdata.ini |
Re: Hamsandwich Updating
Thank you for helping! Arkshine should add them tomorrow. If you want to and are comfortable with git I can give you access to make modifications yourself.
Just a little thing, you are missing a space in "item_postframe70" :wink: |
Re: Hamsandwich Updating
Quote:
Quote:
Quote:
|
Re: Hamsandwich Updating
Here is correct gearbox offsets (i'm checked it with "dance" crashes :) )
Need do update git. Code:
@section gearbox windows 672: Code:
* Execute params: ExecuteHam(Ham_Item_Drop, this); Code:
* Execute params: ExecuteHam(Ham_Item_Kill, this); |
Re: Hamsandwich Updating
Changes are done, KORD_12.7. New offsets have been added after fvecvisible, it would be nice if you could check them too. Thanks.
|
Re: Hamsandwich Updating
I have checked new offsets after fvecvisible for ag in IDA, it's fine. About op4, i dont know description of these new functions and so i dont know how to organize right "dance" crashes for them, sorry :)
|
Re: Hamsandwich Updating
Quote:
|
Re: Hamsandwich Updating
I've noticed Arkshine is nub at Git so I'm gonna give some suggestions. :twisted:
Let's say you are going to work on function MakeMyBunnyHappy. The changes involve various files and it will take some time to finish that feature. Before you start doing your changes, update your local copy with Code:
git pull Code:
git branch makemybunnyhappy Do your work here, add stuff, modify other files, and make your bunny happy. Remember to commit groups of changes that belong to the same logical group (e.g. 'including makemybunnyhappy signature in the list of known functions', or 'make IsBunnySad automatically call MakeMyBunnyHappy if bunny is sad :('). When you're finally done with the changes related to MakeMyBunnyHappy, make sure you've committed your local changes. Now it's time to merge your changes back into master. First, update your local copy with Code:
git pull Code:
git merge master If your changes don't conflict with the changes in the master branch, you're done, you can just push your changes. In the case git-merge finds conflicts, it will include markers in the files telling where there are conflicts. Use Code:
git diff Remember, fixing merge conflicts isn't just a matter of merging code changes, you have to test, see if it does what it's supposed to do, etc. After you fix the conflicts, Code:
git commit -a That's it, once you get the hang of branching, you see how easy it is to develop concurrently without conflicting with other peoples' changes. http://www.lucidchart.com/publicSegm...8a40/image.png |
Re: Hamsandwich Updating
There is no trouble in concurrent updating because I'm the only one updating despite the project having 4 people. :twisted:
|
Re: Hamsandwich Updating
EDIT: Attachment removed. This update is now integrated to 1.8.3.
Almost all virtual functions related to player/weapon has been added for each mods. Please note the module title and version are temporary changed. v1.4 is the last version (2013, 14 April). Fixed from original : Vector as return is now fixed. All functions returning a vector won't crash anymore. (Ham_GetGunPosition, Ham_Center, etc.. )New mods supported Deathmatch ClassicNew functions added :
We need people willing to test seriously under windows and linux. All people are welcomed to complete the documentation of each function. |
Re: Hamsandwich Updating
I think Seta is thinking about keeping the publicly accessible version stable as opposed to a "public 'in-progress' version". If I go pull it at any time, it should be a stable or semi-stable version that someone would be able to modify from (as opposed to modifying a non-working version meaning my new version is also non-working).
|
Re: Hamsandwich Updating
Quote:
|
Re: Hamsandwich Updating
Quote:
Code:
git flow feature start myShinyFeature |
Re: Hamsandwich Updating
Code:
; Sven-Coop has no linux binaries. This makes disassembly much harder. i dont can get offsets with "IDA Pro Advanced" becourse i to stupit for that, so i write plugins and test when, HAM_*** on entitys and players. if i found more i edit this post and pm askshrine :) all tested was counted. |
Re: Hamsandwich Updating
You shouldn't have bothered with ESF Open Beta since noone plays it. Some update for the most stable and played version 1.2.3 would be great.
|
Re: Hamsandwich Updating
L 06/29/2011 - 14:27:47: [AMXX] [1] zombie_mm_ver5.0.sma::fw_CmdStart (line3756)
L 06/29/2011 - 14:27:48: [HAMSANDWICH] Bad arg count. Expected 4, got 3. L 06/29/2011 - 14:27:48: [AMXX] Displaying debug trace (plugin"zombie_mm_ver5.0.amxx") L 06/29/2011 - 14:27:48: [AMXX] Run time error 10: native error (native "ExecuteHamB") L 06/29/2011 - 14:27:48: [AMXX] [0] zombie_mm_ver5.0.sma::UTIL_PlayWeaponAnimatio n (line 14703) Ham_CS_Weapon_SendWeaponAnim. |
All times are GMT -4. The time now is 13:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.