[3.3.3.11723] CGWorld_C::Intersect parameters? menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [3.3.3.11723] CGWorld_C::Intersect parameters?

    CGWorld_C::Intersect 's current prototype differs from the one I expected.
    Previously known:
    Code:
    void (*)(Pos* end, Pos* start, Pos* result, float distance, uint32_t flags, uint32_t useless)
    Current:
    Code:
    void (*)(Pos*, Pos*, Pos*, uint32_t*, float, uint32_t, uint32_t, uint32_t, uint32_t)
    Calling it with dummy variables gives an invalid result.

    Anyone have re-reversed it?

    [3.3.3.11723] CGWorld_C::Intersect parameters?
  2. #2
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It has not changed. Not in this version, not for a long time.
    The 4th parameter is a float*. It's the hit segment along the ray. If you are passing a pointer to 0.0f, it will only complete 0% of the ray. Pass a pointer to 1.0f. When the method is done, the value will be the hit along the segment. That means:
    Vector3 hitPos = start + (end - start) * t; where t is the value of the float*. Or simply use the result, which is calculated in that way as well.
    Also, the first position passed is the start, not the end.

    EDIT: This is the code that takes care of it inside the TraceLine function:
    if ( hitPos )
    {
    _hitAlongSegment = *hitAlongSegment;
    v10 = (end->x - start->x) * _hitAlongSegment + start->x;
    v11 = (end->y - start->y) * _hitAlongSegment + start->y;
    v12 = (end->z - start->z) * _hitAlongSegment + start->z;
    hitPos->x = v10;
    hitPos->y = v11;
    hitPos->z = v12;
    }
    Last edited by MaiN; 05-13-2010 at 06:50 AM.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  3. #3
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh Im sorry, I was looking at the wrong function.
    Sometimes we talk about Intersect and Traceline like they are the same function, or naming them wrong.
    To make it clear, everyone is using Traceline and not Intersect, Intersect being called by Traceline.
    +rep anyway for the explanations MaiN.

  4. #4
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, TraceLine is being called by CGWorld_C::Intersect. CGWorld_C::Intersect is a complete wrapper for TraceLine. All CGWorld_C::Intersect does is to jump to TraceLine. They take the exact same parameters.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  5. #5
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looking at Intersect with IDA:
    int __cdecl sub_521E80(int,int,int,int,int,int,int,int,int);

    That's why I was clueless.

  6. #6
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by eLaps View Post
    Looking at Intersect with IDA:
    int __cdecl sub_521E80(int,int,int,int,int,int,int,int,int);

    That's why I was clueless.
    You are clueless because IDA magically did not guess all the parameters to a function?

    EDIT: Oh, I see what you did wrong. 0x521E80 is part of TraceLine, it probably tests hits on non-game objects. It is not CGWorld_C::Intersects.
    Last edited by MaiN; 05-13-2010 at 09:26 AM.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

Similar Threads

  1. CGWorld_C::Intersect
    By ramey in forum WoW Memory Editing
    Replies: 20
    Last Post: 09-03-2009, 02:00 AM
  2. UseItem parameters
    By namreeb in forum WoW Memory Editing
    Replies: 5
    Last Post: 05-28-2009, 10:49 PM
  3. how to handle lua unicode parameter ?
    By leather in forum WoW Memory Editing
    Replies: 3
    Last Post: 03-26-2009, 08:28 PM
  4. "accounts" table parameters(read, never ask again:))
    By x6x6x6x in forum WoW EMU General Releases
    Replies: 8
    Last Post: 12-15-2008, 12:44 PM
  5. Swamp of Sorrows : Blasted Lands intersection
    By Razmataz in forum World of Warcraft Exploration
    Replies: 12
    Last Post: 06-05-2007, 01:16 PM
All times are GMT -5. The time now is 04:10 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search