AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   Hamsandwich Updating (https://forums.alliedmods.net/showthread.php?t=159814)

joaquimandrade 06-21-2011 12:56

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
Ham_EyePosition
Ham_EarPosition
Ham_Player_GetGunPosition

and this one:
Code:

Ham_BodyTarget
Thank you!

fysiks 06-21-2011 15:09

Re: Setting a client's maxspeed permanently and efficiently
 
Tested and work fine.

joaquimandrade 06-21-2011 15:20

Re: Setting a client's maxspeed permanently and efficiently
 
Quote:

Originally Posted by fysiks (Post 1493030)
Tested and work fine.

Thank you!

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/

joaquimandrade 06-21-2011 21:54

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)
    Ham_HasHumanGibs, int (id)
    Ham_Has_AlienGibs, int (id)
    Ham_FadeMonster, void (id)
    Ham_GibMonster, void (id)
    Ham_BecomeDead, void (id)
    Ham_IRelationship, int (id,entity)
    Ham_PainSound,  void (id)
    Ham_ReportAIState, void (id)
    Ham_MonsterInitDead, void (id)
    Ham_Look, void (id)
    Ham_BestVisibleEnemy, entity (id)

To CS:

Code:

Ham_CS_ResetMaxSpeed void(id) (the one already being used with the trick reported on this thread)
To DOD:
Code:

    Ham_DOD_Item_SpawnDeploy int (id)
    Ham_DOD_Item_SetDmgTime void (id,float)
    Ham_DOD_Item_DropGren void (id)
    Ham_DOD_Weapon_IsUseable int (id)
    Ham_DOD_Weapon_Aim, void (id,float,ent,int)
    Ham_DOD_Weapon_flAim, void (id,int,float)
    Ham_DOD_Weapon_ChangeFOV, void (id,int)
    Ham_DOD_Weapon_ZoomOut, void (id)
    Ham_DOD_Weapon_ZoomIn, void (id)
    Ham_DOD_Weapon_GetFOV, int (id)
    Ham_DOD_Weapon_IsWaterSniping, int (id)
    Ham_DOD_Weapon_UpdateZoomSpeed, void (id)

Also fixed the calling of those functions that return a vector, namely:

Code:

Ham_Center
Ham_EyePosition
Ham_EarPosition
Ham_Player_GetGunPosition
Ham_BodyTarget

Please help testing it

joaquimandrade 06-21-2011 22:51

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:

#include <amxmodx>
#include <fakemeta>
#include <fakemeta_stocks>
#include <hamsandwich>
#include <xs>

#define PLUGIN    "New Plugin"
#define AUTHOR    "Unknown"
#define VERSION    "1.0"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_PainSound,"player","painSound",0)
}

public 
painSound(id)
{
    new 
Float:eyes[3]
    
    
ExecuteHam(Ham_EyePosition,id,eyes)
    
    
// Equivalent to:
    
new Float:origin[3], Float:view_ofs[3]
    
pev(id,pev_origin,origin)
    
pev(id,pev_view_ofs,view_ofs)
    
xs_vec_add(origin,view_ofs,origin)
    
//
    
    
ExecuteHam(Ham_GibMonster,id)
    
    
client_print(0,print_chat,"These vectors should be equal [%f][%f][%f] - [%f][%f][%f]",origin[0],origin[1],origin[2],eyes[0],eyes[1],eyes[2])



joaquimandrade 06-21-2011 23:04

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.

ConnorMcLeod 06-22-2011 01:52

Re: Hamsandwich Updating
 
Thanks.

fysiks 06-22-2011 02:10

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:

    RegisterHam(Ham_DOD_Weapon_ZoomOut"weapon_spring""hookSpringZoomOut")

public 
hookSpringZoomOut(wepent)
{



This will affect gameplay, it's hard to explain but it certainly makes playing with the springfield screwy.

joaquimandrade 06-22-2011 10:04

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
Just to confirm that it throws:

Code:

Key                      | Classname                  |        Pre |      Post
--------------------------------------------------------------------------------
dod_weapon_zoomout      | weapon_spring              |          1 |          0


joaquimandrade 06-22-2011 11:37

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.

fysiks 06-22-2011 15:35

Re: Hamsandwich Updating
 
Thanks, int_* fixed it.

KORD_12.7 06-22-2011 21:21

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.

joaquimandrade 06-22-2011 21:28

Re: Hamsandwich Updating
 
Quote:

Originally Posted by KORD_12.7 (Post 1493884)
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.

Sure we can and I thank you for bringing those to our attention. The dll is no good for this because dlls get metadata stuff thrown out at compilation. But opposing force is on the default list on steam so I will get it myself if you can't.

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.

joaquimandrade 06-22-2011 21:38

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)
CTurret::SpinUpCall(void)
CBaseTurret::Ping(void)
CBaseTurret::EyeOn(void)
CBaseTurret::EyeOff(void)
CTurret::Shoot(Vector &, Vector &)

The last one might not have a compatible header defined in hamsandwich but maybe that can be worked out.

KORD_12.7 06-22-2011 21:56

Re: Hamsandwich Updating
 
Thanks for your reply :)

joaquimandrade 06-23-2011 00:47

Re: Hamsandwich Updating
 
Quote:

Originally Posted by KORD_12.7 (Post 1493896)
Thanks for your reply :)

But look, don't know if you are aware of that but the function that are already in hamsandwich can also be used in those mods because they are generic. I was pointing you just the mod specific ones. If you are searching for having the "normal" hamsandwich functions for those mods is just a matter of finding theirs offsets that is simple

KORD_12.7 06-23-2011 02:12

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
        pev 0
        base 0x60
       
        spawn 2
        precache 3
        keyvalue 4
        objectcaps 7
        activate 8
        setobjectcollisionbox 9
        classify 10
        deathnotice 11
        traceattack 12
        takedamage 13
        takehealth 14
        killed 15
        bloodcolor 16
        tracebleed 17
        istriggered 18
        mymonsterpointer 19
        mysquadmonsterpointer 20
        gettogglestate 21
        addpoints 22
        addpointstoteam 23
        addplayeritem 24
        removeplayeritem 25
        giveammo 26
        getdelay 27
        ismoving 28
        overridereset 29
        damagedecal 30
        settogglestate 31
        startsneaking 32
        stopsneaking 33
        oncontrols 34
        issneaking 35
        isalive 36
        isbspmodel 37
        reflectgauss 38
        hastarget 39
        isinworld 40
        isplayer 41
        isnetclient 42
        teamid 43
        getnexttarget 44
        think 45
        touch 46
        use 47
        blocked 48
        respawn 50
        updateowner 51
        fbecomeprone 52
        center 53
        eyeposition 54
        earposition 55
        bodytarget 56
        illumination 57
        fvisible 58
        fvecvisible 59
       
        player_jump 129
        player_duck 130
        player_prethink 131
        player_postthink 132
        player_getgunposition 123
        player_shouldfadeondeath 64
        player_impulsecommands 134
        player_updateclientdata  133
       
        item_addtoplayer 61
        item_addduplicate 62
        item_getiteminfo 63
        item_candeploy 64
        item_deploy 65
        item_canholster 66
        item_holster 67
        item_updateiteminfo 68
        item_preframe 69
        item_postframe70
        item_drop 71
        item_kill 72
        item_attachtoplayer 73
        item_primaryammoindex 74
        item_secondaryammoindex 75
        item_updateclientdata 76
        item_getweaponptr 77
        item_itemslot 78
       
        weapon_extractammo 79
        weapon_extractclipammo 80
        weapon_addweapon 81
        weapon_playemptysound 82
        weapon_resetemptysound 83
        weapon_sendweaponanim 84
        weapon_isusable 85
        weapon_primaryattack 86
        weapon_secondaryattack 87
        weapon_reload 88
        weapon_weaponidle 89
        weapon_retireweapon 90
        weapon_shouldweaponidle 91
        weapon_usedecrement 92
       
@end
@section ag windows
        pev 4
        base 0x0
       
        spawn 0
        precache 1
        keyvalue 2
        objectcaps 5
        activate 6
        setobjectcollisionbox 7
        classify 8
        deathnotice 9
        traceattack 10
        takedamage 11
        takehealth 12
        killed 13
        bloodcolor 14
        tracebleed 15
        istriggered 16
        mymonsterpointer 17
        mysquadmonsterpointer 18
        gettogglestate 19
        addpoints 20
        addpointstoteam 21
        addplayeritem 22
        removeplayeritem 23
        giveammo 24
        getdelay 25
        ismoving 26
        overridereset 27
        damagedecal 28
        settogglestate 29
        startsneaking 30
        stopsneaking 31
        oncontrols 32
        issneaking 33
        isalive 34
        isbspmodel 35
        reflectgauss 36
        hastarget 37
        isinworld 38
        isplayer 39
        isnetclient 40
        teamid 41
        getnexttarget 42
        think 43
        touch 44
        use 45
        blocked 46
        respawn 48
        updateowner 49
        fbecomeprone 50
        center 51
        eyeposition 52
        earposition 53
        bodytarget 54
        illumination 55
        fvisible 56
        fvecvisible 57
       
        player_jump 127
        player_duck 128
        player_prethink 129
        player_postthink 130
        player_getgunposition 121
        player_shouldfadeondeath 62
        player_impulsecommands 132
        player_updateclientdata  131
       
        item_addtoplayer 59
        item_addduplicate 60
        item_getiteminfo 61
        item_candeploy 62
        item_deploy 63
        item_canholster 64
        item_holster 65
        item_updateiteminfo 66
        item_preframe 67
        item_postframe 68
        item_drop 69
        item_kill 70
        item_attachtoplayer 71
        item_primaryammoindex 72
        item_secondaryammoindex 73
        item_updateclientdata 74
        item_getweaponptr 75
        item_itemslot 76
       
        weapon_extractammo 77
        weapon_extractclipammo 78
        weapon_addweapon 79
        weapon_playemptysound 80
        weapon_resetemptysound 81
        weapon_sendweaponanim 82
        weapon_isusable 83
        weapon_primaryattack 84
        weapon_secondaryattack 85
        weapon_reload 86
        weapon_weaponidle 87
        weapon_retireweapon 88
        weapon_shouldweaponidle 89
        weapon_usedecrement 90
       
@end


@section gearbox windows
        pev 4
        base 0x0
       
        spawn 0
        precache 1
        keyvalue 2
        objectcaps 5
        activate 6
        setobjectcollisionbox 7
        classify 8
        deathnotice 9
        traceattack 10
        takedamage 11
        takehealth 12
        killed 13
        bloodcolor 14
        tracebleed 15
        istriggered 16
        mymonsterpointer 17
        mysquadmonsterpointer 18
        gettogglestate 19
        addpoints 21
        addpointstoteam 22
        addplayeritem 23
        removeplayeritem 24
        giveammo 25
        getdelay 26
        ismoving 27
        overridereset 28
        damagedecal 29
        settogglestate 30
        startsneaking 31
        stopsneaking 32
        oncontrols 33
        issneaking 34
        isalive 35
        isbspmodel 36
        reflectgauss 37
        hastarget 38
        isinworld 39
        isplayer 40
        isnetclient 41
        teamid 42
        getnexttarget 43
        think 44
        touch 45
        use 46
        blocked 47
        respawn 48
        updateowner 49
        fbecomeprone 50
        center 51
        eyeposition 52
        earposition 53
        bodytarget 54
        illumination 55
        fvisible 56
        fvecvisible 57
       
        player_jump 127
        player_duck 128
        player_prethink 129
        player_postthink 130
        player_getgunposition 121
        player_shouldfadeondeath 58
        player_impulsecommands 132
        player_updateclientdata  131
       
        item_addtoplayer 60
        item_addduplicate 61
        item_getiteminfo 62
        item_candeploy 63
        item_deploy 64
        item_canholster 65
        item_holster 66
        item_updateiteminfo 67
        item_preframe 68
        item_postframe 69
        item_drop 70
        item_kill 71
        item_attachtoplayer 72
        item_primaryammoindex 73
        item_secondaryammoindex 74
        item_updateclientdata 76
        item_getweaponptr 77
        item_itemslot 78
       
        weapon_extractammo 79
        weapon_extractclipammo 80
        weapon_addweapon 81
        weapon_playemptysound 82
        weapon_resetemptysound 83
        weapon_sendweaponanim 84
        weapon_isusable 85
        weapon_primaryattack 86
        weapon_secondaryattack 87
        weapon_reload 88
        weapon_weaponidle 89
        weapon_retireweapon 90
        weapon_shouldweaponidle 91
        weapon_usedecrement 92
@end


joaquimandrade 06-23-2011 10:21

Re: Hamsandwich Updating
 
How did you do to find them? By the way, how did you find "base"

Arkshine 06-23-2011 11:18

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.

KORD_12.7 06-23-2011 19:08

Re: Hamsandwich Updating
 
Quote:

Originally Posted by joaquimandrade (Post 1494170)
How did you do to find them? By the way, how did you find "base"

I have used IDA and yours with Arkshine tutorials to find ag offsets. :)
And one man helped me to find op4 offsets without linux binary (but not shure if they 100% right, need to check :D).

Quote:

Originally Posted by Arkshine
There is no linux binary for OP4 ? I guess offsets are the same as HLDM.

Op4 offsets not the same as hldm. I have tested some hl plugins in op4 with "@mirror valve gearbox" and there was crashes.

joaquimandrade 06-23-2011 19:36

Re: Hamsandwich Updating
 
Quote:

Originally Posted by KORD_12.7 (Post 1494509)
I have used IDA and yours with Arkshine tutorials to find ag offsets. :)
And one man helped me to find op4 offsets without linux binary (but not shure if they 100% right, need to check :D).


Op4 offsets not the same as hldm. I have tested some hl plugins in op4 with "@mirror valve gearbox" and there was crashes.

Ok :). I asked because I was curious to know other techniques and for "base" and "pev" me and Arkshine didn't even have one that didn't deal with making c++ code to figure them out brute force style but we figured out today a clean way to get them :D

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
dance 33
shut 34
stuff 35
levitate 36

"dance" crashes.
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.

KORD_12.7 06-23-2011 19:45

Re: Hamsandwich Updating
 
Ok, I will try to check them with your method :)

Seta00 06-24-2011 17:06

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 :)

joaquimandrade 06-24-2011 18:05

Re: Hamsandwich Updating
 
Quote:

Originally Posted by Seta00 (Post 1495595)
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 :)

Thanks :D

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

KORD_12.7 06-24-2011 22:08

Re: Hamsandwich Updating
 
I have just checked up these offsets for AG 6.6
Code:

@section ag linux
        pev 0
        base 0x60
       
        spawn 2
        precache 3
        keyvalue 4
        objectcaps 7
        activate 8
        setobjectcollisionbox 9
        classify 10
        deathnotice 11
        traceattack 12
        takedamage 13
        takehealth 14
        killed 15
        bloodcolor 16
        tracebleed 17
        istriggered 18
        mymonsterpointer 19
        mysquadmonsterpointer 20
        gettogglestate 21
        addpoints 22
        addpointstoteam 23
        addplayeritem 24
        removeplayeritem 25
        giveammo 26
        getdelay 27
        ismoving 28
        overridereset 29
        damagedecal 30
        settogglestate 31
        startsneaking 32
        stopsneaking 33
        oncontrols 34
        issneaking 35
        isalive 36
        isbspmodel 37
        reflectgauss 38
        hastarget 39
        isinworld 40
        isplayer 41
        isnetclient 42
        teamid 43
        getnexttarget 44
        think 45
        touch 46
        use 47
        blocked 48
        respawn 50
        updateowner 51
        fbecomeprone 52
        center 53
        eyeposition 54
        earposition 55
        bodytarget 56
        illumination 57
        fvisible 58
        fvecvisible 59
       
        player_jump 129
        player_duck 130
        player_prethink 131
        player_postthink 132
        player_getgunposition 123
        player_shouldfadeondeath 64
        player_impulsecommands 134
        player_updateclientdata  133
       
        item_addtoplayer 61
        item_addduplicate 62
        item_getiteminfo 63
        item_candeploy 64
        item_deploy 65
        item_canholster 66
        item_holster 67
        item_updateiteminfo 68
        item_preframe 69
        item_postframe 70
        item_drop 71
        item_kill 72
        item_attachtoplayer 73
        item_primaryammoindex 74
        item_secondaryammoindex 75
        item_updateclientdata 76
        item_getweaponptr 77
        item_itemslot 78
       
        weapon_extractammo 79
        weapon_extractclipammo 80
        weapon_addweapon 81
        weapon_playemptysound 82
        weapon_resetemptysound 83
        weapon_sendweaponanim 84
        weapon_isusable 85
        weapon_primaryattack 86
        weapon_secondaryattack 87
        weapon_reload 88
        weapon_weaponidle 89
        weapon_retireweapon 90
        weapon_shouldweaponidle 91
        weapon_usedecrement 92
       
@end
@section ag windows
        pev 4
        base 0x0
       
        spawn 0
        precache 1
        keyvalue 2
        objectcaps 5
        activate 6
        setobjectcollisionbox 7
        classify 8
        deathnotice 9
        traceattack 10
        takedamage 11
        takehealth 12
        killed 13
        bloodcolor 14
        tracebleed 15
        istriggered 16
        mymonsterpointer 17
        mysquadmonsterpointer 18
        gettogglestate 19
        addpoints 20
        addpointstoteam 21
        addplayeritem 22
        removeplayeritem 23
        giveammo 24
        getdelay 25
        ismoving 26
        overridereset 27
        damagedecal 28
        settogglestate 29
        startsneaking 30
        stopsneaking 31
        oncontrols 32
        issneaking 33
        isalive 34
        isbspmodel 35
        reflectgauss 36
        hastarget 37
        isinworld 38
        isplayer 39
        isnetclient 40
        teamid 41
        getnexttarget 42
        think 43
        touch 44
        use 45
        blocked 46
        respawn 48
        updateowner 49
        fbecomeprone 50
        center 51
        eyeposition 52
        earposition 53
        bodytarget 54
        illumination 55
        fvisible 56
        fvecvisible 57
       
        player_jump 127
        player_duck 128
        player_prethink 129
        player_postthink 130
        player_getgunposition 121
        player_shouldfadeondeath 62
        player_impulsecommands 132
        player_updateclientdata  131
       
        item_addtoplayer 59
        item_addduplicate 60
        item_getiteminfo 61
        item_candeploy 62
        item_deploy 63
        item_canholster 64
        item_holster 65
        item_updateiteminfo 66
        item_preframe 67
        item_postframe 68
        item_drop 69
        item_kill 70
        item_attachtoplayer 71
        item_primaryammoindex 72
        item_secondaryammoindex 73
        item_updateclientdata 74
        item_getweaponptr 75
        item_itemslot 76
       
        weapon_extractammo 77
        weapon_extractclipammo 78
        weapon_addweapon 79
        weapon_playemptysound 80
        weapon_resetemptysound 81
        weapon_sendweaponanim 82
        weapon_isusable 83
        weapon_primaryattack 84
        weapon_secondaryattack 85
        weapon_reload 86
        weapon_weaponidle 87
        weapon_retireweapon 88
        weapon_shouldweaponidle 89
        weapon_usedecrement 90
       
@end

They are work fine. Op4 offsets next in my row :)

For now, windows section of ag offsets is incorrect in repository: https://github.com/joaquimandrade/Ha...ig/hamdata.ini

joaquimandrade 06-24-2011 22:14

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:

KORD_12.7 06-24-2011 22:29

Re: Hamsandwich Updating
 
Quote:

Thank you for helping! Arkshine should add them tomorrow.
I'm glad to help :)

Quote:

If you want to and are comfortable with git I can give you access to make modifications yourself.
It is not necessary, because i dont have working experience with SVN :oops:

Quote:

Just a little thing, you are missing a space in "item_postframe70"
Oh, my bad, fixed now :D

KORD_12.7 06-25-2011 03:39

Re: Hamsandwich Updating
 
Here is correct gearbox offsets (i'm checked it with "dance" crashes :) )
Need do update git.
Code:

@section gearbox windows
        pev 4
        base 0x0
       
        spawn 0
        precache 1
        keyvalue 2
        objectcaps 5
        activate 6
        setobjectcollisionbox 7
        classify 8
        deathnotice 9
        traceattack 10
        takedamage 11
        takehealth 12
        killed 13
        bloodcolor 14
        tracebleed 15
        istriggered 16
        mymonsterpointer 17
        mysquadmonsterpointer 18
        gettogglestate 19
        addpoints 21
        addpointstoteam 22
        addplayeritem 23
        removeplayeritem 24
        giveammo 25
        getdelay 26
        ismoving 27
        overridereset 28
        damagedecal 29
        settogglestate 30
        startsneaking 31
        stopsneaking 32
        oncontrols 33
        issneaking 34
        isalive 35
        isbspmodel 36
        reflectgauss 37
        hastarget 38
        isinworld 39
        isplayer 40
        isnetclient 41
        teamid 42
        getnexttarget 43
        think 44
        touch 45
        use 46
        blocked 47
        respawn 48
        updateowner 49
        fbecomeprone 50
        center 51
        eyeposition 52
        earposition 53
        bodytarget 54
        illumination 55
        fvisible 56
        fvecvisible 57
       
        player_jump 127
        player_duck 128
        player_prethink 129
        player_postthink 130
        player_getgunposition 121
        player_shouldfadeondeath 62
        player_impulsecommands 132
        player_updateclientdata  131
       
        item_addtoplayer 60
        item_addduplicate 61
        item_getiteminfo 62
        item_candeploy 63
        item_deploy 64
        item_canholster 65
        item_holster 66
        item_updateiteminfo 67
        item_preframe 68
        item_postframe 69
        item_drop 70
        item_kill 71
        item_attachtoplayer 72
        item_primaryammoindex 73
        item_secondaryammoindex 74
        item_updateclientdata 76
        item_getweaponptr 77
        item_itemslot 78
       
        weapon_extractammo 79
        weapon_extractclipammo 80
        weapon_addweapon 81
        weapon_playemptysound 82
        weapon_resetemptysound 83
        weapon_sendweaponanim 84
        weapon_isusable 85
        weapon_primaryattack 86
        weapon_secondaryattack 87
        weapon_reload 88
        weapon_weaponidle 89
        weapon_retireweapon 90
        weapon_shouldweaponidle 91
        weapon_usedecrement 92
@end

EDIT: Little mistake here: https://github.com/joaquimandrade/Ha.../ham_const.inc

672:
Code:

* Execute params:        ExecuteHam(Ham_Item_Drop, this);
-->
Code:

* Execute params:        ExecuteHam(Ham_Item_Kill, this);

Arkshine 06-25-2011 05:38

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.

KORD_12.7 06-25-2011 07:49

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 :)

joaquimandrade 06-25-2011 10:18

Re: Hamsandwich Updating
 
Quote:

Originally Posted by KORD_12.7 (Post 1496011)
"dance" crashes

:twisted:

Seta00 06-27-2011 19:25

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
The next thing you should do, and this is what makes it almost impossible to break things, is branching off the master branch:
Code:

git branch makemybunnyhappy
Now you are working on your own local branch - right now it's the exact same as the master branch.
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
then start the merge with
Code:

git merge master
(Hint: you can always check the master branch before starting the merge, and fix any conflicts you find)
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
to see what are the conflicts.
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
will commit the result of the merge, and you can push your changes to the remote repository (in this case, GitHub).

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

Arkshine 06-27-2011 19:41

Re: Hamsandwich Updating
 
There is no trouble in concurrent updating because I'm the only one updating despite the project having 4 people. :twisted:

Arkshine 06-27-2011 21:00

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.. )
Some offsets were misaligned for CS and DoD.
SendWeaponAnim for CS is now fixed and renamed to Ham_CS_Weapon_SendWeaponAnim.
Fixed TakeHealth call (one param wrongly converted, thanks Nextra)
Fixed hamsandwich vtable patching on Linux for newer GCC binaries (by DS)
Added Ham_TFC_Killed
Updated CS/DoD/TFC/Op4 offsets
Added support for Mac OSX (but binary will not be provided for now, sorry)
New mods supported
Deathmatch Classic
Adrenaline Gamer
Opposing Forces
New functions added :

All

All, except Counter-Strike, Natural Selection and The Specialists

Counter-Strike

Day of Defeat

Team Fortress Classic

Earth's Force Special

Earth's Force Special - OpenBeta

Natural Selection

Sven co-op 4.6

We need people willing to test seriously under windows and linux.
All people are welcomed to complete the documentation of each function.

fysiks 06-27-2011 21:07

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).

joaquimandrade 06-27-2011 21:14

Re: Hamsandwich Updating
 
Quote:

Originally Posted by fysiks (Post 1498390)
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).

What he said could mean that for other cases but for this one I think its just really because of concurrency or cleanliness of the operation. I mean, that is a more advanced use of branching and I think he is talking more at a basic level.

Seta00 06-28-2011 07:30

Re: Hamsandwich Updating
 
Quote:

Originally Posted by fysiks (Post 1498390)
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).

Exactly, that's another good thing about working in branches. I use nvie's git-flow model with the gitflow extension, it makes it extremely easy to do the branching:
Code:

git flow feature start myShinyFeature
# work on feature, commit. feature is done
git flow feature finish myShinyFeature


schmurgel1983 06-29-2011 06:56

Re: Hamsandwich Updating
 
Code:

; Sven-Coop has no linux binaries.  This makes disassembly much harder.
; These offsets were contributed by schmurgel1983
; All offsets for Sven Co-op version 4.5
@section SvenCoop windows
    pev 4
    base 0x0
   
    spawn 0
    precache 1
    keyvalue 2
    objectcaps 5
    activate 6
    setobjectcollisionbox 7
    classify 10
    deathnotice 11
    traceattack 12
    takedamage 13
    takehealth 14
    killed 15
    bloodcolor 16
    tracebleed 17
    istriggered 18
    mymonsterpointer 19
    mysquadmonsterpointer 20
    gettogglestate 21
    addpoints 22
    addpointstoteam 23
    addplayeritem 24
    removeplayeritem 25
    giveammo 26
    getdelay 27
    ismoving 28
    overridereset 29
    damagedecal 30
    settogglestate 31
    startsneaking 32
    stopsneaking 33
    oncontrols 34
    issneaking 35
    isalive 36
   
    ;isbspmodel ??
    ;reflectgauss ??
    ;hastarget ??
    ;isinworld ??
    ;isplayer ??
    ;isnetclient ??
    ;teamid ??
    ;getnexttarget ??
   
    think 49
    touch 50
    use 51
   
    ;blocked ??
    ;respawn ??
    ;updateowner ??
    ;fbecomeprone ??
    ;center ??
    ;eyeposition ??
    ;earposition ??
    ;bodytarget ??
    ;illumination ??
    ;fvisible ??
    ;fvecvisible ??
   
    player_jump 174
    player_duck 175
    player_prethink 176
    player_postthink 177
   
    item_deploy 77
    item_preframe 81
    item_postframe 82
@end

importend @section SvenCoop windows

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.

hleV 06-29-2011 07:07

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.

Nightfall1 06-29-2011 07:39

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.