chettoy / apexsky

https://apex.chettoy.com
GNU General Public License v3.0
146 stars 81 forks source link

S21 Updated. I updated the offsets . But glow not working #107

Closed BoheSama1999 closed 6 months ago

BoheSama1999 commented 6 months ago

Describe the bug S21 updated ,i update the offsets. Then everything goes well. But glow not work anymore,I think that's glow mode changed?

Additional context The offsets.ini

The offsets.h

// Date 5/8/2024
// GameVersion=v3.0.67.34

#define OFFSET_ITEM_ID 0x1538           // item id?      //updated 2/14/2024
#define OFFSET_M_CUSTOMSCRIPTINT 0x1558 // m_customScriptInt //updated 5/8/2024
#define OFFSET_YAW                                                             \
  0x223c - 0x8 // m_currentFramePlayer.m_ammoPoolCount//updated 4/7/2024 - 0x8

#define HIGHLIGHT_SETTINGS 0xade39c0 // HighlightSettings  // updated 5/8/2024
#define OFFSET_GLOW_CONTEXT_ID 0x28c // updated 1/25/2024
#define GLOW_VISIBLE_TYPE 0x26c      // updated 1/25/2024
#define OFFSET_GLOW_FIX 0x268        // updated 1/25/2024
// Mode: HighlightSettings + 0x34 * Context + 0x0
// Color: HighlightSettings + 0x34 * Context + 0x4

#define m_lastChargeLevel 0x16e0 // m_lastChargeLevel
BoheSama1999 commented 6 months ago

i mean context id

BoheSama1999 commented 6 months ago

i test some way ,if context id lower than 70 ,its goes well

JuNeF1 commented 6 months ago

the same issue glow do not work correctly

JuNeF1 commented 6 months ago

Could you tell me how to decrease the num of context id,I mean I just want to use enemy glow

BoheSama1999 commented 6 months ago

Could you tell me how to decrease the num of context id,I mean I just want to use enemy glow

https://github.com/chettoy/apexsky/blob/main/apex_dma/apex_dma.cpp line : 471-550 set context id (setting_index) lower than 70 to fix it

BoheSama1999 commented 6 months ago

Here is my changes

void SetPlayerGlow(Entity &LPlayer, Entity &Target, int index,
                   int frame_number) {
  const auto g_settings = global_settings();
  int setting_index = 0;
  std::array<float, 3> highlight_parameter = {0, 0, 0};

  // if (!Target.isGlowing() ||
  //     (int)Target.buffer[OFFSET_GLOW_VISIBLE_TYPE] != 1)
  {
    float currentEntityTime = 5000.f;
    if (!isnan(currentEntityTime) && currentEntityTime > 0.f) {
      // set glow color
      if (!(g_settings.firing_range) &&
          (Target.isKnocked() || !Target.isAlive())) {
        setting_index = 50;
        highlight_parameter = {g_settings.glow_r_knocked,
                               g_settings.glow_g_knocked,
                               g_settings.glow_b_knocked};
      } else if (Target.lastVisTime() > lastvis_aim[index] ||
                 (Target.lastVisTime() < 0.f && lastvis_aim[index] > 0.f)) {
        setting_index = 51;
        highlight_parameter = {g_settings.glow_r_viz, g_settings.glow_g_viz,
                               g_settings.glow_b_viz};
      } else {
        if (g_settings.player_glow_armor_color) {
          int shield = Target.getShield();
          int health = Target.getHealth();
          if (shield + health <= 100) { // Orange
            setting_index = 60;
            highlight_parameter = {255 / 255.0, 165 / 255.0, 0 / 255.0};
          } else if (shield + health <= 150) { // white
            setting_index = 61;
            highlight_parameter = {247 / 255.0, 247 / 255.0, 247 / 255.0};
          } else if (shield + health <= 175) { // blue
            setting_index = 62;
            highlight_parameter = {39 / 255.0, 178 / 255.0, 255 / 255.0};
          } else if (shield + health <= 200) { // purple
            setting_index = 63;
            highlight_parameter = {206 / 255.0, 59 / 255.0, 255 / 255.0};
          } else if (shield + health <= 225) { // red
            setting_index = 64;
            highlight_parameter = {219 / 255.0, 2 / 255.0, 2 / 255.0};
          } else {
            setting_index = 65;
            highlight_parameter = {2 / 255.0, 2 / 255.0, 2 / 255.0};
          }
        } else {
          setting_index = 52;
          highlight_parameter = {g_settings.glow_r_not, g_settings.glow_g_not,
                                 g_settings.glow_b_not};
        }
JuNeF1 commented 6 months ago

After trying several times it finally did work ,I am appreciated your patience dude rep!

xiaofenggeyo commented 6 months ago

Characters can't be filled with color, what's the problem

BoheSama1999 commented 6 months ago

Characters can't be filled with color, what's the problem

idk but it works for me

xiaofenggeyo commented 6 months ago

So how do you modify the glow fill

BoheSama1999 commented 6 months ago

do

i not modify anything about fillglow or i forgot it?

xiaofenggeyo commented 6 months ago

No, at the moment the glow fill is failing and it's not clear where it's going wrong

BoheSama1999 commented 6 months ago

No, at the moment the glow fill is failing and it's not clear where it's going wrong

i checked it ,it have fillglow,but not that type like before,it is kind of transparent

BoheSama1999 commented 6 months ago

No, at the moment the glow fill is failing and it's not clear where it's going wrong

image It does ,but not fill all the pixels

xiaofenggeyo commented 6 months ago

yes,There may be a way to solve the problem of filling all pixels

BoheSama1999 commented 6 months ago

yes,There may be a way to solve the problem of filling all pixels

https://github.com/chettoy/apexsky/blob/main/apex_dma/apexsky/src/menu/apex_menu/main_menu.rs#L106

BoheSama1999 commented 6 months ago

yes,There may be a way to solve the problem of filling all pixels

https://github.com/chettoy/apexsky/blob/main/apex_dma/apexsky/src/menu/apex_menu/main_menu.rs#L106

in the past , 14 is full fillglow , but now idk

qiufengyaya commented 6 months ago

Thank you. I'll do some research on my own.

BoheSama1999 commented 6 months ago

Thank you. I'll do some research on my own.

changed it to 255 ,i got this image

xiaofenggeyo commented 6 months ago

Okay. Thank you very much.

BoheSama1999 commented 6 months ago

You're welcome☺️