Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Replace plant models

  1. #1
    Private
    Join Date
    Feb 2013
    Posts
    27
    Thanks
    7
    Thanked 12 Times in 5 Posts

    Replace plant models

    Hello,

    I would like to edit the stock SD gametype with a little feature. In every round the plant models will be different. So, I replaced the basic models to a random one and removed the Clip brushes from the bomzones. Now players can walk through the models. I tried to spawn a trigger_radius and then call SetContents and tried the SetBounds and SetContents combo but the result is the same. The solid "object" will be a cylinder and it seems so stupid around the model, can I spawn a solid square or any better idea to do this?
    Thanks in advance!

  2. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    I had much hope for something like this when php figured out the setBounds() stuff, as it worked so fine in Call of Duty 1.

    Example: http://killtube.org/showthread.php?1...bridgebuilders

    Though I couldn't get this to work with client prediction in CoD2 (serverside it somewhat worked), maybe somebody else had more luck.
    timescale 0.01

  3. #3
    Private
    Join Date
    Feb 2013
    Posts
    27
    Thanks
    7
    Thanked 12 Times in 5 Posts
    SetBounds worked for me but these two ways
    PHP Code:
    ents[iSetBounds(1001000);
    ents[iSetContents(1); 
    PHP Code:
    level.plants[0].trigger Spawn("trigger_radius"ents[i].origin01001000);
    level.plants[0].trigger SetContents(1); 
    are making the exact same thing, just for the first one not necessary to spawn a trigger

  4. #4
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by kung foo man View Post
    I had much hope for something like this when php figured out the setBounds() stuff, as it worked so fine in Call of Duty 1.

    Example: http://killtube.org/showthread.php?1...bridgebuilders

    Though I couldn't get this to work with client prediction in CoD2 (serverside it somewhat worked), maybe somebody else had more luck.
    setBounds() is not a built-in function for COD2. And it was removed in the COD1 1.3 patch because there is a known exploit for it.

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

    I would like to edit the stock SD gametype with a little feature. In every round the plant models will be different. So, I replaced the basic models to a random one and removed the Clip brushes from the bomzones. Now players can walk through the models. I tried to spawn a trigger_radius and then call SetContents and tried the SetBounds and SetContents combo but the result is the same. The solid "object" will be a cylinder and it seems so stupid around the model, can I spawn a solid square or any better idea to do this?
    Thanks in advance!
    setContents() works in COD2, but as I said above, setBounds() is not a built-in function in COD2. There is already a thread about this subject here:

    http://killtube.org/showthread.php?1...light=bombzone

    You will find code in that thread which works. Make sure you take the code right at the end of the thread - page 3 - because that is the code that works the best.

  6. #6
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Quote Originally Posted by Tally View Post
    setBounds() is not a built-in function for COD2. And it was removed in the COD1 1.3 patch because there is a known exploit for it.
    Hence we had to add it:

    https://github.com/riicchhaarrd/CoDE..._entity.c#L115

    https://github.com/kungfooman/libcod...layer.cpp#L725

    Well, maybe the libcod implementation of setbounds is just wrong, so it still could work (if implemented correctly). I don't know why IW should remove special quake3 entity functions/variables (mostly the bindings to native ID tech 3 functions).
    timescale 0.01

  7. #7
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by kung foo man View Post
    Hence we had to add it:

    https://github.com/riicchhaarrd/CoDE..._entity.c#L115

    https://github.com/kungfooman/libcod...layer.cpp#L725

    Well, maybe the libcod implementation of setbounds is just wrong, so it still could work (if implemented correctly). I don't know why IW should remove special quake3 entity functions/variables (mostly the bindings to native ID tech 3 functions).
    They removed it in the COD1 1.3 patch because there is an exploit where you can "glue" a player to the floor with it even if you are not an admin of the server. Hence, it was removed in the 1.3 patch.

  8. #8
    Private
    Join Date
    Feb 2013
    Posts
    27
    Thanks
    7
    Thanked 12 Times in 5 Posts
    Basically I did the same like you, but when the model is a rectangle and not a square the result will be very bad. In this case on the attached picture the black circle is the solid stuff. Any chance to fix the SetBounds method with libcod in the future?
    Click image for larger version. 

Name:	shot0025.jpg 
Views:	52 
Size:	304.9 KB 
ID:	867

  9. #9
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Don't hold your breath, if you know what I mean.

    How about dig yourself into libcod? There are like 6 ppl around who messed with IDA/libcod and everybody is prolly working on his own problems.
    timescale 0.01

  10. The Following User Says Thank You to kung foo man For This Useful Post:

    Mitch (19th June 2015)

  11. #10
    Private
    Join Date
    Feb 2013
    Posts
    27
    Thanks
    7
    Thanked 12 Times in 5 Posts
    Quote Originally Posted by kung foo man View Post
    Don't hold your breath, if you know what I mean.

    How about dig yourself into libcod? There are like 6 ppl around who messed with IDA/libcod and everybody is prolly working on his own problems.

    Alright, could you explain me why are you editing the specified entity's base + 276, 272, 264, 260 addresses? What represents these adresses, I guess the base + 280 is the height but the others?

    PHP Code:
    *(float*)(gentities gentities_size*id 280) = height;
    *(
    float*)(gentities gentities_size*id 276) = width;
    *(
    float*)(gentities gentities_size*id 272) = width;
    *(
    float*)(gentities gentities_size*id 264) = -width;
    *(
    float*)(gentities gentities_size*id 260) = -width

Posting Permissions

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