Page 2 of 2 FirstFirst 12
Results 11 to 11 of 11

Thread: Replace plant models

  1. #11
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by qwerty View Post
    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?
    It basically created a collision 'box' around the entity like spawn point.
    Based on the pseudocode in the 'spawn' function and the CoDExtended code.
    You got two points that define the outer positions of the entity.
    A = 260, 264, 268 e.g (-10, -10, 0) = x, y, z (i assume)
    B = 272, 276, 280 e.g (10, 10, 10)

    PHP Code:
    *(_DWORD *)(a1 260) = playerMins;
    *(
    _DWORD *)(a1 264) = dword_34BDD0;
    *(
    _DWORD *)(a1 268) = dword_34BDD4;
    *(
    _DWORD *)(a1 272) = playerMaxs;
    *(
    _DWORD *)(a1 276) = dword_34BDC4;
    *(
    _DWORD *)(a1 280) = dword_34BDC8
    cod2 1.3
    PHP Code:
    if ( *(_DWORD *)(a2 28) == )
      {
        
    sub_810824E(a1 260, -1082130432, -1082130432, -1082130432);
        
    sub_810824E(a1 272106535321610653532161065353216);
      }
      else
      {
        
    sub_810824E(a1 260, -1082130432, -10821304320);
        
    sub_810824E(a1 272106535321610653532161073741824);
      } 
    It might be useful to read the values that are used in the spawn function (of your cod2 version).
    Edit: or a other function that uses these offsets.
    Last edited by Mitch; 20th June 2015 at 23:06.

  2. The Following User Says Thank You to Mitch For This Useful Post:

    kung foo man (21st June 2015)

Posting Permissions

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