Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Player Collision CoD UO

  1. #1
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts

    Player Collision CoD UO

    Hello,

    I am running a UO Bot Zombie Mod and have some problems with bot collisions.
    When 2 Bots are at the same position i cant damage them.

    Does anyone know how i can disable the playercollision - or modify it - with a hex editor or something like that?
    I actually don't have a clue about libcod, but it might work for uo too?

    Thanks for your help.

    Best regards,
    Fabio

  2. #2
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by fabio View Post
    Hello,

    I am running a UO Bot Zombie Mod and have some problems with bot collisions.
    When 2 Bots are at the same position i cant damage them.

    Does anyone know how i can disable the playercollision - or modify it - with a hex editor or something like that?
    I actually don't have a clue about libcod, but it might work for uo too?

    Thanks for your help.

    Best regards,
    Fabio
    The player damage is hard coded into the engine. There is no way to intercept it with a Hex editor as there is no file to edit. Libcod - or at least the principle behind libcod - could work, but you are talking about a massive re-write as the CODUO engine is not the same as the COD/COD4 engine. But there is no need for either approaches to the solution, as your problem is merely one of timing - the damage to players starts in the engine, but it then brought up into the runtime arena and is then handled by script. All you need to do is create a precise timer for when players start to take damage, add players to an array sequentially in terms of time they start to be monitored, and then perform the damage on the first one and then the next, and so on.

    CODUO was/is notorious for players not taking damage. And it is all to do with the runtime scripting not being precise enough. The developers vastly improved the damage engine with COD2, in order to take account of this timing problem.

  3. #3
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts
    Is it really a timing problem?
    Looks like the Bots/Players get something like a Godmode when they are stuck in each other.

    How can i monitor the damage then?

  4. #4
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by fabio View Post
    Is it really a timing problem?
    Looks like the Bots/Players get something like a Godmode when they are stuck in each other.

    How can i monitor the damage then?
    Okay, I thought you CREATED the zombie mod. In which case, you would know how to monitor damage. Clearly, you just admin a server that it runs on. I suggest you go to the zombie mod creator and ask them for help. I wont script it for you.

  5. #5
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts
    Ow well, I am the creator of the mod :O
    The mod only exists on my server


    But it is impossible to monitor damage of 2 Players stuck in one position.
    They have like "Godmode" and the bullets just go through.

  6. #6
    Private First Class php's Avatar
    Join Date
    Nov 2012
    Posts
    142
    Thanks
    28
    Thanked 116 Times in 59 Posts
    Yes, this is easily patchable.

    Get lost Fabio, I highly discourage anyone helping him.

    He's known for stealing mods (CoD1/UO), hacking servers for fun, claiming anything you use in your mod is his and he doesn't feel like he has the privilege to atleast credit the original authors and being an enormous prick (even a bigger prick than me).

    Also he's one of the reasons I won't do something with CoDExtended and UO.

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

    Prawy (18th January 2021)

  8. #7
    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
    Just measure the distance between all players with distancesquared() and if they are too near, replace one of them e.g. to an older position (or kill, kick, ban, burn with ants or so).
    timescale 0.01

  9. #8
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts
    Quote Originally Posted by php View Post
    Yes, this is easily patchable.

    Get lost Fabio, I highly discourage anyone helping him.

    He's known for stealing mods (CoD1/UO), hacking servers for fun, claiming anything you use in your mod is his and he doesn't feel like he has the privilege to atleast credit the original authors and being an enormous prick (even a bigger prick than me).

    Also he's one of the reasons I won't do something with CoDExtended and UO.
    Well, if you say that...
    My RotU mod is done by myself and everyone is asked for permissions. I even asked the Developer of COD 4 RotU Revolution if this is ok.

    Everything of this mod is clear.

    I justed asked a small question, so please don't tell shit about this mod.


    Quote Originally Posted by kung foo man View Post
    Just measure the distance between all players with distancesquared() and if they are too near, replace one of them e.g. to an older position (or kill, kick, ban, burn with ants or so).
    Isn't there a better solution? So i can see zombies disappear when they come close to each other, what happens very often...
    Last edited by fabio; 29th October 2014 at 06:28.

  10. #9
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    There really isn't a better solution. Your problem is one which would only affect bots - human players cannot get stuck together. Only bots, because their hitboxes are not the same as the ones human players have.

    So, your problem - caused by 2 bots ascending a waypoint node at exactly the same time (I've had this problem myself when I developed Pezbot for COD4) and their hitboxes becoming fused together - is one of timing: when the 2 bots occupy the same space, the callback_playerdamage code cannot determine which is the one to take damage. Hence why they are invincible! The code cannot apply damage to an entity unless it can determine who the entity is. And with 2 fused bots, it can't do that, because they are both receiving damage at the exact same time.

    So, there are only 2 solutions to it: 1) make some code to prevent 2 bots ever arriving at the same waypoint node at the same time (I tried this, with no great success), or 2) write a timer which always determines who should receive damage first - it would just be an entity array formed each server frame in the callback_playerdamage() module. The problem seems to be that the engine doesn't know who "self" is as there are 2 entities receiving damage at the same time. Hence, the timer array is more precise and can tell you exactly who "self" is at any given moment.

  11. #10
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts
    To Solution 2:
    Is the callback_playerdamage() even called when the bots are stuck in each other?

    /*================
    Called when a player has taken damage.
    self is the player that took damage.
    ================*/
    CodeCallback_PlayerDamage(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc)
    {
    [[level.callbackPlayerDamage]](eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc);
    }
    Last edited by fabio; 29th October 2014 at 11:48.

Posting Permissions

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