:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Thu Dec 01, 2022 11:23 pm
All times are UTC + 0
 Forum index » Modding Central » Tiberian Sun Editing Forum » Vinifera
Engine question: CellClass::Adjacent_Cell
Moderators: Global Moderators, Vinifera Moderators, CCHyper
Post new topic   Reply to topic Page 1 of 1 [2 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
GREEN
Vehicle Drone


Joined: 26 Dec 2016

PostPosted: Wed Oct 12, 2022 1:01 pm    Post subject:  Engine question: CellClass::Adjacent_Cell Reply with quote  Mark this post and the followings unread

I have seen ts-spawn.exe enter into a doom loop .
Might be something on a map causing it, some of the time.

Have ye debugged something similar yet?


Code:

   //0050077C  push        esi  
   //0050077D  mov         ecx,ebx  
   // DEFINE_IMPLEMENTATION(CellClass &CellClass::Adjacent_Cell(FacingType) const, 0x00457970);
   // DEFINE_IMPLEMENTATION(CellClass & MapClass::operator [] (const Cell &), 0x0050F280);
   //0050077F  call        00457970  
   //00500784  cmp         eax,ebp  
   //00500786  je          00500791  
   //00500788  dec         esi  
   //00500789  and         esi,7  
   //0050078C  cmp         esi,0FFFFFFFFh  
   //0050078F  jne         0050077C  


How to indentify the CELL it is looking at so i can check the .map file?

?How do i dereference from what registry calling 00457970  
Quote:
"B:\opensource\github\t\TSpp\src\cell.h"
Cell Pos;

MouseClass &Map = Make_Global<MouseClass>(0x00748348);


Code:

//  DEFINE_IMPLEMENTATION(CellClass &CellClass::Adjacent_Cell(FacingType) const, 0x00457970);

L00457970(
    char _a4,                              // _cfa_4
    short _a6                              // _cfa_6
)
{
    intOrPtr _v2;                          // _cfa_fffffffe
    intOrPtr _v4;                          // _cfa_fffffffc
    _unknown_ _t15;                        // _t15
    _unknown_ _t20;                        // _t20
    intOrPtr _t21;                         // _t21
    signed int _t24;                       // _t24
    signed int _t25;                       // _t25

    _t24 = _a4;
    _t15 = _t20;
    __eflags = _t24 - 8;
    if(__eflags < 0) {
        _t21 =  *((intOrPtr*)(_t15 + 20));
        _t25 = _t24 & 7;
        _v4 = _t21;
        _a4 =  *((intOrPtr*)(7737672 + _t25 * 4)) + _t21;
        _a6 =  *((intOrPtr*)(7737672 + _t25 * 4 + 2)) + _v2;
        _a4 = _a4;
        _push( &_a4);
        L0050F280(7635784, __eflags);
        return;
    }
    return;
}


//  DEFINE_IMPLEMENTATION(CellClass & MapClass::operator [] (const Cell &), 0x0050F280);

L0050F280(
    _unknown_ __ecx,                       // r2
    _unknown_ __eflags,                    // r9
    intOrPtr* _a4                          // _cfa_4
)
{
    _unknown_ __esi;                       // r5
    signed int _t8;                        // _t8
    intOrPtr _t10;                         // _t10
    intOrPtr* _t13;                        // _t13
    _unknown_ _t15;                        // _t15

    _t13 = _a4;
    _push(_t15);
    _t8 = ( *(_t13 + 2) << 9) +  *_t13;
    _pop(__esi);
    if(__eflags >= 0 || _t8 >= 262144) {
L3:
         *8411996 =  *_t13;
        return 8411976;
    } else {
        _t10 =  *((intOrPtr*)( *((intOrPtr*)(__ecx + 360)) + _t8 * 4));
        if(_t10 != 0) {
            return _t10;
        }
        goto L3;
    }
}




Back to top
View user's profile Send private message
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Wed Oct 12, 2022 11:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

If the game is getting stuck in an infinite loop, make sure you are using the latest compatible version of the ts-patches EXE from https://github.com/CnCNet/ts-patches/releases/tag/latest (ts-patches-TSCLIENT-master-#.zip).

After updating the EXE you still get the same issue, then you might have a patch conflicting with existing Vinifera code or your code might not be handling the cell lookup correctly.

If you wish to discuss this in further detail, you can join the Vinifera channel (#vinifera-chat) on the Mod Haven Discord and we might be able to provide better insight once we can see your code.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] Mark the topic unread ::  View previous topic :: View next topic
 Forum index » Modding Central » Tiberian Sun Editing Forum » Vinifera
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1549s ][ Queries: 11 (0.0107s) ][ Debug on ]