Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: CoD4 - basics

  1. #11
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by BlancO View Post
    I don't want to run server from main folder. After setting "+set fs_homepath "/home/cod4/server"" console_mp.log is in fs_game folder so I think it's ok.

    Will the "q3dirtravfix.so" from CoD2 work in CoD4?

    What if I will check bullettrace before calling damage function?

    PHP Code:
    /*================
    Called when a player has taken damage.
    self is the player that took damage.
    ================*/
    CodeCallback_PlayerDamage(eInflictoreAttackeriDamageiDFlagssMeansOfDeathsWeaponvPointvDirsHitLoctimeOffset)
    {
        
    // Check for bulletTrace
        
    ...
        ...
        ...

        if(
    trace)
            return;
        
    //

        
    self endon("disconnect");
        [[
    level.callbackPlayerDamage]](eInflictoreAttackeriDamageiDFlagssMeansOfDeathsWeaponvPointvDirsHitLoctimeOffset);

    What do you mean what if you check bullettrace before calling damage? What are you trying to do? If you are trying to stop Deep Impact/specialty_bulletpenetration, it wont work. You can't intercept the depth of impact of Deep Impact because, as I said, it is hard coded, and it's done in the engine, not in script. The only perks which are done in script are:

    specialty_bulletdamage
    specialty_armorvest
    specialty_explosivedamage

    The script for handling those perks can be found in maps\mp\gametypes\_class::cac_modified_damage(). All the other perks are done in the engine, and they are hard coded.
    Last edited by Tally; 23rd September 2013 at 00:38.

  2. #12
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Cant it be that the bulletpenetration is a property of the weaponfile, so you can edit the weaponfile to set something like "wallpenetration" to 0? (never did cod4, but this seems logical...)

  3. #13
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Quote Originally Posted by IzNoGoD View Post
    Cant it be that the bulletpenetration is a property of the weaponfile, so you can edit the weaponfile to set something like "wallpenetration" to 0? (never did cod4, but this seems logical...)
    bulletpen can be influenced by a file its sth like hitloc table and i guess itrs in the mp folder
    there you can set different penetration depths for the surfaces

    or you check if the if( iDFlags & level.iDFlags_Bulletpen ) and change it there in CodeCallback_PlayerDamage

    just a guess

  4. #14
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by IzNoGoD View Post
    Cant it be that the bulletpenetration is a property of the weaponfile, so you can edit the weaponfile to set something like "wallpenetration" to 0? (never did cod4, but this seems logical...)
    No, there is no such weapon setting.
    Last edited by Tally; 23rd September 2013 at 09:18.

  5. #15
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by serthy View Post
    bulletpen can be influenced by a file its sth like hitloc table and i guess itrs in the mp folder
    there you can set different penetration depths for the surfaces

    or you check if the if( iDFlags & level.iDFlags_Bulletpen ) and change it there in CodeCallback_PlayerDamage

    just a guess
    I've never seen such a file, and I have a set of raw files which was given to me by the developers. It has EVERY file used in COD4. But, I guess there could always be one file they missed. Could you pass one to me please?

    Also, there is no such flag as level.iDFlags_Bulletpen. But having had a look through callback_playerdamage, I found there is one such flag relating to Deep Impact:

    eInflictor.wasDamagedFromBulletPenetration

    But that only relates to C4 for some reason. However, having said that, that would be the flag that someone wishing to intercept Deep Impact would need to work on. But I seem to remember someone saying that you can't intercept damage from wasDamagedFromBulletPenetration. But that might have been because they were lame and didn't really know what they were doing. So, I guess the question is still open, and someone may find a solution to it.
    Last edited by Tally; 23rd September 2013 at 09:18.

  6. #16
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    raw/info/bullet_penetration_mp

    i would suggest to simply spawn a bot behind a wall, and shoot at him and print the iDFlags in callback_playerdamage, if it stays at 0, you have to use bulletTraces to check for this, otherwise check for this flag
    Last edited by serthy; 23rd September 2013 at 12:38.

  7. The Following User Says Thank You to serthy For This Useful Post:

    BlancO (23rd September 2013)

  8. #17
    Private
    Join Date
    Feb 2013
    Location
    Poland
    Posts
    32
    Thanks
    33
    Thanked 27 Times in 8 Posts
    Thx, serthy!

    If bullet went through wall then iDFlags = 8.

    Just edit _callbacksetup.gsc to disable it.

    PHP Code:
    CodeCallback_PlayerDamage(eInflictoreAttackeriDamageiDFlagssMeansOfDeathsWeaponvPointvDirsHitLoctimeOffset)
    {
        if(
    iDFlags == 8)
            return;

        
    self endon("disconnect");
        [[
    level.callbackPlayerDamage]](eInflictoreAttackeriDamageiDFlagssMeansOfDeathsWeaponvPointvDirsHitLoctimeOffset);

    About "q3dirtravfix.so" - it prevents from downloading files from server with other extensions than .iwd and .pk3. So I think It won't work in CoD4 because there are .ff files too. So do You know another way to protect your .gsc files?
    Last edited by BlancO; 23rd September 2013 at 14:25.

  9. #18
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    What's the problem with: set sv_allowDownload 0?
    timescale 0.01

  10. #19
    Private
    Join Date
    Feb 2013
    Location
    Poland
    Posts
    32
    Thanks
    33
    Thanked 27 Times in 8 Posts
    Players won't be able to download mods.

  11. #20
    Private
    Join Date
    Jan 2013
    Location
    Hungary
    Posts
    113
    Thanks
    10
    Thanked 74 Times in 45 Posts
    set sv_wwwDownload "1"
    set sv_allowdownload "0"
    seta sv_wwwBaseURL "http://"
    set sv_wwwDLDisconnected "0"

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •