mujarino / CS2_DMA_Radar

Python DMA/external Radar
132 stars 14 forks source link

Crash when enemy disconnect #22

Closed mn2xujiakun closed 7 months ago

mn2xujiakun commented 8 months ago

The program will crash if there is an enemy leaving during the match.

therewillwhile commented 8 months ago

download latest app.py if it now works and still crash can u pls provide screenshot or text what kind of issue do u have i tried a lot to kick bots and play something like cybershoke retake(players always connect and disconnect) and it works great

Suspectxyzz commented 8 months ago

download latest app.py if it now works and still crash can u pls provide screenshot or text what kind of issue do u have i tried a lot to kick bots and play something like cybershoke retake(players always connect and disconnect) and it works great

you don't get any errors, but I keep disappear players from the map (at least for me randomly,[it happened only 2 times after 7 matches] but they appear after a few seconds)

therewillwhile commented 8 months ago

download latest app.py if it now works and still crash can u pls provide screenshot or text what kind of issue do u have i tried a lot to kick bots and play something like cybershoke retake(players always connect and disconnect) and it works great

you don't get any errors, but I keep disappear players from the map (at least for me randomly,[it happened only 2 times after 7 matches] but they appear after a few seconds)

it can be any kind of problem, from dma memory loss(it loses everytime ~8%) to memory mapping directly in cs2. idk

Suspectxyzz commented 8 months ago

@meanwhiletothestars this bug persists when someone stops connecting to the match /disconnect the whole team disappears even if I close cs2 / restart radar pc IMG_2751 IMG_2752

therewillwhile commented 8 months ago

i'll check this out and make another logic to draw entities soon

ConnorMAD commented 8 months ago
    def get_pos(procd, pawn_ptr):
    return read_vec3(procd, pawn_ptr + Offsets.m_vOldOrigin)

def poss(view_matrix, procd, ptr, pawn_ptr):
    posb = get_pos(procd, pawn_ptr)
    eye_y = read_single_float_memory(procd, pawn_ptr + Offsets.m_angEyeAngles + 0x4)
    return posb, eye_y

    def it_entities():
        ent_list = read_inta_memory(procd, mod + Offsets.dwEntityList)
        for i in range(1, 36):
            try:
                entry_ptr = read_inta_memory(procd, ent_list + (8 * (i & 0x7FFF) >> 9) + 16)
                controller_ptr = read_inta_memory(procd, entry_ptr + 120 * (i & 0x1FF))
                controller_pawn_ptr = read_inta_memory(procd, controller_ptr + Offsets.m_hPlayerPawn)
                list_entry_ptr = read_inta_memory(procd, ent_list + 0x8 * ((controller_pawn_ptr & 0x7FFF) >> 9) + 16)
                pawn_ptr = read_inta_memory(procd, list_entry_ptr + 120 * (controller_pawn_ptr & 0x1FF))
            except:
                continue
            yield controller_ptr, pawn_ptr
Suspectxyzz commented 7 months ago

@meanwhiletothestars you have solved this, you can close it <3