Заказать игровой сервер Контакты (заказать плагин/исправить ошибки/другое) Поиск

[ вход ]
[ последние сообщения ]

  • Страница 1 из 1
  • 1
Форум » SourceMod >> CS:Source >> CSGO » Обсуждение » Проверка prop_dynamic (Проверка prop_dynamic)
Проверка prop_dynamic
GreenBytes Дата: Воскресенье, 08.12.2019, 06:56:12 | Сообщение # 1
Сообщений: 19
Репутация: 0 [ +/- ]
Добрый день, необходимо объект проверить на скрытую модель.
Entity: prop_dynamic
www: https://developer.valvesoftware.com/wiki/Prop_dynamic

Если по смотреть в документацию , то видно что можно скрыть и показать этот объект:
TurnOff
Hides the prop through EF_NODRAW. The Disable input does the exact same thing.
TurnOn
Shows the prop (by removing EF_NODRAW). The Enable input does the exact same thing.

Вопрос: как узнать скрыт объект (Entity) или показан ?
 
_wS_ Дата: Воскресенье, 08.12.2019, 07:38:30 | Сообщение # 2
Thanks
Код
// entity effects
enum
{
    EF_BONEMERGE   = 0x001,    // Performs bone merge on client side
    EF_BRIGHTLIGHT    = 0x002,    // DLIGHT centered at entity origin
    EF_DIMLIGHT    = 0x004,    // player flashlight
    EF_NOINTERP    = 0x008,    // don't interpolate the next frame
    EF_NOSHADOW    = 0x010,    // Don't cast no shadow
    EF_NODRAW    = 0x020,    // don't draw entity     32 = десятичное число 0x020 = шестнадцатеричное
    EF_NORECEIVESHADOW  = 0x040,    // Don't receive no shadow
    EF_BONEMERGE_FASTCULL    = 0x080,    // For use with EF_BONEMERGE. If this is set, then it places this ent's origin at its
                    // parent and uses the parent's bbox + the max extents of the aiment.
                    // Otherwise, it sets up the parent's bones every frame to figure out where to place
                    // the aiment, which is inefficient because it'll setup the parent's bones even if
                    // the parent is not in the PVS.
    EF_ITEM_BLINK   = 0x100,    // blink an item so that the user notices it.
    EF_PARENT_ANIMATES  = 0x200,    // always assume that the parent entity is animating
    EF_MAX_BITS = 10
};

Наверно так:

Код
#define EF_NODRAW    0x020

if (GetEntProp(ent, Prop_Send, "m_fEffects") & EF_NODRAW)
{

}
else
{

}
 
GreenBytes Дата: Воскресенье, 08.12.2019, 08:25:17 | Сообщение # 3
Сообщений: 19
Репутация: 0 [ +/- ]
Огромное вам спасибо :) Почему то не обратил внимание на флаг EF_NODRAW.
Вопрос не по теме, но все же задам.
Вы использовали функцию:
Код
GetEntProp(ent, Prop_Send, "m_fEffects")

Где можно узнать список всех параметров по типу -> m_fEffects ? Т.к в оф. документации нет не одного слова об этом :(
 
_wS_ Дата: Воскресенье, 08.12.2019, 09:06:47 | Сообщение # 4
Thanks
Это вроде и есть весь список.
Инфа в source-sdk-2013 исходах в public/const.h
https://github.com/ValveSo.....h#L280

Похоже в csgo еще есть

Код
EF_MARKED_FOR_FAST_REFLECTION    = 0x400,
EF_NOSHADOWDEPTH  = 0x800,
EF_NOFLASHLIGHT   = 0x1000,

Здесь еще инфа и похоже больше флагов: https://developer.valvesoftware.com/wiki/Effect_flags
 
Форум » SourceMod >> CS:Source >> CSGO » Обсуждение » Проверка prop_dynamic (Проверка prop_dynamic)
  • Страница 1 из 1
  • 1
Поиск: