34 lines
1.2 KiB
C++
34 lines
1.2 KiB
C++
#include "inc/include.h"
|
|
|
|
void features::glow(Context* pctx)
|
|
{
|
|
auto me = r5::local_player(pctx);
|
|
u64 entlist_base = pctx->game_base + OFF_ENTITY_LIST;
|
|
|
|
for(size_t i = 0ull; i < 128; i++)
|
|
{
|
|
auto rec = reinterpret_cast<EntityRecord*>( entlist_base + (i * sizeof(EntityRecord)) );
|
|
if(rec->ptr != 0ull && rec->ptr != me.base())
|
|
{
|
|
auto entity = rec->ptr;
|
|
auto entity_obj= Entity(entity);
|
|
if(PLAYER__IS_ALIVE(entity) && !entity_obj.is_ally_of(pctx, me))
|
|
{
|
|
u64 signifier_base = *(u64*)(entity + 0x478);
|
|
if(signifier_base != 0ull)
|
|
{
|
|
u64 entity_type = *(u64*)(signifier_base);
|
|
if(entity_type == 0x6d6d75645f63706e || entity_type == 0x726579616c70)
|
|
{
|
|
*(int*)(entity + 0x28C) = 0;
|
|
*(int*)(entity + 0x26C) = 7;
|
|
*(int*)(entity + 0x29C) = -213;
|
|
*(int*)(entity + 0x278) = -1082130432;
|
|
*(u32*)(entity + 0x264) = 0x46000000;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|